Author: jfthomps
Date: Wed Sep 24 16:53:29 2014
New Revision: 1627366

URL: http://svn.apache.org/r1627366
Log:
VCL-776 - rework resource code to have a base class for all resources and 
inheriting classes for each resource type

computer.js: modified applyExtraFilters: fixed problem where selecting 
something with parenthesis in it resulted in nothing being displayed; added 
extra check to not use RegExp for value == inuse to also require the field to 
be 'state'

Modified:
    vcl/trunk/web/js/resources/computer.js

Modified: vcl/trunk/web/js/resources/computer.js
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/js/resources/computer.js?rev=1627366&r1=1627365&r2=1627366&view=diff
==============================================================================
--- vcl/trunk/web/js/resources/computer.js (original)
+++ vcl/trunk/web/js/resources/computer.js Wed Sep 24 16:53:29 2014
@@ -473,7 +473,9 @@ function combofocus(obj) {
 
 function applyExtraFilters(value) {
        delete resourcegrid.query[this.field];
-       if(value == 'inuse')
+       value = value.replace('(', '\\(');
+       value = value.replace(')', '\\)');
+       if(this.field == 'state' && value == 'inuse')
                resourcegrid.query[this.field] = value;
        else if(value != '')
                resourcegrid.query[this.field] = new RegExp('.*' + value + 
'.*', 'i');


Reply via email to