Skip to content

Commit

Permalink
Update js/grid.filter.js
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegKi committed Dec 19, 2012
1 parent de44332 commit 7584347
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions js/grid.filter.js
Expand Up @@ -25,9 +25,11 @@
]
}
*/
/*global jQuery, $, window, navigator */
/*jshint eqeqeq:false, eqnull:true, devel:true */
/*global jQuery */

(function ($) {
"use strict";

$.fn.jqFilter = function( arg ) {
if (typeof arg === 'string') {
Expand Down Expand Up @@ -426,8 +428,8 @@ $.fn.jqFilter = function( arg ) {
var j=0;
for (i = 0; i < that.p.columns.length; i++) {
// but show only serchable and serchhidden = true fields
var searchable = (that.p.columns[i].search === undefined) ? true: that.p.columns[i].search ,
hidden = (that.p.columns[i].hidden === true),
var searchable = (that.p.columns[i].search === undefined) ? true: that.p.columns[i].search,
hidden = (that.p.columns[i].hidden === true),
ignoreHiding = (that.p.columns[i].searchoptions.searchhidden === true);
if ((ignoreHiding && searchable) || (searchable && !hidden)) {
selected = "";
Expand Down Expand Up @@ -455,9 +457,9 @@ $.fn.jqFilter = function( arg ) {
}
var ruleDataInput = $.jgrid.createEl(cm.inputtype,cm.searchoptions, rule.data, true, that.p.ajaxSelectOptions, true);
if(rule.op == 'nu' || rule.op == 'nn') {
$(ruleDataInput).attr('readonly','true');
$(ruleDataInput).attr('disabled','true');
} //retain the state of disabled text fields in case of null ops
$(ruleDataInput).attr('readonly','true');
$(ruleDataInput).attr('disabled','true');
} //retain the state of disabled text fields in case of null ops
// dropdown for: choosing operator
var ruleOperatorSelect = $("<select class='selectopts'></select>");
ruleOperatorTd.append(ruleOperatorSelect);
Expand Down Expand Up @@ -718,7 +720,7 @@ $.extend($.fn.jqFilter,{
},
addFilter: function (pfilter) {
if (typeof pfilter === "string") {
pfilter = jQuery.jgrid.parse( pfilter );
pfilter = $.jgrid.parse( pfilter );
}
this.each(function(){
this.p.filter = pfilter;
Expand All @@ -729,4 +731,3 @@ $.extend($.fn.jqFilter,{

});
})(jQuery);

0 comments on commit 7584347

Please sign in to comment.