diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-12 09:27:17 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-05-12 09:27:17 +0000 |
| commit | 3d148a0ae25220fe46129d91a1f6d47b80c4b937 (patch) | |
| tree | 10fd24f9c144893e254ab30cf45dab03b04f5e82 | |
| parent | 3158fd3e702d0df6b7f95382fadbc94c5f5adbdf (diff) | |
- Make some regexp faster
git-svn-id: https://svn.roundcube.net/trunk@4750 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/js/list.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index eb73bbb68..874f8f73e 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -101,7 +101,7 @@ init: function() init_row: function(row) { // make references in internal array and set event handlers - if (row && String(row.id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i)) { + if (row && String(row.id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)) { var self = this, uid = RegExp.$1; row.uid = uid; @@ -601,7 +601,7 @@ get_first_row: function() var i, len, rows = this.list.tBodies[0].rows; for (i=0, len=rows.length-1; i<len; i++) - if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) + if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) return RegExp.$1; } @@ -614,7 +614,7 @@ get_last_row: function() var i, rows = this.list.tBodies[0].rows; for (i=rows.length-1; i>=0; i--) - if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) + if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null) return RegExp.$1; } |
