/**
* jqGrid addons using jQuery UI
* Author: Mark Williams
* Changed by Oleg Kiriljuk, oleg.kiriljuk@ok-soft-gmbh.com
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl-2.0.html
* depends on jQuery UI
**/
/*jshint evil:true, eqeqeq:false, eqnull:true, devel:true */
/*global jQuery, define, exports, module, require */
/*jslint browser: true, devel: true, eqeq: true, nomen: true, plusplus: true, unparam: true, vars: true, white: true */
(function (global, factory) {
"use strict";
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
define([
"jquery",
"./grid.base",
//"../plugins/ui.multiselect",
"free-jqgrid-plugins/ui.multiselect",
"jquery-ui/dialog",
"jquery-ui/draggable",
"jquery-ui/droppable",
"jquery-ui/resizable",
"jquery-ui/sortable"
], function ($) {
return factory($, global, global.document);
});
} else if (typeof module === "object" && module.exports) {
// Node/CommonJS
module.exports = function (root, $) {
if (!root) {
root = window;
}
if ($ === undefined) {
// require("jquery") returns a factory that requires window to
// build a jQuery instance, we normalize how we use modules
// that require this pattern but the window provided is a noop
// if it's defined (how jquery works)
$ = typeof window !== "undefined" ?
require("jquery") :
require("jquery")(root);
}
require("./grid.base");
//require("../plugins/ui.multiselect");
require("free-jqgrid-plugins/ui.multiselect");
require("jquery-ui/dialog");
require("jquery-ui/draggable");
require("jquery-ui/droppable");
require("jquery-ui/resizable");
require("jquery-ui/sortable");
factory($, root, root.document);
return $;
};
} else {
// Browser globals
factory(jQuery, global, global.document);
}
}(typeof window !== "undefined" ? window : this, function ($, window, document) {
"use strict";
var jgrid = $.jgrid, jqID = jgrid.jqID;
// begin module grid.jqueryui
var $UiMultiselect = $.ui != null ? $.ui.multiselect : null,
reorderSelectedColumns = function (iColItem) {
/* Background information:
*
* Multiselect contains the list of selected items this.selectedList,
* which is jQuery wrapper of
element. The items of this.selectedList
* are - elements, which represent visible (hidden:false) and movable
* (hidedlg:false) columns of the grid.
*
* Additionally there are exist hidden