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

trac at roundcube.net trac at roundcube.net
Wed Mar 17 14:48:23 CET 2010


Author: alec
Date: 2010-03-17 08:48:23 -0500 (Wed, 17 Mar 2010)
New Revision: 3371

Modified:
   trunk/roundcubemail/THREADS
   trunk/roundcubemail/program/js/app.js
   trunk/roundcubemail/program/js/common.js
   trunk/roundcubemail/program/js/list.js
Log:
- use jQuery.inArray() instead of rcube_in_array()


Modified: trunk/roundcubemail/THREADS
===================================================================
--- trunk/roundcubemail/THREADS	2010-03-17 13:33:14 UTC (rev 3370)
+++ trunk/roundcubemail/THREADS	2010-03-17 13:48:23 UTC (rev 3371)
@@ -1,3 +1,7 @@
+
+*** Current status of THREADS implementation ***
+
+
 CHANGES IN RELATION TO ORIGINAL PATCH
     - don't add nested messages into selection on collapse if parent message
       is in selection
@@ -17,6 +21,10 @@
     - updating threaded message list on message delete
     - don't reload messages list on check_recent
 
+KNOWN ISSUES:
+    - on new message (check_recent) the whole list is reloaded
+    - css issues on IE6
+
 TODO (other):
     - performance: fetching all messages for list in "expand all" state only,
       if "expand all" is disabled we should fetch only root messages and fetch
@@ -26,18 +34,7 @@
     	      all headers for each child
     - button in #listcontrols to mark all messages in current thread (with selected
       root or child message),
-    + thread tree icons
-    + thread css: message row height, thread/status icon alignment
-      (change size of all list icons to 14x14)
-    - remove 'indexsort' label from localization files
+    - icons for thread tree structure
 
 TODO (by the way):
     - use jQuery.inArray instead of find_in_array() (common.js)
-    + use only one function (js) to generate messages list
-
-KNOWN ISSUES:
-    - on new message (check_recent) the whole list is reloaded
-    + table header replacement doesn't work on IE
-    - css issues on IE6
-    + css issues on IE7
-

Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2010-03-17 13:33:14 UTC (rev 3370)
+++ trunk/roundcubemail/program/js/app.js	2010-03-17 13:48:23 UTC (rev 3371)
@@ -733,7 +733,7 @@
         var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props.part;
         
         // open attachment in frame if it's of a supported mimetype
-        if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0)
+        if (this.env.uid && props.mimetype && jQuery.inArray(props.mimetype, this.mimetypes)>=0)
           {
           if (props.mimetype == 'text/html')
             qstring += '&_safe=1';
@@ -4276,12 +4276,12 @@
     this.env.flagged_col = null;
 
     var found;
-    if((found = find_in_array('subject', this.env.coltypes)) >= 0) {
+    if((found = jQuery.inArray('subject', this.env.coltypes)) >= 0) {
       this.set_env('subject_col', found);
       if (this.message_list)
         this.message_list.subject_col = found+1;
       }
-    if((found = find_in_array('flag', this.env.coltypes)) >= 0)
+    if((found = jQuery.inArray('flag', this.env.coltypes)) >= 0)
       this.set_env('flagged_col', found);
   };
 

Modified: trunk/roundcubemail/program/js/common.js
===================================================================
--- trunk/roundcubemail/program/js/common.js	2010-03-17 13:33:14 UTC (rev 3370)
+++ trunk/roundcubemail/program/js/common.js	2010-03-17 13:48:23 UTC (rev 3371)
@@ -469,27 +469,6 @@
   }
   
 
-// find a value in a specific array and returns the index
-function find_in_array()
-  {
-  var args = find_in_array.arguments;
-  if(!args.length) return -1;
-
-  var haystack = typeof(args[0])=='object' ? args[0] : args.length>1 && typeof(args[1])=='object' ? args[1] : new Array();
-  var needle = typeof(args[0])!='object' ? args[0] : args.length>1 && typeof(args[1])!='object' ? args[1] : '';
-  var nocase = args.length==3 ? args[2] : false;
-
-  if(!haystack.length) return -1;
-
-  for(var i=0; i<haystack.length; i++)
-    if(nocase && haystack[i].toLowerCase()==needle.toLowerCase())
-      return i;
-    else if(haystack[i]==needle)
-      return i;
-
-  return -1;
-  }
-
 // recursively copy an object
 function rcube_clone_object(obj)
 {

Modified: trunk/roundcubemail/program/js/list.js
===================================================================
--- trunk/roundcubemail/program/js/list.js	2010-03-17 13:33:14 UTC (rev 3370)
+++ trunk/roundcubemail/program/js/list.js	2010-03-17 13:48:23 UTC (rev 3371)
@@ -840,7 +840,7 @@
     }
     else  // unselect row
     {
-      var p = find_in_array(id, this.selection);
+      var p = jQuery.inArray(id, this.selection);
       var a_pre = this.selection.slice(0, p);
       var a_post = this.selection.slice(p+1, this.selection.length);
       this.selection = a_pre.concat(a_post);

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



More information about the Svn mailing list