From bbd4ca89efdd63ba85ff9f3369c4f9e847ec7bb0 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 12 May 2011 09:27:17 +0000 Subject: - Make some regexp faster --- program/js/list.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'program/js') diff --git a/program/js/list.js b/program/js/list.js index eb73bbb68..874f8f73e 100644 --- a/program/js/list.js +++ b/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=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; } -- cgit v1.2.3