cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r618335 - /cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js
Date Mon, 04 Feb 2008 17:30:22 GMT
Author: antonio
Date: Mon Feb  4 09:30:21 2008
New Revision: 618335

URL: http://svn.apache.org/viewvc?rev=618335&view=rev
Log:
Explicitely turn cache off.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js?rev=618335&r1=618334&r2=618335&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/FormUploadProgress.js
Mon Feb  4 09:30:21 2008
@@ -14,19 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
  /*
     FormUploadProgress Widget
-    
+
     This is a Dojo Widget for Cocoon that monitors the progress of uploads from a form.
-    
+
     It works by sending periodical XMLHttp calls to Cocoon in the background, while the files
are being uploaded.
     Cocoon responds with JSON data which is used to draw the progress bar and status strings.
 
     @version $Id$
-    
+
  */
- 
+
 dojo.provide("cocoon.ajax.FormUploadProgress");
 dojo.require("dojo.event");
 dojo.require("dojo.widget.HtmlWidget");
@@ -41,31 +41,31 @@
         color: "#336699",           // the colour of the text and border
         ready: "Ready.",            // Strings the widget needs, that may require external
i18n transformation
         connecting: "Connecting ...",
-        
+
         // widget API properties
         ns: "forms",
         widgetType: "FormUploadProgress",
         isContainer: true,
         templateString: '<div class="FormUpload">' +
-                            '<div class="FormUploadUser" dojoAttachPoint="containerNode"></div>'
+ 
+                            '<div class="FormUploadUser" dojoAttachPoint="containerNode"></div>'
+
                             '<div class="FormUploadProgress" style="border:1px solid ${this.color};margin:2px;height:
16px;position:relative;">' +
-                                '<div style="width:0px;background:${this.background};position:absolute;top:0;left:0;width:0;right:0;"
class="bar" dojoAttachPoint="barNode">&nbsp;</div>' + 
-                                '<div style="color:${this.color};position:absolute;top:0;left:0;bottom:0;right:0;background:none;padding:2px;font-size:10px;overflow:hidden;"
class="data" dojoAttachPoint="msgNode">${this.ready}</div>' + 
+                                '<div style="width:0px;background:${this.background};position:absolute;top:0;left:0;width:0;right:0;"
class="bar" dojoAttachPoint="barNode">&nbsp;</div>' +
+                                '<div style="color:${this.color};position:absolute;top:0;left:0;bottom:0;right:0;background:none;padding:2px;font-size:10px;overflow:hidden;"
class="data" dojoAttachPoint="msgNode">${this.ready}</div>' +
                             '</div>' +
                          '</div>',
-                        
+
         // DOM Nodes in the template
         containerNode: null,   // the node containing the user content
         msgNode: null,         // the node containing the progress status text
         barNode: null,         // the progress bar node
-        
+
         // private properties
         _form: null,           // this widget's form
         _target: null,         // the form's *Form widget
         _timer: null,          // timer for periodical updates
         _busy: false,          // busy getting the status
         _delay: 2000,          // 2 secs between status calls
-        
+
         // widget interface
         postCreate: function(){
             // work out where to attach the event listener
@@ -83,7 +83,7 @@
                 throw new Error("The FormUploadProgress widget may only be used inside a
form.");
             }
         },
-    
+
         // widget interface
         destroy: function(){
             if (this._target) {
@@ -112,14 +112,15 @@
             dojo.io.bind({
                 url: new dojo.uri.Uri(djConfig["baseRelativePath"], "../../../_cocoon/system/ajax/upload/status"),
                 mimetype: "text/json",
+                useCache: false,
                 handle: dojo.lang.hitch(this, function(type, data, evt) {
                     if (type == "load") {
                         this._update(data);
                         this._busy = false;
                     } else if (type == "error") {
                         dojo.debug("FormUploadProgress - status request failed");
-                    }           
-                })
+                    }
+                }),
             });
             this._busy = true;
         },
@@ -133,7 +134,7 @@
                     this._timer.stop();
                 } else {
                     this.barNode.style.width = status.percent + "%";
-                }               
+                }
             }
             if (status.message) this.msgNode.innerHTML = status.message;
         },
@@ -150,6 +151,4 @@
             });
             return hasFile;
         }
-
 });
-



Mime
View raw message