All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.js.base.grid.jqueryui.min.js Maven / Gradle / Ivy

There is a newer version: 5.0.6
Show newest version
'use strict';(function(b,z){"function"===typeof define&&define.amd?define("jquery ./grid.base free-jqgrid-plugins/ui.multiselect jquery-ui/dialog jquery-ui/draggable jquery-ui/droppable jquery-ui/resizable jquery-ui/sortable".split(" "),function(B){return z(B,b,b.document)}):"object"===typeof module&&module.exports?module.exports=function(b,p){b||(b=window);void 0===p&&(p="undefined"!==typeof window?require("jquery"):require("jquery")(b));require("./grid.base");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");z(p,b,b.document);return p}:z(jQuery,b,b.document)})("undefined"!==typeof window?window:this,function(b,z,B){var p=b.jgrid,x=p.jqID,q=null!=b.ui?b.ui.multiselect:null,D=function(a){if(null!=this.grid&&null!=this.grid.p){var l=this,g=this.grid.p,c,k,d,f,m=this.gh,e=this.selectedList,h=this.inGroup,n=e.find("li"),r=n.length-1,t=function(a,d,c){var f,
h=e.find("li");for(void 0===d&&(d=c?h.length-1:0);c?0<=d:dc&&(c=b.inArray(g.colModel[d].name,l.newColOrder));c++})},p=function(d){if(h[d]===h[a])return b(this).after(n[r]),u(),!0},q=function(d){if(h[d]===h[a])return b(this).before(n[r]),u(),!0},w=function(b){if(h[b]===h[a]&&void 0!==h[b])return m[h[b]].startColumnName=g.colModel[b].name,!0};u();if(m&&void 0!==m[h[a]])for(f=m[h[a]],k=0;k=n.length||0>k||!(f=b(n[k+1]).data("optionLink")))||(d=h[parseInt(f.val(),10)],void 0!==d&&(f=b(n[k-1]).data("optionLink"))&&h[parseInt(f.val(),10)]===d&&(f=t(function(b){if(h[b]!==d)return!0},k+1),b(n[void 0===f||f>=n.length?n.length-1:f-1]).after(n[r]),u()))}};p.msie&&8===p.msiever()&&(b.expr[":"].hidden=function(b){return 0===b.offsetWidth||0===b.offsetHeight||"none"===b.style.display});p._multiselect=!1;if(q){if(q.prototype._setSelected){var E=q.prototype._setSelected;
q.prototype._setSelected=function(a,l){var g=E.call(this,a,l),c=this.element;a=parseInt(a.data("optionLink").val(),10);l&&this.selectedList&&(D.call(this,a),this.selectedList.find("li").each(function(){b(this).data("optionLink")&&b(this).data("optionLink").remove().appendTo(c)}));return g}}q.prototype.destroy&&(q.prototype.destroy=function(){this.element.show();this.container.remove();void 0===b.Widget?b.widget.prototype.destroy.apply(this,arguments):b.Widget.prototype.destroy.apply(this,arguments)});
p._multiselect=!0}p.extend({sortableColumns:function(a){return this.each(function(){function l(){c.disableClick=!0}var g=this,c=g.p,k=x(c.id);if(c&&c.sortable&&b.isFunction(b.fn.sortable)){k={tolerance:"pointer",axis:"x",scrollSensitivity:"1",items:"\x3eth:not(:has(#jqgh_"+k+"_cb,#jqgh_"+k+"_rn,#jqgh_"+k+"_subgrid),:hidden)",placeholder:{element:function(a){return b(B.createElement(a[0].nodeName)).addClass(a[0].className+" ui-sortable-placeholder ui-state-highlight").removeClass("ui-sortable-helper")[0]},
update:function(b,a){a.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));a.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}},start:function(){g.grid.hDiv.scrollLeft=g.grid.bDiv.scrollLeft},update:function(a,d){a=b("\x3eth",b(d.item).parent());var e=c.id+"_",h=[];a.each(function(){var a=b("\x3ediv",this).get(0).id.replace(/^jqgh_/,
"").replace(e,""),a=c.iColByName[a];void 0!==a&&h.push(a)});b(g).jqGrid("remapColumns",h,!0,!0);b.isFunction(c.sortable.update)&&c.sortable.update(h);setTimeout(function(){c.disableClick=!1},50)}};c.sortable.options?b.extend(k,c.sortable.options):b.isFunction(c.sortable)&&(c.sortable={update:c.sortable});if(k.start){var d=k.start;k.start=function(b,a){l();d.call(this,b,a)}}else k.start=l;c.sortable.exclude&&(k.items+=":not("+c.sortable.exclude+")");k=a.sortable(k);k=k.data("sortable")||k.data("uiSortable")||
k.data("ui-sortable");null!=k&&(k.floating=!0)}})},columnChooser:function(a){function l(a,d){a&&("string"===typeof a?b.fn[a]&&b.fn[a].apply(d,b.makeArray(arguments).slice(2)):b.isFunction(a)&&a.apply(d,b.makeArray(arguments).slice(2)))}function g(){var b=C(m),a=b.container.closest(".ui-dialog-content");0




© 2015 - 2025 Weber Informatics LLC | Privacy Policy