[Svn] r3917 - in trunk/roundcubemail: . program/js

trac at roundcube.net trac at roundcube.net
Sat Aug 28 19:58:14 CEST 2010


Author: alec
Date: 2010-08-28 12:58:14 -0500 (Sat, 28 Aug 2010)
New Revision: 3917

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/js/app.js
Log:
- Fix "Threaded" checkbox after subfolder creation (#1486928)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2010-08-28 15:02:04 UTC (rev 3916)
+++ trunk/roundcubemail/CHANGELOG	2010-08-28 17:58:14 UTC (rev 3917)
@@ -14,6 +14,7 @@
 - Fix TinyMCE buttons are hidden in Opera (#1486922)
 - Fix JS error on IE when trying to send HTML message with enabled spellchecker (#1486940)
 - Display inline images with known extensions and non-image content-type (#1486934)
+- Fix "Threaded" checkbox after subfolder creation (#1486928)
 
 RELEASE 0.4
 -----------

Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2010-08-28 15:02:04 UTC (rev 3916)
+++ trunk/roundcubemail/program/js/app.js	2010-08-28 17:58:14 UTC (rev 3917)
@@ -4148,41 +4148,41 @@
       this.goto_url('folders');
       return false;
     }
-    else {
-      // clone a table row if there are existing rows
-      var row = this.clone_table_row(refrow);
-      row.id = id;
 
-      if (before && (before = this.get_folder_row_id(before)))
-        tbody.insertBefore(row, document.getElementById(before));
-      else
-        tbody.appendChild(row);
+    // clone a table row if there are existing rows
+    var row = this.clone_table_row(refrow);
+    row.id = id;
 
-      if (replace)
-        tbody.removeChild(replace);
-    }
+    if (before && (before = this.get_folder_row_id(before)))
+      tbody.insertBefore(row, document.getElementById(before));
+    else
+      tbody.appendChild(row);
 
+    if (replace)
+      tbody.removeChild(replace);
+
     // add to folder/row-ID map
     this.env.subscriptionrows[row.id] = [name, display_name, 0];
 
     // set folder name
     row.cells[0].innerHTML = display_name;
 
-    // set messages count to zero
-    if (!replace)
+    if (!replace) {
+      // set messages count to zero
       row.cells[1].innerHTML = '*';
 
-    if (!replace && row.cells[2] && row.cells[2].firstChild.tagName.toLowerCase()=='input') {
-      row.cells[2].firstChild.value = name;
-      row.cells[2].firstChild.checked = true;
-    }
+      // update subscription/threading checkboxes
+      $('input[name="_subscribed[]"]', row).val(name).attr('checked', true);
+      $('input[name="_threaded[]"]', row).val(name).attr('checked', false);
 
-    // add new folder to rename-folder list and clear input field
-    if (!replace && (form = this.gui_objects.editform)) {
-      if (form.elements['_folder_oldname'])
-        form.elements['_folder_oldname'].options[form.elements['_folder_oldname'].options.length] = new Option(name,name);
-      if (form.elements['_folder_name'])
-        form.elements['_folder_name'].value = ''; 
+      var elem;
+      // add new folder to rename-folder list and clear input field
+      if (form = this.gui_objects.editform) {
+        if (elem = form.elements['_folder_oldname'])
+          elem.options[elem.options.length] = new Option(name, name);
+        if (elem = form.elements['_folder_name'])
+          elem.value = ''; 
+      }
     }
 
     this.init_subscription_list();
@@ -4236,8 +4236,8 @@
       }
     }
 
-    if (form && form.elements['_folder_newname'])
-      form.elements['_folder_newname'].value = '';
+    if (form && (elm = form.elements['_folder_newname']))
+      elm.value = '';
   };
 
   this.subscribe = function(folder)

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list