/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to js/export.js

  • Committer: Suren A. Chilingaryan
  • Date: 2011-03-15 02:47:05 UTC
  • mfrom: (210.1.3 adei)
  • Revision ID: csa@dside.dyndns.org-20110315024705-qljn30gwin8yrkne
Integration of work of students with fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
    this.window = null;
6
6
    this.frame_height = 768;
7
7
    this.frame_width = 1024;
 
8
  
8
9
}
9
10
 
10
11
function EXPORT(format_sel_id, resample_sel_id, mask_sel_id, window_sel_id) {
32
33
    this.Update(opts);
33
34
}
34
35
 
35
 
EXPORT.prototype.Export = function(embedded_mode, window_type) {
36
 
 
 
36
EXPORT.prototype.Export = function(embedded_mode, window_type) {    
37
37
    var opts = "format=" + this.cfg.format + "&resample=" + this.cfg.resample + "&mask_mode=" + this.cfg.mask;
38
38
    if (this.GetFormatType(this.cfg.format) == 'image') {
39
39
        opts += '&width=' + this.cfg.frame_width + '&height=' + this.cfg.frame_height;
44
44
        opts += "&" + this.config.GetProps(-1);
45
45
    } else {
46
46
        opts += "&" + this.config.GetProps(this.cfg.window);
47
 
    }
 
47
    }   
 
48
    // If downloading image or !downloadmanager -> direct download.
 
49
    if(this.GetFormatType(this.cfg.format) == 'image' || !window.dlmanager)  { //TODO change format check
 
50
      document.location = adei.GetServiceURL("getdata", opts);      
 
51
    }
 
52
    else if(this.cfg.format == null) alert("Please select data source.");
 
53
    else {
 
54
      dlmanager.AddDownload(opts);
 
55
    }
 
56
}
48
57
 
49
 
    document.location = adei.GetServiceURL("getdata", opts);
 
58
EXPORT.prototype.StartDownload = function(download) {
 
59
  var opts = "target=dlmanager_download&dl_id="+download;
 
60
  document.location = adei.GetServiceURL("download", opts);
50
61
}
51
62
 
52
63
EXPORT.prototype.SetFormat = function(val) {
185
196
    return self.UpdateFormat(val, opts);
186
197
}
187
198
 
 
199
 
188
200
function exportUpdateSampling(self, val, opts) {
189
201
    return self.UpdateSampling(val, opts);
190
202
}