JQGridUtil.js revision e26e5073e1266868172d72453c97f413fe2fb603
/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Portions copyright 2011-2015 ForgeRock AS.
*/
/*global define, sessionStorage */
"underscore",
"jquery",
"jqgrid"
], function (_, $, dateUtil) {
var obj = {};
// TODO: Remove when jqgrid has been replaced by backgrid
return null;
}
saveColumnState = function (perm) {
gridState = {
colStates: {}
},
for (i = 0; i < l; i++) {
};
}
}
},
restoreColumnState = function (colModel) {
if (gridState) {
for (i = 0; i < l; i++) {
}
}
}
return gridState;
},
defaultOptions = {
datatype: "json",
loadBeforeSend: function (jqXHR) {
},
colNames: [],
colModel: [],
height: 'auto',
width: 'none',
jsonReader: {
},
pages += 1;
}
return pages;
},
},
},
repeatitems: false
},
prmNames: {
nd: null,
sort: '_sortKeys',
search: '_queryFilter',
},
serializeGridData: function (postedData) {
if (additional.serializeGridData) {
}
if (postedData[element]) {
filter += ' AND ';
}
}
delete postedData[element];
});
if (additional.searchFilter) {
filter += ' AND ';
}
filter = filter.concat(additional.searchFilter[i].field, ' ', additional.searchFilter[i].op, ' "', additional.searchFilter[i].val, '"');
}
}
// search window filters
if (postedData.filters) {
filter += ' AND ';
}
filter = filter.concat(postedFilters.rules[i].field, ' ', postedFilters.rules[i].op, ' ', filterDataToDate.getTime().toString());
} else {
filter = filter.concat(postedFilters.rules[i].field, ' ', postedFilters.rules[i].op, ' "*', postedFilters.rules[i].data, '*"');
}
}
}
}
delete postedData.page;
if (postedData._sortKeys) {
}
}
delete postedData.sord;
return $.param(postedData);
},
loadComplete: function (data) {
//because of the bug in the used version of jquery.jqGrid-4.5.4-min.js we need to set selected option manually
},
onPaging: function () {
return 'stop';
}
},
pager: null,
rowNum: 10,
page: 1,
viewrecords: true,
};
if (gridState) {
}
if (additional.search) {
}
grid.navGrid(options.pager, {edit: false, add: false, del: false, search: showSearch, refresh: false},
caption:"Columns",
buttonicon:"ui-icon-add",
position: "first",
onClickButton: function(){
modal : true,
if (perm) {
}
}});
}
});
}
if (callback) {
callback();
}
});
}
});
});
return grid;
};
return obj;
});