|
|
@ -120,15 +120,21 @@ THE SOFTWARE.
|
|
|
|
this.dtsettings = dtsettings;
|
|
|
|
this.dtsettings = dtsettings;
|
|
|
|
//console.log(dtsettings);
|
|
|
|
//console.log(dtsettings);
|
|
|
|
|
|
|
|
|
|
|
|
var tr = $("<tr/>");
|
|
|
|
var tr = $("<tr/>").addClass("dataTable_colSearchBar");
|
|
|
|
|
|
|
|
|
|
|
|
var cols = dtsettings.aoColumns;
|
|
|
|
var cols = dtsettings.aoColumns;
|
|
|
|
var colLen = cols.length;
|
|
|
|
var colLen = cols.length;
|
|
|
|
//console.info(cols);
|
|
|
|
//console.info(cols);
|
|
|
|
for(var i = 0; i < colLen; i++) {
|
|
|
|
for(var i = 0; i < colLen; i++) {
|
|
|
|
if(cols[i].bVisible === false || cols[i].bSearchable === false) {
|
|
|
|
if(cols[i].bVisible === false) {
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(cols[i].bSearchable === false) {
|
|
|
|
|
|
|
|
tr.append($("<td/>"));
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var name = cols[i].data || cols[i].mData;
|
|
|
|
var name = cols[i].data || cols[i].mData;
|
|
|
|
var input = this._getSearchCtrl(name, i).addClass(this.getOptions().controlClass);
|
|
|
|
var input = this._getSearchCtrl(name, i).addClass(this.getOptions().controlClass);
|
|
|
|
var td = $("<td/>").append(input);
|
|
|
|
var td = $("<td/>").append(input);
|
|
|
@ -151,6 +157,11 @@ THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
parent.prepend(tr);
|
|
|
|
parent.prepend(tr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//listen for columns being hidden and make sure we hide the column in the search bar too
|
|
|
|
|
|
|
|
$(dtapi.table().node()).on("column-visibility.dt", function(e, settings, column, state) {
|
|
|
|
|
|
|
|
tr.children().eq(column).toggle(state);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//private method to build the text or select box for the searching
|
|
|
|
//private method to build the text or select box for the searching
|
|
|
@ -232,6 +243,9 @@ THE SOFTWARE.
|
|
|
|
$.fn.dataTable.DtServerColSearch = DtServerColSearch;
|
|
|
|
$.fn.dataTable.DtServerColSearch = DtServerColSearch;
|
|
|
|
$.fn.DataTable.DtServerColSearch = DtServerColSearch;
|
|
|
|
$.fn.DataTable.DtServerColSearch = DtServerColSearch;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return DtServerColSearch;
|
|
|
|
return DtServerColSearch;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -249,4 +263,6 @@ THE SOFTWARE.
|
|
|
|
factory( jQuery, jQuery.fn.dataTable );
|
|
|
|
factory( jQuery, jQuery.fn.dataTable );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})(window, document);
|
|
|
|
})(window, document);
|