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