? .svn
? 835922.57.patch
? swfupload-server-error-message.patch
? images/.svn
? images/mime/.svn
? js/.svn
Index: js/swfupload_widget.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/swfupload/js/swfupload_widget.js,v
retrieving revision 1.4
diff -u -p -r1.4 swfupload_widget.js
--- js/swfupload_widget.js	9 Jun 2010 07:34:48 -0000	1.4
+++ js/swfupload_widget.js	25 Oct 2010 16:44:31 -0000
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 function SWFU(id, settings) {
   var ref = {};
@@ -23,7 +23,7 @@ function SWFU(id, settings) {
   ref.messages_timeout;
 
   /**
-   * 
+   *
    */
   ref.init = function() {
     ref.settings = settings;
@@ -80,14 +80,14 @@ function SWFU(id, settings) {
   };
 
   /**
-   * 
+   *
    */
   ref.newSWFUpload = function() {
     ref.swfu = new SWFUpload(ref.settings);
   };
 
   /**
-   * 
+   *
    */
   ref.ajaxResponse = function(result) {
     var result = Drupal.parseJson(result);
@@ -108,7 +108,7 @@ function SWFU(id, settings) {
 
   /**
    * Custom function for when the initialization is complete
-   * This event handler is defined in swfupload.module as an instance callback function 
+   * This event handler is defined in swfupload.module as an instance callback function
    */
   ref.initComplete = function(result) {
     ref.createWrapper(result.instance.name);
@@ -155,7 +155,7 @@ function SWFU(id, settings) {
     var element;
 
     if (ref.num_elements > 1 && ref.instance.type == 'table') {
-      // First we'll check if we need to create a header 
+      // First we'll check if we need to create a header
       for (var name in ref.instance.elements) {
         if (ref.instance.elements[name].title) {
            use_header = true;
@@ -176,12 +176,12 @@ function SWFU(id, settings) {
 
       Drupal.settings.tableDrag['swfupload_file_wrapper-' + field_name] = {};
     };
-  };    
+  };
 
   /**
    * Creates or changes a tablerow
    * @param header Boolean Wheter or not the tablerow should contain th's. If sety to false, td's will be generated.
-   * @param file Object A completed file object 
+   * @param file Object A completed file object
    *   - If this is not set, a row is created including the progressbar, which replaces the td's with contains_progressbar set to true.
    *   - If file is set, the progressbar will be replaced with the appropriate td's
    */
@@ -228,7 +228,7 @@ function SWFU(id, settings) {
       input = $((element.type == 'textarea' ? '<textarea />' : '<input type="' + element.type + '" />')).attr({'name':name +'_' + fid, 'id':'edit-' + name + '_' + fid}).addClass('form-' + element.type);
 
       if (header) {
-        // Keep track of colspans 
+        // Keep track of colspans
         if (colspan > 0) colspan--;
         if (element.colspan) {
           colspan = element.colspan;
@@ -300,7 +300,7 @@ function SWFU(id, settings) {
       progress_td.attr({'colSpan':progress_td_counter});
     };
 
-    // Update the checked value of all added checkboxes 
+    // Update the checked value of all added checkboxes
     tr.find('input.checkbox').each(function() {
       $(this).attr('checked', $(this).hasClass('checked'));
     });
@@ -320,7 +320,7 @@ function SWFU(id, settings) {
    * A file has been selected. This function creates the markup referring to the new file object
    */
   ref.addFileItem = function(file) {
-    // Create the markup for the new file by copying the hidden template 
+    // Create the markup for the new file by copying the hidden template
     var new_file_obj = ref.wrapper_obj.find('.hidden').clone().attr({'id':file.id}).appendTo(ref.wrapper_obj);
     var dom_obj, value, elem_value;
 
@@ -346,7 +346,7 @@ function SWFU(id, settings) {
           dom_obj.html(value).show();
         };
 
-        // If the inputfield is hidden, we're dealing with a string. 
+        // If the inputfield is hidden, we're dealing with a string.
         // Look if there is a span of which the text can be replaced
         if (dom_obj.css('display') == 'none') {
           dom_obj.parent().find('span').text(value);
@@ -419,20 +419,20 @@ function SWFU(id, settings) {
         // Attach the tabledrag behavior
         // This will we only executed once.
         Drupal.attachBehaviors(ref.wrapper_obj);
-    
+
         $('tbody tr', ref.wrapper_obj).not('.hidden, .tabledrag-handle-swfupload-moved').each(function() {
-    
+
           if (!$('a.tabledrag-handle', $(this)).size()) {
             Drupal.tableDrag[ref.wrapper_id].makeDraggable(this);
           };
-    
+
           $('a.tabledrag-handle', $(this)).not('.tabledrag-handle-swfupload-moved').each(function() {
             $(this).appendTo($(this).parents('tr').addClass('tabledrag-handle-swfupload-moved').find('td.drag div.wrapper')).bind('mousedown', function() {
               $(this).parents('tr').addClass('dragging');
             });
           });
         });
-    
+
         $(document).unbind('mouseup', ref.tableDragStop).bind('mouseup', ref.tableDragStop);
         break;
 
@@ -532,7 +532,7 @@ function SWFU(id, settings) {
   };
 
   /**
-   * Responds on file queue errors 
+   * Responds on file queue errors
    */
   ref.fileQueueError = function(file, code, message) {
     switch (code) {
@@ -648,7 +648,7 @@ function SWFU(id, settings) {
         ref.displayMessage(Drupal.t('The upload limit (!num) has been reached!', {'!num': ref.settings.file_upload_limit}), 'status');
         return;
       case -200:
-        message = Drupal.t('Server error!', {'!num': ref.settings.file_upload_limit});
+        message = Drupal.t('Server error: HTTP !message.', {'!message': message});
     };
 
     // Give the user some visual indicators of the event
@@ -734,7 +734,7 @@ function SWFU(id, settings) {
 
       // If no file is secified, the function is called after sorting
       // There are no new values so the file object is not needed
-      // We only need to change the order of the stack 
+      // We only need to change the order of the stack
       if (!file) {
         ref.upload_stack[fid] = old_upload_stack[fid];
       }
@@ -860,7 +860,7 @@ function SWFU(id, settings) {
   };
 
   /**
-   * 
+   *
    */
   ref.getExtension = function(file_name) {
     return file_name.substring(file_name.lastIndexOf('.') + 1).toLowerCase();
@@ -899,7 +899,7 @@ function SWFU(id, settings) {
     temp_arr = temp_arr.reverse();
     for (var i in temp_arr) {
       temp_obj[temp_arr[i].key] = temp_arr[i].data;
-    };    
+    };
     return temp_obj;
   };
 
