svn: /web/doc-editor/trunk/js/ui/component/ StaleFileGrid.js

From: Date: Thu, 08 Apr 2010 19:01:20 +0000
Subject: svn: /web/doc-editor/trunk/js/ui/component/ StaleFileGrid.js
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-1750@lists.php.net to get a copy of this message
yannick Thu, 08 Apr 2010 19:01:20 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297713 Log: Filter on 'path', 'name', 'revision', 'en_revision', 'maintainer' ; Suggested by Yago Changed paths: U web/doc-editor/trunk/js/ui/component/StaleFileGrid.js Modified: web/doc-editor/trunk/js/ui/component/StaleFileGrid.js =================================================================== --- web/doc-editor/trunk/js/ui/component/StaleFileGrid.js 2010-04-08 19:00:41 UTC (rev 297712) +++ web/doc-editor/trunk/js/ui/component/StaleFileGrid.js 2010-04-08 19:01:20 UTC (rev 297713) @@ -454,7 +454,7 @@ }, onTrigger2Click: function() { - var v = this.getValue(); + var v = this.getValue(), regexp; if (v === '' || v.length < 3) { this.markInvalid( @@ -465,7 +465,23 @@ this.clearInvalid(); this.triggers[0].show(); this.setSize(180,10); - ui.component._StaleFileGrid.instance.store.filter('maintainer', v); + + regexp = new RegExp(v, 'i'); + + // We filter on 'path', 'name', 'revision', 'en_revision', 'maintainer' + ui.component._StaleFileGrid.instance.store.filterBy(function(record) { + + if( regexp.test(record.data.path) || + regexp.test(record.data.name) || + regexp.test(record.data.revision) || + regexp.test(record.data.en_revision) || + regexp.test(record.data.maintainer) + ) { + return true; + } else { + return false; + } + }, this); } }) ]

« previous php.doc.web (#1750) next »