Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 301826
Collapse All | Expand All

(-)src/org/eclipse/rwt/widgets/Upload.js (-14 / +12 lines)
Lines 75-92 Link Here
75
    this.add(topLayout);
75
    this.add(topLayout);
76
76
77
    if (this._showProgress) {
77
    if (this._showProgress) {
78
        var bottomLayout = new qx.ui.layout.CanvasLayout();
79
        bottomLayout.set({left:0,height:'auto',marginTop:2});
80
        bottomLayout.setOverflow("hidden");
81
        bottomLayout.setAppearance( "progressbar" );
82
83
        // Progress Bar
78
        // Progress Bar
84
        this._progressBar = new qx.ui.layout.CanvasLayout();
79
        this._progressBar = new org.eclipse.swt.widgets.ProgressBar();
85
        this._progressBar.setParent( bottomLayout );
80
        this._progressBar.set({left:0,height:20});
86
        this._progressBar.set({left:0,height:16});
81
        this._progressBar.setMinimum(0);
87
        this._progressBar.setAppearance( "progressbar-indicator" );
82
        this._progressBar.setMaximum(100);
88
83
        this._progressBar.setFlag(org.eclipse.swt.widgets.ProgressBar.FLAG_HORIZONTAL);
89
        this.add(bottomLayout);
84
        
85
        this.add(this._progressBar);
90
    }
86
    }
91
    
87
    
92
    if (this._fireProgressEvents) {
88
    if (this._fireProgressEvents) {
Lines 169-175 Link Here
169
            // make sure, that the progressbar (if visible) is filled completely after 
165
            // make sure, that the progressbar (if visible) is filled completely after 
170
            // uploading finished
166
            // uploading finished
171
            if (this._showProgress) {
167
            if (this._showProgress) {
172
              this._progressBar.setWidth("100%");
168
              this._progressBar.setSelection(100);
173
            }
169
            }
174
            this._isStarted = false;
170
            this._isStarted = false;
175
    
171
    
Lines 244-250 Link Here
244
                if (percentCompleted != null) {
240
                if (percentCompleted != null) {
245
                    
241
                    
246
                    if (this._showProgress) {
242
                    if (this._showProgress) {
247
                        this._progressBar.setWidth(percentCompleted.firstChild.data + "%");
243
                        var progress = percentCompleted.firstChild.data;
244
                        this.debug("New Progress " + progress);
245
                    	this._progressBar.setSelection(progress);
248
                    }
246
                    }
249
247
250
                    this.createDispatchDataEvent("upload", false);
248
                    this.createDispatchDataEvent("upload", false);
Lines 276-282 Link Here
276
    
274
    
277
    _resetUpload : function() {
275
    _resetUpload : function() {
278
      if (this._progressBar) {
276
      if (this._progressBar) {
279
         this._progressBar.setWidth("0%");
277
         this._progressBar.setSelection(0);
280
      }
278
      }
281
      if (this._uploadField) {
279
      if (this._uploadField) {
282
        this._uploadField.setValue("");
280
        this._uploadField.setValue("");

Return to bug 301826