svn: /web/doc-editor/trunk/js/ui/component/ EntitiesAcronymsPanel.js
| From: | Yannick Torres | Date: | Thu, 08 Apr 2010 18:59:42 +0000 |
| Subject: | svn: /web/doc-editor/trunk/js/ui/component/ EntitiesAcronymsPanel.js | ||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-1747@lists.php.net to get a copy of this message | ||
yannick Thu, 08 Apr 2010 18:59:42 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=297710
Log:
Filter on 'from', 'items', 'value' ; Suggested by Yago
Changed paths:
U web/doc-editor/trunk/js/ui/component/EntitiesAcronymsPanel.js
Modified: web/doc-editor/trunk/js/ui/component/EntitiesAcronymsPanel.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/EntitiesAcronymsPanel.js 2010-04-08 17:17:09 UTC (rev
297709)
+++ web/doc-editor/trunk/js/ui/component/EntitiesAcronymsPanel.js 2010-04-08 18:59:42 UTC (rev
297710)
@@ -126,7 +126,7 @@
},
onTrigger2Click: function()
{
- var v = this.getValue();
+ var v = this.getValue(), regexp;
if (v === '' || v.length < 3) {
this.markInvalid(
@@ -137,7 +137,21 @@
this.clearInvalid();
this.triggers[0].show();
this.setSize(180,10);
- this.ownerCt.ownerCt.store.filter('entities', v, true);
+
+ regexp = new RegExp(v, 'i');
+
+ // We filter on 'from', 'items', 'value'
+ this.ownerCt.ownerCt.store.filterBy(function(record) {
+
+ if( regexp.test(record.data.from) ||
+ regexp.test(record.data.items) ||
+ regexp.test(record.data.value)
+ ) {
+ return true;
+ } else {
+ return false;
+ }
+ }, this);
}
})
]