You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/09/24 18:53:29 UTC

svn commit: r1627366 - /vcl/trunk/web/js/resources/computer.js

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');