svn: /web/doc-editor/trunk/js/ui/component/ PendingTranslateGrid.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Thu, 08 Apr 2010 19:00:10 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297711
Log:
Filter on 'path' and 'name' ; Suggested by Yago
Changed paths:
U web/doc-editor/trunk/js/ui/component/PendingTranslateGrid.js
Modified: web/doc-editor/trunk/js/ui/component/PendingTranslateGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/PendingTranslateGrid.js 2010-04-08 18:59:42 UTC (rev 297710)
+++ web/doc-editor/trunk/js/ui/component/PendingTranslateGrid.js 2010-04-08 19:00:10 UTC (rev 297711)
@@ -236,7 +236,7 @@
},
onTrigger2Click: function()
{
- var v = this.getValue();
+ var v = this.getValue(), regexp;
if (v === '' || v.length < 3) {
this.markInvalid(
@@ -247,7 +247,18 @@
this.clearInvalid();
this.triggers[0].show();
this.setSize(180,10);
- ui.component._PendingTranslateGrid.instance.store.filter('maintainer', v);
+
+ regexp = new RegExp(v, 'i');
+
+ // We filter on 'path' and 'name'
+ ui.component._PendingTranslateGrid.instance.store.filterBy(function(record) {
+
+ if( regexp.test(record.data.path) || regexp.test(record.data.name) ) {
+ return true;
+ } else {
+ return false;
+ }
+ }, this);
}
})
]