@ntlab/ntjs-assets 2.36.0 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/js/cdn.json +1 -1
- package/assets/js/jqGrid/css/ui.jqgrid-bootstrap.css +32 -0
- package/assets/js/jqGrid/css/ui.jqgrid-bootstrap4.css +32 -1
- package/assets/js/jqGrid/css/ui.jqgrid-bootstrap5.css +63 -0
- package/assets/js/jqGrid/css/ui.jqgrid.css +147 -4
- package/assets/js/jqGrid/js/addons/old_css_def.js +150 -0
- package/assets/js/jqGrid/js/grid.base.js +261 -581
- package/assets/js/jqGrid/js/grid.clipboard.js +588 -0
- package/assets/js/jqGrid/js/grid.common.js +91 -9
- package/assets/js/jqGrid/js/grid.export.js +95 -27
- package/assets/js/jqGrid/js/grid.filter.js +4 -50
- package/assets/js/jqGrid/js/grid.formedit.js +4 -1
- package/assets/js/jqGrid/js/grid.frozenrows.js +39 -160
- package/assets/js/jqGrid/js/grid.grouping.js +35 -48
- package/assets/js/jqGrid/js/grid.pivot.js +38 -16
- package/assets/js/jqGrid/js/grid.subgrid.js +1 -1
- package/assets/js/jqGrid/js/i18n/grid.locale-ar.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-bg.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-ca.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-cn.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-cs.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-de.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-dk.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-el.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-en.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-es.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-fa.js +31 -3
- package/assets/js/jqGrid/js/i18n/grid.locale-fi.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-fr.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-gl.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-he.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-hr.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-hu.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-id.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-is.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-it.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-ja.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-kr.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-lt.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-me.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-nl.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-no.js +28 -1
- package/assets/js/jqGrid/js/i18n/grid.locale-pl.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-pt-br.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-pt.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-ro.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-ru.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-sk.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-sq.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-sr-latin.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-sr.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-sv.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-th.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-tr.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-tw.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-uk.js +28 -0
- package/assets/js/jqGrid/js/i18n/grid.locale-vi.js +28 -0
- package/assets/js/jqGrid/js/jquery.jqGrid.js +1142 -896
- package/assets/js/jqGrid/js/jquery.jqGrid.min.js +2 -2
- package/assets/js/jqGrid/js/jquery.jqGrid.min.js.map +1 -1
- package/assets/js/jqGrid/js/minified/grid.aria.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.base.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.celledit.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.clipboard.js +1 -0
- package/assets/js/jqGrid/js/minified/grid.common.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.database.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.export.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.filter.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.formedit.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.frozenrows.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.grouping.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.import.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.inlinedit.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.jqueryui.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.pivot.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.subgrid.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.transposed.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.treegrid.js +1 -1
- package/assets/js/jqGrid/js/minified/grid.utils.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-ar.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-bg.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-ca.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-cn.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-cs.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-de.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-dk.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-el.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-en.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-es.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-fa.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-fi.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-fr.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-gl.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-he.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-hr.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-hu.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-id.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-is.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-it.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-ja.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-kr.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-lt.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-me.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-nl.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-no.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-pl.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-pt-br.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-pt.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-ro.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-ru.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-sk.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-sq.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-sr-latin.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-sr.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-sv.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-th.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-tr.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-tw.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-uk.js +1 -1
- package/assets/js/jqGrid/js/minified/i18n/grid.locale-vi.js +1 -1
- package/assets/js/jqGrid/js/minified/jqDnR.js +1 -1
- package/assets/js/jqGrid/js/minified/jqModal.js +1 -1
- package/assets/js/jqGrid/js/minified/jquery.fmatter.js +1 -1
- package/assets/js/jqGrid/js/minified/jquery.sortable.js +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ if(!$.jgrid.hasOwnProperty("defaults")) {
|
|
|
19
19
|
$.jgrid.defaults = {};
|
|
20
20
|
}
|
|
21
21
|
$.extend($.jgrid,{
|
|
22
|
-
version : "5.8.
|
|
22
|
+
version : "5.8.9",
|
|
23
23
|
isNull : function( p, strict_eq) {
|
|
24
24
|
if(strict_eq && strict_eq === true) {
|
|
25
25
|
return p === null;
|
|
@@ -90,7 +90,7 @@ $.extend($.jgrid,{
|
|
|
90
90
|
return $.jgrid.msiever() > 0;
|
|
91
91
|
},
|
|
92
92
|
msiever : function () {
|
|
93
|
-
var rv =0,
|
|
93
|
+
var rv = 0,
|
|
94
94
|
sAgent = window.navigator.userAgent,
|
|
95
95
|
Idx = sAgent.indexOf("MSIE");
|
|
96
96
|
|
|
@@ -472,6 +472,7 @@ $.extend($.jgrid,{
|
|
|
472
472
|
_negate=false,
|
|
473
473
|
_queuedOperator="",
|
|
474
474
|
_sorting=[],
|
|
475
|
+
_this = "a_d_d_t_h_i_s",
|
|
475
476
|
_useProperties=true;
|
|
476
477
|
if(typeof d==="object"&&d.push) {
|
|
477
478
|
if(d.length>0){
|
|
@@ -704,8 +705,9 @@ $.extend($.jgrid,{
|
|
|
704
705
|
if(match === null){
|
|
705
706
|
return self;
|
|
706
707
|
}
|
|
708
|
+
const re = new RegExp(`${_this}`, 'g');
|
|
707
709
|
$.each(_data,function(){
|
|
708
|
-
if($.jgrid.runCode.call($t, match.replace(
|
|
710
|
+
if($.jgrid.runCode.call($t, match.replace(re, JSON.stringify(this)) ) ){ //eval(match)
|
|
709
711
|
results.push(this);
|
|
710
712
|
}
|
|
711
713
|
});
|
|
@@ -771,16 +773,16 @@ $.extend($.jgrid,{
|
|
|
771
773
|
return self.is(f);
|
|
772
774
|
};
|
|
773
775
|
this.is=function(f){
|
|
774
|
-
self._append(
|
|
776
|
+
self._append(_this+"."+f);
|
|
775
777
|
self._resetNegate();
|
|
776
778
|
return self;
|
|
777
779
|
};
|
|
778
780
|
this._compareValues=function(func,f,v,how,t){
|
|
779
781
|
var fld;
|
|
780
782
|
if(_useProperties){
|
|
781
|
-
fld='jQuery.jgrid.getAccessor(
|
|
783
|
+
fld='jQuery.jgrid.getAccessor('+_this+',\''+f+'\')';
|
|
782
784
|
}else{
|
|
783
|
-
fld=
|
|
785
|
+
fld=_this;
|
|
784
786
|
}
|
|
785
787
|
if(v===undefined) { v = null; }
|
|
786
788
|
//var val=v===null?f:v,
|
|
@@ -841,12 +843,12 @@ $.extend($.jgrid,{
|
|
|
841
843
|
this.startsWith=function(f,v){
|
|
842
844
|
//var val = $.jgrid.isNull(v) ? f: v,
|
|
843
845
|
//length=_trim ? $.jgrid.trim(val.toString()).length : val.toString().length;
|
|
844
|
-
if(_useProperties){
|
|
846
|
+
if(_useProperties ){
|
|
845
847
|
//self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.slice(0,'+length+') == '+self._getStr('"'+self._toStr(v)+'"'));
|
|
846
|
-
self._append(self._getStr('jQuery.jgrid.getAccessor(
|
|
848
|
+
self._append(self._getStr('jQuery.jgrid.getAccessor('+_this+',\''+f+'\')')+'.startsWith('+self._getStr('"'+self._toStr(v)+'"')+')');
|
|
847
849
|
}else{
|
|
848
850
|
//if ( !$.jgrid.isNull(v) ) { length=_trim?$.jgrid.trim(v.toString()).length:v.toString().length; }
|
|
849
|
-
self._append(self._getStr(
|
|
851
|
+
self._append(self._getStr(_this)+'.startsWith(' +self._getStr('"'+self._toStr(f)+'"')+')');
|
|
850
852
|
}
|
|
851
853
|
self._setCommand(self.startsWith,f);
|
|
852
854
|
self._resetNegate();
|
|
@@ -857,10 +859,10 @@ $.extend($.jgrid,{
|
|
|
857
859
|
//length=_trim ? $.jgrid.trim(val.toString()).length:val.toString().length;
|
|
858
860
|
if(_useProperties){
|
|
859
861
|
//self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.substr('+self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.length-'+length+','+length+') == "'+self._toStr(v)+'"');
|
|
860
|
-
self._append(self._getStr('jQuery.jgrid.getAccessor(
|
|
862
|
+
self._append(self._getStr('jQuery.jgrid.getAccessor('+_this+',\''+f+'\')')+'.endsWith('+self._getStr('"'+self._toStr(v)+'"')+')');
|
|
861
863
|
} else {
|
|
862
864
|
//self._append(self._getStr('this')+'.substr('+self._getStr('this')+'.length-"'+self._toStr(f)+'".length,"'+self._toStr(f)+'".length) == "'+self._toStr(f)+'"');
|
|
863
|
-
self._append(self._getStr(
|
|
865
|
+
self._append(self._getStr(_this)+'.endsWith(' +self._getStr('"'+self._toStr(f)+'"')+')');
|
|
864
866
|
}
|
|
865
867
|
self._setCommand(self.endsWith,f);
|
|
866
868
|
self._resetNegate();
|
|
@@ -868,9 +870,9 @@ $.extend($.jgrid,{
|
|
|
868
870
|
};
|
|
869
871
|
this.contains=function(f,v){
|
|
870
872
|
if(_useProperties){
|
|
871
|
-
self._append(self._getStr('jQuery.jgrid.getAccessor(
|
|
873
|
+
self._append(self._getStr('jQuery.jgrid.getAccessor('+_this+',\''+f+'\')')+'.indexOf("'+self._toStr(v)+'",0) > -1');
|
|
872
874
|
}else{
|
|
873
|
-
self._append(self._getStr(
|
|
875
|
+
self._append(self._getStr(_this)+'.indexOf("'+self._toStr(f)+'",0) > -1');
|
|
874
876
|
}
|
|
875
877
|
self._setCommand(self.contains,f);
|
|
876
878
|
self._resetNegate();
|
|
@@ -878,7 +880,7 @@ $.extend($.jgrid,{
|
|
|
878
880
|
};
|
|
879
881
|
this.user=function(op, f, v){
|
|
880
882
|
var _a = '$("#'+$t.p.id+'")[0]';
|
|
881
|
-
self._append(_a + '.p.customFilterDef.' + op + '.action.call('+_a+' ,{rowItem:
|
|
883
|
+
self._append(_a + '.p.customFilterDef.' + op + '.action.call('+_a+' ,{rowItem:'+_this+', searchName:"' + f + '",searchValue:"' + v + '"})');
|
|
882
884
|
self._setCommand(self.user,f);
|
|
883
885
|
self._resetNegate();
|
|
884
886
|
return self;
|
|
@@ -886,9 +888,9 @@ $.extend($.jgrid,{
|
|
|
886
888
|
this.inData = function (f, v, t) {
|
|
887
889
|
var vl = v === undefined ? "" : self._getStr("\"" + self._toStr(v) + "\"");
|
|
888
890
|
if( _useProperties ) {
|
|
889
|
-
self._append(vl + '.split(\''+',' + '\')' + '.indexOf( jQuery.jgrid.getAccessor(
|
|
891
|
+
self._append(vl + '.split(\''+',' + '\')' + '.indexOf( jQuery.jgrid.getAccessor('+_this+',\''+f+'\') ) > -1');
|
|
890
892
|
} else {
|
|
891
|
-
self._append(vl + '.split(\''+',' + '\')' + '.indexOf(
|
|
893
|
+
self._append(vl + '.split(\''+',' + '\')' + '.indexOf('+_this+'.'+f+') > -1');
|
|
892
894
|
}
|
|
893
895
|
self._setCommand(self.inData, f);
|
|
894
896
|
self._resetNegate();
|
|
@@ -1090,10 +1092,9 @@ $.extend($.jgrid,{
|
|
|
1090
1092
|
val = "";
|
|
1091
1093
|
}
|
|
1092
1094
|
if(tb.p.frozenColumns) {
|
|
1093
|
-
$(tb
|
|
1095
|
+
$(tb).jqGrid('destroyFrozenColumns');
|
|
1094
1096
|
frozen = true;
|
|
1095
1097
|
}
|
|
1096
|
-
|
|
1097
1098
|
if(!tb.p._ftsc) {
|
|
1098
1099
|
// store originally hidden columns
|
|
1099
1100
|
tb.p._ftsc = true;
|
|
@@ -1194,21 +1195,9 @@ $.extend($.jgrid,{
|
|
|
1194
1195
|
var swap = to_show.concat(_cnth);
|
|
1195
1196
|
|
|
1196
1197
|
$(tb).jqGrid('showCol',swap);
|
|
1197
|
-
if(
|
|
1198
|
-
|
|
1199
|
-
$(tb.grid.fbDiv).find(".jqgrid-searchcol >input#jqs_"+tb.p.id+"_"+rid).val("").focus().val(val);
|
|
1200
|
-
//}, 60);
|
|
1201
|
-
}
|
|
1202
|
-
if(tb.p.frozenRows) {
|
|
1203
|
-
if(frozen) { // for future processing
|
|
1204
|
-
tb.p.frozenColumns = false;
|
|
1205
|
-
}
|
|
1206
|
-
$(tb).trigger('jqGridAfterGridComplete.setFrozenRows');
|
|
1207
|
-
if(frozen) { // for future processing
|
|
1208
|
-
tb.p.frozenColumns = true;
|
|
1209
|
-
}
|
|
1198
|
+
if(frozen) { // for future processing
|
|
1199
|
+
$(tb).jqGrid('setFrozenColumns');
|
|
1210
1200
|
}
|
|
1211
|
-
|
|
1212
1201
|
/// let intersection = arrA.filter(x => arrB.includes(x));
|
|
1213
1202
|
/// let difference = arrA.filter(x => !arrB.includes(x));
|
|
1214
1203
|
/// let difference = arrA
|
|
@@ -1516,148 +1505,15 @@ $.extend($.jgrid,{
|
|
|
1516
1505
|
icon_oper_op : "ui-icon-transfer-e-w",
|
|
1517
1506
|
icon_reset : "ui-icon-arrowreturnthick-1-w",
|
|
1518
1507
|
icon_close : "ui-icon-close"
|
|
1519
|
-
}
|
|
1520
1508
|
},
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
hidden : "",
|
|
1530
|
-
icon_base : "glyphicon",
|
|
1531
|
-
overlay: "ui-overlay",
|
|
1532
|
-
active : "active",
|
|
1533
|
-
error : "bg-danger",
|
|
1534
|
-
button : "btn btn-default",
|
|
1535
|
-
content : "",
|
|
1536
|
-
shadow : ""
|
|
1537
|
-
},
|
|
1538
|
-
base : {
|
|
1539
|
-
entrieBox : "",
|
|
1540
|
-
viewBox : "table-responsive",
|
|
1541
|
-
headerTable : "table table-bordered",
|
|
1542
|
-
headerBox : "",
|
|
1543
|
-
rowTable : "table table-bordered",
|
|
1544
|
-
rowBox : "",
|
|
1545
|
-
stripedTable : "table-striped",
|
|
1546
|
-
footerTable : "table table-bordered",
|
|
1547
|
-
footerBox : "",
|
|
1548
|
-
headerRowTable : "table table-bordered",
|
|
1549
|
-
headerRowBox : "",
|
|
1550
|
-
headerDiv : "",
|
|
1551
|
-
gridtitleBox : "",
|
|
1552
|
-
customtoolbarBox : "",
|
|
1553
|
-
//overlayBox: "ui-overlay",
|
|
1554
|
-
loadingBox : "row",
|
|
1555
|
-
rownumBox : "active",
|
|
1556
|
-
scrollBox : "",
|
|
1557
|
-
multiBox : "checkbox",
|
|
1558
|
-
pagerBox : "",
|
|
1559
|
-
pagerTable : "table",
|
|
1560
|
-
toppagerBox : "",
|
|
1561
|
-
pgInput : "form-control",
|
|
1562
|
-
pgSelectBox : "form-control",
|
|
1563
|
-
pgButtonBox : "",
|
|
1564
|
-
icon_first : "glyphicon-step-backward",
|
|
1565
|
-
icon_prev : "glyphicon-backward",
|
|
1566
|
-
icon_next: "glyphicon-forward",
|
|
1567
|
-
icon_end: "glyphicon-step-forward",
|
|
1568
|
-
icon_asc : "glyphicon-triangle-top",
|
|
1569
|
-
icon_desc : "glyphicon-triangle-bottom",
|
|
1570
|
-
icon_caption_open : "glyphicon-circle-arrow-up",
|
|
1571
|
-
icon_caption_close : "glyphicon-circle-arrow-down"
|
|
1572
|
-
},
|
|
1573
|
-
modal : {
|
|
1574
|
-
modal : "modal",
|
|
1575
|
-
content :"modal-content",
|
|
1576
|
-
header : "modal-header",
|
|
1577
|
-
title : "modal-title",
|
|
1578
|
-
body :"modal-body",
|
|
1579
|
-
footer :"modal-footer",
|
|
1580
|
-
resizable : "ui-resizable-handle ui-resizable-se",
|
|
1581
|
-
icon_close : "glyphicon-remove-circle",
|
|
1582
|
-
icon_resizable : "glyphicon-import"
|
|
1583
|
-
},
|
|
1584
|
-
celledit : {
|
|
1585
|
-
inputClass : 'form-control',
|
|
1586
|
-
selectClass: 'form-control'
|
|
1587
|
-
},
|
|
1588
|
-
inlinedit : {
|
|
1589
|
-
inputClass : 'form-control',
|
|
1590
|
-
selectClass: 'form-control',
|
|
1591
|
-
icon_edit_nav : "glyphicon-edit",
|
|
1592
|
-
icon_add_nav : "glyphicon-plus",
|
|
1593
|
-
icon_save_nav : "glyphicon-save",
|
|
1594
|
-
icon_cancel_nav : "glyphicon-remove-circle"
|
|
1595
|
-
},
|
|
1596
|
-
formedit : {
|
|
1597
|
-
labelClass : "",
|
|
1598
|
-
inputClass : "form-control",
|
|
1599
|
-
selectClass: 'form-control',
|
|
1600
|
-
icon_prev : "glyphicon-step-backward",
|
|
1601
|
-
icon_next : "glyphicon-step-forward",
|
|
1602
|
-
icon_save : "glyphicon-save",
|
|
1603
|
-
icon_close : "glyphicon-remove-circle",
|
|
1604
|
-
icon_del : "glyphicon-trash",
|
|
1605
|
-
icon_cancel : "glyphicon-remove-circle"
|
|
1606
|
-
},
|
|
1607
|
-
navigator : {
|
|
1608
|
-
icon_edit_nav : "glyphicon-edit",
|
|
1609
|
-
icon_add_nav : "glyphicon-plus",
|
|
1610
|
-
icon_del_nav : "glyphicon-trash",
|
|
1611
|
-
icon_search_nav : "glyphicon-search",
|
|
1612
|
-
icon_refresh_nav : "glyphicon-refresh",
|
|
1613
|
-
icon_view_nav : "glyphicon-info-sign",
|
|
1614
|
-
icon_newbutton_nav : "glyphicon-new-window"
|
|
1615
|
-
},
|
|
1616
|
-
grouping : {
|
|
1617
|
-
icon_plus : 'glyphicon-triangle-right',
|
|
1618
|
-
icon_minus : 'glyphicon-triangle-bottom'
|
|
1619
|
-
},
|
|
1620
|
-
filter : {
|
|
1621
|
-
table_widget : 'table table-condensed',
|
|
1622
|
-
srSelect : 'form-control',
|
|
1623
|
-
srInput : 'form-control',
|
|
1624
|
-
menu_widget : '',
|
|
1625
|
-
icon_search : 'glyphicon-search',
|
|
1626
|
-
icon_reset : 'glyphicon-refresh',
|
|
1627
|
-
icon_query :'glyphicon-comment'
|
|
1628
|
-
},
|
|
1629
|
-
subgrid : {
|
|
1630
|
-
icon_plus : 'glyphicon-triangle-right',
|
|
1631
|
-
icon_minus : 'glyphicon-triangle-bottom',
|
|
1632
|
-
icon_open : 'glyphicon-indent-left'
|
|
1633
|
-
},
|
|
1634
|
-
treegrid : {
|
|
1635
|
-
icon_plus : 'glyphicon-triangle-right',
|
|
1636
|
-
icon_minus : 'glyphicon-triangle-bottom',
|
|
1637
|
-
icon_leaf : 'glyphicon-unchecked'
|
|
1638
|
-
},
|
|
1639
|
-
fmatter : {
|
|
1640
|
-
icon_edit : "glyphicon-edit",
|
|
1641
|
-
icon_add : "glyphicon-plus",
|
|
1642
|
-
icon_save : "glyphicon-save",
|
|
1643
|
-
icon_cancel : "glyphicon-remove-circle",
|
|
1644
|
-
icon_del : "glyphicon-trash"
|
|
1645
|
-
},
|
|
1646
|
-
colmenu : {
|
|
1647
|
-
menu_widget : '',
|
|
1648
|
-
input_checkbox : "",
|
|
1649
|
-
filter_select: "form-control",
|
|
1650
|
-
filter_input : "form-control",
|
|
1651
|
-
icon_menu : "glyphicon-menu-hamburger",
|
|
1652
|
-
icon_sort_asc : "glyphicon-sort-by-alphabet",
|
|
1653
|
-
icon_sort_desc : "glyphicon-sort-by-alphabet-alt",
|
|
1654
|
-
icon_columns : "glyphicon-list-alt",
|
|
1655
|
-
icon_filter : "glyphicon-filter",
|
|
1656
|
-
icon_group : "glyphicon-align-left",
|
|
1657
|
-
icon_freeze : "glyphicon-object-align-horizontal",
|
|
1658
|
-
icon_move: "glyphicon-move",
|
|
1659
|
-
icon_new_item : "glyphicon-new-window",
|
|
1660
|
-
icon_toolbar_menu : "glyphicon-menu-hamburger"
|
|
1509
|
+
clipboard : {
|
|
1510
|
+
icon_copy :"ui-icon-copy",
|
|
1511
|
+
icon_paste : "ui-icon-clipboard",
|
|
1512
|
+
icon_paste_add: "ui-icon-plusthick",
|
|
1513
|
+
icon_repeat_row :"ui-icon-arrow-1-s",
|
|
1514
|
+
icon_repeat_col :"ui-icon-arrow-1-e",
|
|
1515
|
+
icon_undo: "ui-icon-arrowreturn-1-w",
|
|
1516
|
+
icon_cancel : "ui-icon-cancel"
|
|
1661
1517
|
}
|
|
1662
1518
|
},
|
|
1663
1519
|
Bootstrap4 : {
|
|
@@ -1928,6 +1784,15 @@ $.extend($.jgrid,{
|
|
|
1928
1784
|
icon_oper_op : "",
|
|
1929
1785
|
icon_reset : "oi-reload",
|
|
1930
1786
|
icon_close : "oi-ban"
|
|
1787
|
+
},
|
|
1788
|
+
clipboard : {
|
|
1789
|
+
icon_copy :"oi-copy-outline",
|
|
1790
|
+
icon_paste : "oi-clipboard-outline",
|
|
1791
|
+
icon_paste_add: "oi-download-outline",
|
|
1792
|
+
icon_repeat_row :"oi-arrow-down-outline",
|
|
1793
|
+
icon_repeat_col :"oi-arrow-forward-outline",
|
|
1794
|
+
icon_undo: "oi-arrow-undo-outline",
|
|
1795
|
+
icon_cancel : "oi-exit-outline"
|
|
1931
1796
|
}
|
|
1932
1797
|
},
|
|
1933
1798
|
Octicons : {
|
|
@@ -2012,6 +1877,15 @@ $.extend($.jgrid,{
|
|
|
2012
1877
|
icon_oper_op : "",
|
|
2013
1878
|
icon_reset : "octicon-sync",
|
|
2014
1879
|
icon_close : "octicon-x"
|
|
1880
|
+
},
|
|
1881
|
+
clipboard : {
|
|
1882
|
+
icon_copy :"octicon-copy",
|
|
1883
|
+
icon_paste : "octicon-paste",
|
|
1884
|
+
icon_paste_add: "octicon-north-star",
|
|
1885
|
+
icon_repeat_row :"octicon-move-to-bottom",
|
|
1886
|
+
icon_repeat_col :"octicon-move-to-end",
|
|
1887
|
+
icon_undo: "octicon-undo",
|
|
1888
|
+
icon_cancel : "octicon-x"
|
|
2015
1889
|
}
|
|
2016
1890
|
},
|
|
2017
1891
|
fontAwesome : {
|
|
@@ -2097,6 +1971,15 @@ $.extend($.jgrid,{
|
|
|
2097
1971
|
icon_reset : "fa-reply",
|
|
2098
1972
|
icon_close : "fa-window-close"
|
|
2099
1973
|
|
|
1974
|
+
},
|
|
1975
|
+
clipboard : {
|
|
1976
|
+
icon_copy :"fa-copy",
|
|
1977
|
+
icon_paste : "fa-paste",
|
|
1978
|
+
icon_paste_add: "fa-plus",
|
|
1979
|
+
icon_repeat_row :"fa-arrow-down",
|
|
1980
|
+
icon_repeat_col :"fa-arrow-right",
|
|
1981
|
+
icon_undo: "fa-rotate-left",
|
|
1982
|
+
icon_cancel : "fa-xmark"
|
|
2100
1983
|
}
|
|
2101
1984
|
},
|
|
2102
1985
|
Bootstrap5 : {
|
|
@@ -2181,6 +2064,15 @@ $.extend($.jgrid,{
|
|
|
2181
2064
|
icon_oper_op : "",
|
|
2182
2065
|
icon_reset : "bi-arrow-clockwise",
|
|
2183
2066
|
icon_close : "bi-x-square"
|
|
2067
|
+
},
|
|
2068
|
+
clipboard : {
|
|
2069
|
+
icon_copy :"bi-clipboard-fill",
|
|
2070
|
+
icon_paste : "bi-clipboard",
|
|
2071
|
+
icon_paste_add: "bi-clipboard-plus",
|
|
2072
|
+
icon_repeat_row :"bi-arrow-bar-down",
|
|
2073
|
+
icon_repeat_col :"bi-arrow-bar-right",
|
|
2074
|
+
icon_undo: "bi-arrow-counterclockwise",
|
|
2075
|
+
icon_cancel : "bi-x"
|
|
2184
2076
|
}
|
|
2185
2077
|
}
|
|
2186
2078
|
}
|
|
@@ -2294,7 +2186,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2294
2186
|
nv:0,
|
|
2295
2187
|
loadui: "enable",
|
|
2296
2188
|
toolbar: [false,""],
|
|
2297
|
-
scroll: false,
|
|
2298
2189
|
deselectAfterSort : true,
|
|
2299
2190
|
scrollrows : false,
|
|
2300
2191
|
autowidth: false,
|
|
@@ -2319,7 +2210,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2319
2210
|
direction : "ltr",
|
|
2320
2211
|
toppager: false,
|
|
2321
2212
|
headertitles: false,
|
|
2322
|
-
scrollTimeout: 40,
|
|
2323
2213
|
data : [],
|
|
2324
2214
|
_index : {},
|
|
2325
2215
|
grouping : false,
|
|
@@ -2349,10 +2239,12 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2349
2239
|
minColWidth : 33,
|
|
2350
2240
|
minGridWidth : 100,
|
|
2351
2241
|
maxGridWidth : 3000,
|
|
2242
|
+
scroll: false,
|
|
2243
|
+
scrollTimeout: 300,
|
|
2352
2244
|
scrollPopUp : false,
|
|
2353
2245
|
scrollTopOffset: 0, // pixel
|
|
2354
2246
|
scrollLeftOffset : "100%", //percent
|
|
2355
|
-
scrollMaxBuffer :
|
|
2247
|
+
scrollMaxBuffer : 1,
|
|
2356
2248
|
storeNavOptions: false,
|
|
2357
2249
|
regional : "en",
|
|
2358
2250
|
styleUI : "jQueryUI",
|
|
@@ -2410,7 +2302,8 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2410
2302
|
reader : null,
|
|
2411
2303
|
beforeInsertData : null,
|
|
2412
2304
|
fetchOptions : {}
|
|
2413
|
-
}
|
|
2305
|
+
},
|
|
2306
|
+
isClipboard : false,
|
|
2414
2307
|
}, $.jgrid.defaults , pin );
|
|
2415
2308
|
if (localData !== undefined) {
|
|
2416
2309
|
p.data = localData;
|
|
@@ -2500,14 +2393,15 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2500
2393
|
if($.jgrid.isFunction(p.resizeStop)) { p.resizeStop.call(ts,nw,idx); }
|
|
2501
2394
|
}
|
|
2502
2395
|
if(p.frozenColumns && forceFrozen) {
|
|
2503
|
-
|
|
2504
|
-
|
|
2396
|
+
if(idx <= p.frozenColCount) {
|
|
2397
|
+
$("#"+$.jgrid.jqID(p.id)).jqGrid('refreshFrozenColumns');
|
|
2398
|
+
}
|
|
2505
2399
|
}
|
|
2506
2400
|
}
|
|
2507
2401
|
this.curGbox = null;
|
|
2508
2402
|
document.onselectstart=function(){return true;};
|
|
2509
2403
|
},
|
|
2510
|
-
populateVisible: function() {
|
|
2404
|
+
populateVisible : function() {
|
|
2511
2405
|
if (grid.timer) { clearTimeout(grid.timer); }
|
|
2512
2406
|
grid.timer = null;
|
|
2513
2407
|
var dh = $(grid.bDiv).height();
|
|
@@ -2534,7 +2428,7 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2534
2428
|
(p.lastpage===undefined||(parseInt((tbot + scrollTop + div - 1) / div,10) || 0) <= p.lastpage))
|
|
2535
2429
|
{
|
|
2536
2430
|
npage = parseInt((dh - tbot + div - 1) / div,10) || 1;
|
|
2537
|
-
if (tbot >= 0 || npage < 2
|
|
2431
|
+
if (tbot >= 0 || npage < 2) {
|
|
2538
2432
|
page = ( Math.round((tbot + scrollTop) / div) || 0) + 1;
|
|
2539
2433
|
ttop = -1;
|
|
2540
2434
|
} else {
|
|
@@ -2564,15 +2458,12 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2564
2458
|
}
|
|
2565
2459
|
if (empty) {
|
|
2566
2460
|
grid.selectionPreserver(table[0]);
|
|
2567
|
-
grid.emptyRows.call(table[0],
|
|
2461
|
+
grid.emptyRows.call(table[0], true, false);
|
|
2568
2462
|
}
|
|
2569
2463
|
grid.populate(npage);
|
|
2570
2464
|
}
|
|
2571
2465
|
if(p.scrollPopUp && !$.jgrid.isNull(p.lastpage)) {
|
|
2572
|
-
$("#scroll_g"+p.id).
|
|
2573
|
-
$(this).mouseout(function(){
|
|
2574
|
-
$("#scroll_g"+p.id).hide();
|
|
2575
|
-
});
|
|
2466
|
+
$("#scroll_g"+p.id).html( $.jgrid.template( $.jgrid.getRegional(ts, "defaults.pgtext", p.pgtext) , p.page, p.lastpage)).css({ "top": p.scrollTopOffset+scrollTop*((parseInt(p.height,10) - 45)/ (parseInt(rh,10)*parseInt(p.records,10))) +"px", "left" : p.scrollLeftOffset});
|
|
2576
2467
|
}
|
|
2577
2468
|
}
|
|
2578
2469
|
},
|
|
@@ -2588,6 +2479,9 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2588
2479
|
if (grid.timer) { clearTimeout(grid.timer); }
|
|
2589
2480
|
grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
|
|
2590
2481
|
}
|
|
2482
|
+
if(p.scrollPopUp && !$.jgrid.isNull(p.lastpage)) {
|
|
2483
|
+
$("#scroll_g"+p.id).show();
|
|
2484
|
+
}
|
|
2591
2485
|
}
|
|
2592
2486
|
grid.hDiv.scrollLeft = grid.bDiv.scrollLeft;
|
|
2593
2487
|
if(p.footerrow) {
|
|
@@ -2596,9 +2490,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2596
2490
|
if(p.headerrow) {
|
|
2597
2491
|
grid.hrDiv.scrollLeft = grid.bDiv.scrollLeft;
|
|
2598
2492
|
}
|
|
2599
|
-
if(p.frozenColumns) {
|
|
2600
|
-
$(grid.fbDiv).scrollTop( grid.bDiv.scrollTop );
|
|
2601
|
-
}
|
|
2602
2493
|
try {
|
|
2603
2494
|
$("#column_menu").remove();
|
|
2604
2495
|
} catch (e) {}
|
|
@@ -2809,9 +2700,9 @@ $.fn.jqGrid = function( pin ) {
|
|
|
2809
2700
|
},
|
|
2810
2701
|
reader = function (datatype) {
|
|
2811
2702
|
var field, f=[], j=0, i;
|
|
2812
|
-
for(i =0; i<ts.p.colModel.length; i++){
|
|
2703
|
+
for(i = 0; i < ts.p.colModel.length; i++){
|
|
2813
2704
|
field = ts.p.colModel[i];
|
|
2814
|
-
if (field
|
|
2705
|
+
if ( Object.hasOwn(field, "name") && !$.jgrid.isServiceCol(field.name) ) {
|
|
2815
2706
|
f[j]= datatype === "local" ?
|
|
2816
2707
|
field.name :
|
|
2817
2708
|
( (datatype==="xml" || datatype === "xmlstring") ? field.xmlmap || field.name : field.jsonmap || field.name );
|
|
@@ -4186,7 +4077,9 @@ $.fn.jqGrid = function( pin ) {
|
|
|
4186
4077
|
if(lc) { lc.call(ts,req); }
|
|
4187
4078
|
$(ts).triggerHandler("jqGridAfterLoadComplete", [req]);
|
|
4188
4079
|
if (pvis) { ts.grid.populateVisible(); }
|
|
4080
|
+
if (npage === 1) {
|
|
4189
4081
|
endReq();
|
|
4082
|
+
}
|
|
4190
4083
|
ts.p._ald = false;
|
|
4191
4084
|
break;
|
|
4192
4085
|
case "indexeddb":
|
|
@@ -4214,10 +4107,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
4214
4107
|
},
|
|
4215
4108
|
setHeadCheckBox = function ( checked ) {
|
|
4216
4109
|
$('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.hDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
|
|
4217
|
-
var fid = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
|
|
4218
|
-
if(fid) {
|
|
4219
|
-
$('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.fhDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
|
|
4220
|
-
}
|
|
4221
4110
|
},
|
|
4222
4111
|
setPager = function (pgid, tp){
|
|
4223
4112
|
// TBD - consider escaping pgid with pgid = $.jgrid.jqID(pgid);
|
|
@@ -4404,10 +4293,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
4404
4293
|
var cm = ts.p.colModel,selarr =[],
|
|
4405
4294
|
/*ts.p.frozenColumns ? (ts.p.autoResizing ? ts.grid.headers[iCol].el : obj) :*/ so="", sn;
|
|
4406
4295
|
selarr.push(ts.grid.headers[iCol].el);
|
|
4407
|
-
if(ts.p.frozenColumns) {
|
|
4408
|
-
selarr.push(obj);
|
|
4409
|
-
}
|
|
4410
|
-
|
|
4411
4296
|
$("span.ui-grid-ico-sort",selarr).addClass(disabled);
|
|
4412
4297
|
$(selarr).attr({"aria-selected":"false","aria-sort" : "none"});
|
|
4413
4298
|
sn = (cm[iCol].index || cm[iCol].name);
|
|
@@ -4500,7 +4385,7 @@ $.fn.jqGrid = function( pin ) {
|
|
|
4500
4385
|
ts.p.sortorder = sor;
|
|
4501
4386
|
}
|
|
4502
4387
|
var previousSelectedTh = ts.grid.headers[ts.p.lastsort] ? ts.grid.headers[ts.p.lastsort].el : null, newSelectedTh = /*ts.p.frozenColumns ? obj :*/ ts.grid.headers[idxcol].el,
|
|
4503
|
-
newSelThFC = ts.p.frozenColumns ? obj : null,
|
|
4388
|
+
// newSelThFC = ts.p.frozenColumns ? obj : null,
|
|
4504
4389
|
//sortrule = $.trim(ts.p.viewsortcols[1] === 'single' ? hidden : disabled);
|
|
4505
4390
|
usehide = ts.p.viewsortcols[1] === 'single' ? true : false, tmpicon;
|
|
4506
4391
|
tmpicon = $(previousSelectedTh).find("span.ui-grid-ico-sort");
|
|
@@ -4509,33 +4394,14 @@ $.fn.jqGrid = function( pin ) {
|
|
|
4509
4394
|
$(tmpicon).css("display","none");
|
|
4510
4395
|
}
|
|
4511
4396
|
$(previousSelectedTh).attr({"aria-selected":"false","aria-sort" : "none"});
|
|
4512
|
-
if(ts.p.frozenColumns) {
|
|
4513
|
-
tmpicon = ts.grid.fhDiv.find("span.ui-grid-ico-sort");
|
|
4514
|
-
tmpicon.addClass(disabled);
|
|
4515
|
-
if(usehide) { tmpicon.css("display","none"); }
|
|
4516
|
-
ts.grid.fhDiv.find("th").attr({"aria-selected":"false","aria-sort" : "none"});
|
|
4517
|
-
}
|
|
4518
4397
|
tmpicon = $(newSelectedTh).find("span.ui-icon-"+ts.p.sortorder);
|
|
4519
4398
|
tmpicon.removeClass(disabled);
|
|
4520
4399
|
if(usehide) { tmpicon.css("display",""); }
|
|
4521
4400
|
$(newSelectedTh).attr({"aria-selected":"true","aria-sort" : ts.p.sortorder + "ending"});
|
|
4522
|
-
if(ts.p.frozenColumns) {
|
|
4523
|
-
tmpicon = $(newSelThFC).find("span.ui-icon-"+ts.p.sortorder);
|
|
4524
|
-
tmpicon.removeClass(disabled);
|
|
4525
|
-
if(usehide) { tmpicon.css("display",""); }
|
|
4526
|
-
$(newSelThFC).attr({"aria-selected":"true","aria-sort" : ts.p.sortorder + "ending"});
|
|
4527
|
-
|
|
4528
|
-
}
|
|
4529
4401
|
if(!ts.p.viewsortcols[0]) {
|
|
4530
4402
|
if(ts.p.lastsort !== idxcol) {
|
|
4531
|
-
if(ts.p.frozenColumns){
|
|
4532
|
-
ts.grid.fhDiv.find("span.s-ico").hide();
|
|
4533
|
-
}
|
|
4534
4403
|
$("span.s-ico",previousSelectedTh).hide();
|
|
4535
4404
|
$("span.s-ico",newSelectedTh).show();
|
|
4536
|
-
if(newSelThFC) {
|
|
4537
|
-
$("span.s-ico",newSelThFC).show();
|
|
4538
|
-
}
|
|
4539
4405
|
} else if (ts.p.sortname === "") { // if ts.p.lastsort === idxcol but ts.p.sortname === ""
|
|
4540
4406
|
$("span.s-ico",newSelectedTh).show();
|
|
4541
4407
|
}
|
|
@@ -5047,10 +4913,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5047
4913
|
ts.p.colMenuBeforeProcess.call(ts, { module: 'grouping', action : (isgroup !== -1? 'ungroup' : 'group'), column : cm.name});
|
|
5048
4914
|
}
|
|
5049
4915
|
$(ts).jqGrid('groupingGroupBy', group.groupField );
|
|
5050
|
-
if(ts.p.frozenColumns) {
|
|
5051
|
-
$(ts).jqGrid("destroyFrozenColumns");
|
|
5052
|
-
$(ts).jqGrid("setFrozenColumns");
|
|
5053
|
-
}
|
|
5054
4916
|
},
|
|
5055
4917
|
buildFreeze = function( index, isfreeze ) {
|
|
5056
4918
|
var cols = [], i, len = ts.p.colModel.length, lastfrozen = -1, cm = ts.p.colModel;
|
|
@@ -5299,7 +5161,7 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5299
5161
|
ts.p.sortorder = ts.p.sortorder.toLowerCase();
|
|
5300
5162
|
$.jgrid.cell_width = $.jgrid.cellWidth();
|
|
5301
5163
|
// calculate cellLayout
|
|
5302
|
-
var bstw2 = $("<table style='visibility:hidden'><tr class='jqgrow'><td>1</td></tr></table
|
|
5164
|
+
var bstw2 = $("<table style='visibility:hidden'><tr class='jqgrow'><td>1</td></tr></table>").addClass(getstyle(stylemodule,"rowTable", true, 'ui-jqgrid-btable ui-common-table'));
|
|
5303
5165
|
$(eg).append(bstw2);
|
|
5304
5166
|
ts.p.cellLayout = $.jgrid.floatNum( $("td", bstw2).css('padding-left')) + $.jgrid.floatNum($("td", bstw2).css('padding-right'), 10) + 1;
|
|
5305
5167
|
if(ts.p.cellLayout <=0 ) {
|
|
@@ -5463,7 +5325,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5463
5325
|
if(!ts.p.preserveSelection) {
|
|
5464
5326
|
ts.p.selarrrow = [];
|
|
5465
5327
|
}
|
|
5466
|
-
var froz = ts.p.frozenColumns === true ? ts.p.id + "_frozen" : "";
|
|
5467
5328
|
if (this.checked) {
|
|
5468
5329
|
$(ts.rows).each(function(i) {
|
|
5469
5330
|
if (i>0) {
|
|
@@ -5478,10 +5339,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5478
5339
|
ts.p.selarrrow.push(this.id);
|
|
5479
5340
|
}
|
|
5480
5341
|
ts.p.selrow = this.id;
|
|
5481
|
-
if(froz) {
|
|
5482
|
-
$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",true);
|
|
5483
|
-
$("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).addClass(highlight);
|
|
5484
|
-
}
|
|
5485
5342
|
}
|
|
5486
5343
|
}
|
|
5487
5344
|
});
|
|
@@ -5501,10 +5358,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5501
5358
|
ts.p.selarrrow.splice(curind, 1);
|
|
5502
5359
|
}
|
|
5503
5360
|
}
|
|
5504
|
-
if(froz) {
|
|
5505
|
-
$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",false);
|
|
5506
|
-
$("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).removeClass(highlight);
|
|
5507
|
-
}
|
|
5508
5361
|
}
|
|
5509
5362
|
}
|
|
5510
5363
|
});
|
|
@@ -5523,7 +5376,10 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5523
5376
|
bstw2 = ts.p.styleUI.search('Bootstrap') !== -1;
|
|
5524
5377
|
$(eg).css("width",grid.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+ts.p.id+"'> </div>");
|
|
5525
5378
|
if(ts.p.scrollPopUp) {
|
|
5526
|
-
$(eg).append("<div "+ getstyle(stylemodule, 'scrollBox', false, 'loading ui-scroll-popup')+" id='scroll_g"+ts.p.id+"'></div>")
|
|
5379
|
+
$(eg).append("<div "+ getstyle(stylemodule, 'scrollBox', false, 'loading ui-scroll-popup')+" id='scroll_g"+ts.p.id+"'></div>")
|
|
5380
|
+
.mouseout(function(){
|
|
5381
|
+
$("#scroll_g"+p.id).hide();
|
|
5382
|
+
});
|
|
5527
5383
|
}
|
|
5528
5384
|
$(gv).css("width",grid.width+"px");
|
|
5529
5385
|
thead = $(ts).find("thead").first().get(0);
|
|
@@ -5644,18 +5500,11 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5644
5500
|
ts.p.disableClick = false;
|
|
5645
5501
|
return false;
|
|
5646
5502
|
}
|
|
5647
|
-
var s = "th>div.ui-th-div",r,d;
|
|
5503
|
+
var s = "th>div.ui-th-div",r,d,sh;
|
|
5648
5504
|
if (!ts.p.viewsortcols[2]) { s = "th>div>span>span.ui-grid-ico-sort"; }
|
|
5649
5505
|
var t = $(e.target).closest(s);
|
|
5650
5506
|
if (t.length !== 1) { return; }
|
|
5651
|
-
var ci;
|
|
5652
|
-
if(ts.p.frozenColumns) {
|
|
5653
|
-
var tid = $(this)[0].id.substring( ts.p.id.length + 1 );
|
|
5654
|
-
ci = $.jgrid.getElemByAttrVal(ts.p.colModel, 'name', tid, true);
|
|
5655
|
-
} else {
|
|
5656
|
-
ci = getColumnHeaderIndex(this);
|
|
5657
|
-
}
|
|
5658
|
-
//
|
|
5507
|
+
var ci = getColumnHeaderIndex(this);
|
|
5659
5508
|
if($(e.target).hasClass('colmenuspan')) {
|
|
5660
5509
|
if( !$.jgrid.isNull($("#column_menu")[0]) ) {
|
|
5661
5510
|
$("#column_menu").remove();
|
|
@@ -5678,7 +5527,8 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5678
5527
|
}
|
|
5679
5528
|
//
|
|
5680
5529
|
if (!ts.p.viewsortcols[2]) { r=true;d=t.attr("sort"); }
|
|
5681
|
-
|
|
5530
|
+
sh = $.jgrid.type(ts.p.colModel[ci].sortInHeader) !== 'boolean'? true : ts.p.colModel[ci].sortInHeader
|
|
5531
|
+
if( !$.jgrid.isNull(ci) && sh){
|
|
5682
5532
|
sortData( $('div',this)[0].id, ci, r, d, this);
|
|
5683
5533
|
}
|
|
5684
5534
|
// added aria grid
|
|
@@ -5759,17 +5609,12 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5759
5609
|
$(ts).triggerHandler("jqGridSelectRow", [ri, false, e]);
|
|
5760
5610
|
if( ts.p.onSelectRow) { ts.p.onSelectRow.call(ts, ri, false, e); }
|
|
5761
5611
|
} else {
|
|
5762
|
-
var frz = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
|
|
5763
5612
|
$(ts.p.selarrrow).each(function(i,n){
|
|
5764
5613
|
var trid = $(ts).jqGrid('getGridRowById',n);
|
|
5765
5614
|
if(trid) {
|
|
5766
5615
|
$( trid ).removeClass(highlight);
|
|
5767
5616
|
}
|
|
5768
5617
|
$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n))[ts.p.useProp ? 'prop': 'attr']("checked", false);
|
|
5769
|
-
if(frz) {
|
|
5770
|
-
$("#"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz)).removeClass(highlight);
|
|
5771
|
-
$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz))[ts.p.useProp ? 'prop': 'attr']("checked", false);
|
|
5772
|
-
}
|
|
5773
5618
|
});
|
|
5774
5619
|
ts.p.selarrrow = [];
|
|
5775
5620
|
$(ts).jqGrid("setSelection", ri, selection, e);
|
|
@@ -5953,7 +5798,7 @@ $.fn.jqGrid = function( pin ) {
|
|
|
5953
5798
|
td = e.target;
|
|
5954
5799
|
ptr = $(td,ts.rows).closest("tr.jqgrow");
|
|
5955
5800
|
if($(ptr).length === 0 ){return;}
|
|
5956
|
-
if(!ts.p.multiselect) {
|
|
5801
|
+
if(!ts.p.multiselect && !ts.p.isClipboard) { $(ts).jqGrid("setSelection",ptr[0].id,true,e); }
|
|
5957
5802
|
ri = ptr[0].rowIndex;
|
|
5958
5803
|
ci = $.jgrid.getCellIndex(td);
|
|
5959
5804
|
var rcr = $(ts).triggerHandler("jqGridRightClickRow", [$(ptr).attr("id"),ri,ci,e]);
|
|
@@ -6129,7 +5974,7 @@ $.fn.jqGrid = function( pin ) {
|
|
|
6129
5974
|
gridhbox = $(grid.hDiv).find("div").first();
|
|
6130
5975
|
//ts.p.scrollOffset = vScrollWidth;
|
|
6131
5976
|
// for future implementation
|
|
6132
|
-
if( vScrollWidth > 0 ) vScrollWidth +=
|
|
5977
|
+
if( vScrollWidth > 0 ) vScrollWidth += 1;
|
|
6133
5978
|
if (gridhbox.hasClass("ui-jqgrid-hbox-rtl")) {
|
|
6134
5979
|
$(grid.hDiv).find("div").first().css({paddingLeft: vScrollWidth + "px"});
|
|
6135
5980
|
}
|
|
@@ -6138,9 +5983,9 @@ $.fn.jqGrid = function( pin ) {
|
|
|
6138
5983
|
}
|
|
6139
5984
|
if(ts.p.autoResizing) {
|
|
6140
5985
|
$(ts).on('jqGridAfterGridComplete.setAutoSizeColumns',function(){
|
|
6141
|
-
var arfrozen = false
|
|
5986
|
+
var arfrozen = false; //, focused = false;
|
|
6142
5987
|
if(ts.p.frozenColumns === true) {
|
|
6143
|
-
focused = $(':focus', '.frozen-div').attr("id");
|
|
5988
|
+
//focused = $(':focus', '.frozen-div').attr("id");
|
|
6144
5989
|
$(ts).jqGrid("destroyFrozenColumns");
|
|
6145
5990
|
arfrozen = true;
|
|
6146
5991
|
}
|
|
@@ -6162,11 +6007,6 @@ $.fn.jqGrid = function( pin ) {
|
|
|
6162
6007
|
}
|
|
6163
6008
|
if(arfrozen) {
|
|
6164
6009
|
$(ts).jqGrid("setFrozenColumns");
|
|
6165
|
-
if(focused) {
|
|
6166
|
-
setTimeout(function(){
|
|
6167
|
-
$("#"+focused, '.frozen-div').trigger('focus');
|
|
6168
|
-
},10);
|
|
6169
|
-
}
|
|
6170
6010
|
}
|
|
6171
6011
|
});
|
|
6172
6012
|
}
|
|
@@ -6331,17 +6171,7 @@ $.jgrid.extend({
|
|
|
6331
6171
|
scrGrid(ner);
|
|
6332
6172
|
}
|
|
6333
6173
|
}
|
|
6334
|
-
if($t.p.frozenColumns === true ) {
|
|
6335
|
-
fid = $t.p.id+"_frozen";
|
|
6336
|
-
}
|
|
6337
|
-
if($t.p.frozenRows === true ) {
|
|
6338
|
-
tfid = $t.p.id+"_fr";
|
|
6339
|
-
}
|
|
6340
|
-
|
|
6341
6174
|
if(!$t.p.multiselect) {
|
|
6342
|
-
if(tfid) {
|
|
6343
|
-
$("#"+$.jgrid.jqID($t.p.selrow), "#"+$.jgrid.jqID(tfid)).removeClass(highlight);
|
|
6344
|
-
}
|
|
6345
6175
|
if(pt.className !== "ui-subgrid") {
|
|
6346
6176
|
if( $t.p.selrow !== pt.id ) {
|
|
6347
6177
|
if( isHight ) {
|
|
@@ -6350,10 +6180,6 @@ $.jgrid.extend({
|
|
|
6350
6180
|
$( csr ).removeClass(highlight).attr({"aria-selected":"false" , "tabindex" : "-1"});
|
|
6351
6181
|
}
|
|
6352
6182
|
$(pt).addClass(highlight).attr({"aria-selected":"true" ,"tabindex" : "0"});//.focus();
|
|
6353
|
-
if(fid) {
|
|
6354
|
-
$("#"+$.jgrid.jqID($t.p.selrow), "#"+$.jgrid.jqID(fid)).removeClass(highlight);
|
|
6355
|
-
$("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).addClass(highlight);
|
|
6356
|
-
}
|
|
6357
6183
|
}
|
|
6358
6184
|
stat = true;
|
|
6359
6185
|
} else {
|
|
@@ -6386,16 +6212,6 @@ $.jgrid.extend({
|
|
|
6386
6212
|
$t.p.selrow = (tpsr === undefined) ? null : tpsr;
|
|
6387
6213
|
}
|
|
6388
6214
|
$("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(pt.id))[$t.p.useProp ? 'prop': 'attr']("checked",stat);
|
|
6389
|
-
if(fid) {
|
|
6390
|
-
if(isHight) {
|
|
6391
|
-
if(ia === -1) {
|
|
6392
|
-
$("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).addClass(highlight);
|
|
6393
|
-
} else {
|
|
6394
|
-
$("#"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid)).removeClass(highlight);
|
|
6395
|
-
}
|
|
6396
|
-
}
|
|
6397
|
-
$("#jqg_"+$.jgrid.jqID($t.p.id)+"_"+$.jgrid.jqID(selection), "#"+$.jgrid.jqID(fid))[$t.p.useProp ? 'prop': 'attr']("checked",stat);
|
|
6398
|
-
}
|
|
6399
6215
|
if( onsr ) {
|
|
6400
6216
|
$($t).triggerHandler("jqGridSelectRow", [pt.id, stat, e]);
|
|
6401
6217
|
if( $t.p.onSelectRow) { $t.p.onSelectRow.call($t, pt.id , stat, e); }
|
|
@@ -6412,16 +6228,12 @@ $.jgrid.extend({
|
|
|
6412
6228
|
getstyle = $.jgrid.getMethod("getStyleUI"),
|
|
6413
6229
|
highlight = getstyle(t.p.styleUI+'.common','highlight', true),
|
|
6414
6230
|
hover = getstyle(t.p.styleUI+'.common','hover', true);
|
|
6415
|
-
if( t.p.frozenColumns === true ) {
|
|
6416
|
-
fid = t.p.id+"_frozen";
|
|
6417
|
-
}
|
|
6418
6231
|
if(rowid !== undefined ) {
|
|
6419
6232
|
sr = rowid === t.p.selrow ? t.p.selrow : rowid;
|
|
6420
6233
|
$("#"+$.jgrid.jqID(t.p.id)+" tbody").first().find("tr#"+$.jgrid.jqID(sr)).removeClass( highlight ).attr("aria-selected","false");
|
|
6421
6234
|
if (fid) { $("#"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(fid)).removeClass( highlight ); }
|
|
6422
6235
|
if(t.p.multiselect) {
|
|
6423
6236
|
$("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(t.p.id))[t.p.useProp ? 'prop': 'attr']("checked",false);
|
|
6424
|
-
if(fid) { $("#jqg_"+$.jgrid.jqID(t.p.id)+"_"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID(fid))[t.p.useProp ? 'prop': 'attr']("checked",false); }
|
|
6425
6237
|
t.setHeadCheckBox( false);
|
|
6426
6238
|
var ia = $.inArray($.jgrid.jqID(sr), t.p.selarrrow);
|
|
6427
6239
|
if ( ia !== -1 ){
|
|
@@ -6433,7 +6245,6 @@ $.jgrid.extend({
|
|
|
6433
6245
|
} else if(!t.p.multiselect) {
|
|
6434
6246
|
if(t.p.selrow) {
|
|
6435
6247
|
$("#"+$.jgrid.jqID(t.p.id)+" tbody").first().find("tr#"+$.jgrid.jqID(t.p.selrow)).removeClass( highlight ).attr("aria-selected","false");
|
|
6436
|
-
if(fid) { $("#"+$.jgrid.jqID(t.p.selrow), "#"+$.jgrid.jqID(fid)).removeClass( highlight ); }
|
|
6437
6248
|
if( t.p.onUnSelectRow) { t.p.onUnSelectRow.call(t, t.p.selrow ); }
|
|
6438
6249
|
t.p.selrow = null;
|
|
6439
6250
|
}
|
|
@@ -6499,7 +6310,7 @@ $.jgrid.extend({
|
|
|
6499
6310
|
} else {
|
|
6500
6311
|
$(ind).children('td[role="gridcell"]').each( function(i) {
|
|
6501
6312
|
nm = $t.p.colModel[i].name;
|
|
6502
|
-
if (
|
|
6313
|
+
if ( !$.jgrid.isServiceCol( nm ) ) {
|
|
6503
6314
|
if($t.p.treeGrid===true && nm === $t.p.ExpandColumn) {
|
|
6504
6315
|
res[nm] = $.jgrid.htmlDecode( $(this).find("span").first().html() );
|
|
6505
6316
|
} else {
|
|
@@ -6551,9 +6362,6 @@ $.jgrid.extend({
|
|
|
6551
6362
|
$t.p.reccount--;
|
|
6552
6363
|
$t.updatepager(true,false);
|
|
6553
6364
|
success=true;
|
|
6554
|
-
if($t.p.frozenColumns) {
|
|
6555
|
-
$("#" + rowid, "#" + $.jgrid.jqID($t.p.id + "_frozen")).remove();
|
|
6556
|
-
}
|
|
6557
6365
|
if($t.p.multiselect) {
|
|
6558
6366
|
ia = $.inArray(rowid,$t.p.selarrrow);
|
|
6559
6367
|
if(ia !== -1) { $t.p.selarrrow.splice(ia,1);}
|
|
@@ -6576,12 +6384,15 @@ $.jgrid.extend({
|
|
|
6576
6384
|
});
|
|
6577
6385
|
return success;
|
|
6578
6386
|
},
|
|
6579
|
-
setRowData : function(rowid, data, cssp, usegetrow) {
|
|
6387
|
+
setRowData : function(rowid, data, cssp, usegetrow, skipformatter) {
|
|
6580
6388
|
var nm, success=true;
|
|
6581
6389
|
this.each(function(){
|
|
6582
6390
|
if(!this.grid) {return false;}
|
|
6583
6391
|
var t = this, vl, ind, lcdata={}, jsondat, title;
|
|
6584
6392
|
ind = $(this).jqGrid('getGridRowById', rowid);
|
|
6393
|
+
if( $.jgrid.type(skipformatter) !== 'boolean') {
|
|
6394
|
+
skipformatter = false;
|
|
6395
|
+
}
|
|
6585
6396
|
if(!ind) {
|
|
6586
6397
|
return false;
|
|
6587
6398
|
}
|
|
@@ -6598,7 +6409,7 @@ $.jgrid.extend({
|
|
|
6598
6409
|
var dval =$.jgrid.getAccessor(data,nm);
|
|
6599
6410
|
if( dval !== undefined) {
|
|
6600
6411
|
lcdata[nm] = dval; //this.formatter && typeof this.formatter === 'string' && this.formatter === 'date' ? $.unformat.date.call(t,dval,this) : dval;
|
|
6601
|
-
vl = t.formatter( rowid, lcdata[nm], i, data, 'edit');
|
|
6412
|
+
vl = !skipformatter ? t.formatter( rowid, lcdata[nm], i, data, 'edit') : dval;
|
|
6602
6413
|
title = this.title ? {"title":$.jgrid.stripHtml(vl)} : {};
|
|
6603
6414
|
|
|
6604
6415
|
if(t.p.treeGrid===true && nm === t.p.ExpandColumn) {
|
|
@@ -6606,9 +6417,6 @@ $.jgrid.extend({
|
|
|
6606
6417
|
} else {
|
|
6607
6418
|
$("td[role='gridcell']",ind).eq(i).html(vl).attr(title);
|
|
6608
6419
|
}
|
|
6609
|
-
if(t.p.frozenColumns && i <= t.p.frozenColCount) {
|
|
6610
|
-
$("#"+rowid+" td[role='gridcell']", "#" + $.jgrid.jqID(t.p.id + "_frozen")).eq(i).html(vl).attr(title);
|
|
6611
|
-
}
|
|
6612
6420
|
}
|
|
6613
6421
|
});
|
|
6614
6422
|
if(t.p.datatype === 'local') {
|
|
@@ -6641,7 +6449,7 @@ $.jgrid.extend({
|
|
|
6641
6449
|
});
|
|
6642
6450
|
return success;
|
|
6643
6451
|
},
|
|
6644
|
-
addRowData : function(rowid,rdata,pos,src) {
|
|
6452
|
+
addRowData : function(rowid, rdata, pos, src, addclass) {
|
|
6645
6453
|
if($.inArray( pos, ["first", "last", "before", "after"] ) === -1) {pos = "last";}
|
|
6646
6454
|
var success = false, nm, row, rnc="", msc="", gi, si, ni,sind, i, v, prp="", aradd, cnm, data, cm, id;
|
|
6647
6455
|
if(rdata) {
|
|
@@ -6659,16 +6467,19 @@ $.jgrid.extend({
|
|
|
6659
6467
|
gi = t.p.multiselect ===true ? 1 :0;
|
|
6660
6468
|
si = t.p.subGrid===true ? 1 :0;
|
|
6661
6469
|
if(!aradd) {
|
|
6662
|
-
if(rowid
|
|
6663
|
-
|
|
6470
|
+
if(rowid != null) {
|
|
6471
|
+
rowid = String(rowid);
|
|
6472
|
+
} else {
|
|
6664
6473
|
rowid = $.jgrid.randId();
|
|
6665
6474
|
if(t.p.keyName !== false) {
|
|
6666
6475
|
cnm = t.p.keyName;
|
|
6667
|
-
if(rdata[0][cnm] !== undefined) {
|
|
6476
|
+
if(rdata[0][cnm] !== undefined) {
|
|
6477
|
+
rowid = rdata[0][cnm];
|
|
6668
6478
|
}
|
|
6669
6479
|
}
|
|
6670
6480
|
}
|
|
6671
|
-
|
|
6481
|
+
}
|
|
6482
|
+
var k = 0, classes = $(t).jqGrid('getStyleUI',t.p.styleUI+".base",'rowBox', true, 'jqgrow ui-row-'+ t.p.direction) + " " + (addclass || ""), lcdata = {},
|
|
6672
6483
|
air = $.jgrid.isFunction(t.p.afterInsertRow) ? true : false;
|
|
6673
6484
|
if(ni) {
|
|
6674
6485
|
rnc = $(t).jqGrid('getStyleUI',t.p.styleUI+".base",'rownumBox', false, 'jqgrid-rownum');
|
|
@@ -6686,11 +6497,13 @@ $.jgrid.extend({
|
|
|
6686
6497
|
rowid = $.jgrid.randId();
|
|
6687
6498
|
}
|
|
6688
6499
|
}
|
|
6689
|
-
catch (e) {
|
|
6500
|
+
catch (e) {
|
|
6501
|
+
rowid = $.jgrid.randId();
|
|
6502
|
+
}
|
|
6690
6503
|
}
|
|
6691
6504
|
id = rowid;
|
|
6692
6505
|
rowid = t.p.idPrefix + rowid;
|
|
6693
|
-
if(ni){
|
|
6506
|
+
if(ni) {
|
|
6694
6507
|
prp = t.formatCol(0,1,'',null,rowid, true);
|
|
6695
6508
|
row[row.length] = "<td role=\"gridcell\" " + rnc +" "+prp+">0</td>";
|
|
6696
6509
|
}
|
|
@@ -6804,10 +6617,6 @@ $.jgrid.extend({
|
|
|
6804
6617
|
res = rowlen ? rowlen : 0;
|
|
6805
6618
|
return false;
|
|
6806
6619
|
}
|
|
6807
|
-
if(t.p.frozenColumns && action !== 'get' && destroyFrozen) {
|
|
6808
|
-
$(t).jqGrid("destroyFrozenColumns");
|
|
6809
|
-
frozen = true;
|
|
6810
|
-
}
|
|
6811
6620
|
success=true;
|
|
6812
6621
|
if(action === 'addrow') {
|
|
6813
6622
|
var test = $(".ui-jqgrid-ftable tr", t.grid.sDiv).eq(0).clone();
|
|
@@ -6848,9 +6657,6 @@ $.jgrid.extend({
|
|
|
6848
6657
|
t.grid.sDiv = null;
|
|
6849
6658
|
t.p.footerrow = false;
|
|
6850
6659
|
}
|
|
6851
|
-
if(frozen) {
|
|
6852
|
-
$(t).jqGrid("setFrozenColumns");
|
|
6853
|
-
}
|
|
6854
6660
|
});
|
|
6855
6661
|
return (action === "get" || action === "getlength") ? res : success;
|
|
6856
6662
|
},
|
|
@@ -6877,10 +6683,6 @@ $.jgrid.extend({
|
|
|
6877
6683
|
res = rowlen ? rowlen : 0;
|
|
6878
6684
|
return true;
|
|
6879
6685
|
}
|
|
6880
|
-
if(t.p.frozenColumns && action !== 'get' && destroyFrozen) {
|
|
6881
|
-
$(t).jqGrid("destroyFrozenColumns");
|
|
6882
|
-
frozen = true;
|
|
6883
|
-
}
|
|
6884
6686
|
success=true;
|
|
6885
6687
|
if(action === 'addrow') {
|
|
6886
6688
|
var test = $(".ui-jqgrid-hrtable tr", t.grid.hrDiv).eq(0).clone();
|
|
@@ -6921,9 +6723,6 @@ $.jgrid.extend({
|
|
|
6921
6723
|
t.grid.hrDiv = null;
|
|
6922
6724
|
t.p.headerrow = false;
|
|
6923
6725
|
}
|
|
6924
|
-
if(frozen) {
|
|
6925
|
-
$(t).jqGrid("setFrozenColumns");
|
|
6926
|
-
}
|
|
6927
6726
|
});
|
|
6928
6727
|
return (action === "get" || action === "getlength") ? res : success;
|
|
6929
6728
|
},
|
|
@@ -7332,11 +7131,6 @@ $.jgrid.extend({
|
|
|
7332
7131
|
$("[id^=jqgh_]",thecol).empty().html(nData).append(ico).append(col_menu);
|
|
7333
7132
|
} catch (er) {}
|
|
7334
7133
|
$t.p.colNames[pos] = nData;
|
|
7335
|
-
if($t.p.frozenColumns) {
|
|
7336
|
-
thecol = $("tr.ui-jqgrid-labels th",$t.grid.fhDiv).eq( pos );
|
|
7337
|
-
ico = $(".s-ico",thecol);
|
|
7338
|
-
$("[id^=jqgh_]",thecol).empty().html(nData).append(ico);
|
|
7339
|
-
}
|
|
7340
7134
|
}
|
|
7341
7135
|
if (prop) {
|
|
7342
7136
|
if(typeof prop === 'string') {$(thecol).addClass(prop);} else {$(thecol).css(prop);}
|
|
@@ -7385,17 +7179,6 @@ $.jgrid.extend({
|
|
|
7385
7179
|
} else if(position === 'right') {
|
|
7386
7180
|
thecol.find("div.ui-th-div").first().empty().removeClass("ui-icon-left").append(htmlcol).append(ico);
|
|
7387
7181
|
}
|
|
7388
|
-
if($t.p.frozenColumns) {
|
|
7389
|
-
thecol = $("tr.ui-jqgrid-labels th", $t.grid.fhDiv).eq( i );
|
|
7390
|
-
htmlcol = $t.p.colNames[i];
|
|
7391
|
-
ico = thecol.find(".s-ico");
|
|
7392
|
-
|
|
7393
|
-
if(position === 'left') {
|
|
7394
|
-
thecol.find("div.ui-th-div").first().empty().addClass("ui-icon-left").append(ico).append(htmlcol);
|
|
7395
|
-
} else if(position === 'right') {
|
|
7396
|
-
thecol.find("div.ui-th-div").first().empty().removeClass("ui-icon-left").append(htmlcol).append(ico);
|
|
7397
|
-
}
|
|
7398
|
-
}
|
|
7399
7182
|
}
|
|
7400
7183
|
});
|
|
7401
7184
|
},
|
|
@@ -7443,10 +7226,6 @@ $.jgrid.extend({
|
|
|
7443
7226
|
if(typeof attrp === 'object') {
|
|
7444
7227
|
$(tcell).attr(attrp);
|
|
7445
7228
|
}
|
|
7446
|
-
if($t.p.frozenColumns && pos <= $t.p.frozenColCount) {
|
|
7447
|
-
var fcell = $(tcell).clone();
|
|
7448
|
-
$("#"+rowid +" td", "#" + $.jgrid.jqID($t.p.id + "_frozen") ).eq( pos ).replaceWith(fcell);
|
|
7449
|
-
}
|
|
7450
7229
|
}
|
|
7451
7230
|
}
|
|
7452
7231
|
}
|
|
@@ -7552,6 +7331,49 @@ $.jgrid.extend({
|
|
|
7552
7331
|
});
|
|
7553
7332
|
return ret;
|
|
7554
7333
|
},
|
|
7334
|
+
setCol : function( col, value) {
|
|
7335
|
+
this.each(function(){
|
|
7336
|
+
var $t=this, pos=-1, cm = $t.p.colModel, nm,vl, title;
|
|
7337
|
+
if(!$t.grid) {return;}
|
|
7338
|
+
if(isNaN(col)) {
|
|
7339
|
+
pos = $.jgrid.getElemByAttrVal(cm, 'name', col, true);
|
|
7340
|
+
nm = col;
|
|
7341
|
+
} else {
|
|
7342
|
+
pos = parseInt(col,10);
|
|
7343
|
+
nm = cm[pos].name;
|
|
7344
|
+
}
|
|
7345
|
+
if( pos >= 0 ) {
|
|
7346
|
+
var ln = $t.rows.length, i = 0;
|
|
7347
|
+
if (ln && ln>0){
|
|
7348
|
+
var fval = $.jgrid.isFunction(value) ? value : function(value, data, rowObj) { return value; },
|
|
7349
|
+
lcd = $t.p.datatype === 'local';
|
|
7350
|
+
for(; i < ln; i++){
|
|
7351
|
+
if($($t.rows[i]).hasClass('jqgrow') && $t.rows[i].id !== "norecs") {
|
|
7352
|
+
var data={};
|
|
7353
|
+
for (let element=0;element<$t.rows[i].cells.length;element++) {
|
|
7354
|
+
if($t.rows[i].cells[element] !== undefined) {
|
|
7355
|
+
data[cm[element].name] = $.unformat.call($t, $t.rows[i].cells[element] ,{rowId:$t.rows[i].id, colModel:cm[pos]},pos);
|
|
7356
|
+
}
|
|
7357
|
+
}
|
|
7358
|
+
vl = fval.call($t, value, data, $t.rows[i]);
|
|
7359
|
+
if(lcd) { // local data
|
|
7360
|
+
let index = $t.p._index[$.jgrid.stripPref($t.p.idPrefix, $t.rows[i].id)];
|
|
7361
|
+
$t.p.data[index][cm[pos].name] = vl;
|
|
7362
|
+
}
|
|
7363
|
+
vl = $t.formatter( $t.rows[i].id, vl, pos, data, 'edit');
|
|
7364
|
+
title = cm[pos].title ? {"title":$.jgrid.stripHtml(vl)} : {};
|
|
7365
|
+
|
|
7366
|
+
if($t.p.treeGrid===true && nm === $t.p.ExpandColumn) {
|
|
7367
|
+
$($t.rows[i].cells[pos]).find("span[class*='cell-wrapper']").html(vl).attr(title);
|
|
7368
|
+
} else {
|
|
7369
|
+
$($t.rows[i].cells[pos]).html(vl).attr(title);
|
|
7370
|
+
}
|
|
7371
|
+
}
|
|
7372
|
+
}
|
|
7373
|
+
}
|
|
7374
|
+
}
|
|
7375
|
+
});
|
|
7376
|
+
},
|
|
7555
7377
|
clearGridData : function(clearfooter, clearheader) {
|
|
7556
7378
|
return this.each(function(){
|
|
7557
7379
|
var $t = this;
|
|
@@ -7770,9 +7592,6 @@ $.jgrid.extend({
|
|
|
7770
7592
|
for ( i=0;i<$t.p.colModel.length;i++ ) {
|
|
7771
7593
|
if ( $t.p.colModel[i].index === colname || $t.p.colModel[i].name === colname ) {
|
|
7772
7594
|
idx = i;
|
|
7773
|
-
if($t.p.frozenColumns === true && $t.p.colModel[i].frozen === true) {
|
|
7774
|
-
sobj = $t.grid.fhDiv.find("#" + $t.p.id + "_" + colname);
|
|
7775
|
-
}
|
|
7776
7595
|
break;
|
|
7777
7596
|
}
|
|
7778
7597
|
}
|
|
@@ -7826,26 +7645,16 @@ $.jgrid.extend({
|
|
|
7826
7645
|
|
|
7827
7646
|
});
|
|
7828
7647
|
},
|
|
7829
|
-
setFrozenColumns : function
|
|
7830
|
-
return this.each(function()
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
// TODO treeGrid and grouping Support
|
|
7838
|
-
if($t.p.subGrid === true ||
|
|
7839
|
-
$t.p.treeGrid === true ||
|
|
7840
|
-
$t.p.cellEdit === true ||
|
|
7841
|
-
/*$t.p.sortable ||*/
|
|
7842
|
-
$t.p.scroll ||
|
|
7843
|
-
$t.p.frozenColumns
|
|
7844
|
-
/* $t.p.grouping === true*/)
|
|
7845
|
-
{
|
|
7846
|
-
return;
|
|
7648
|
+
setFrozenColumns : function(frzclass='frozen-col-class', callername='') {
|
|
7649
|
+
return this.each(function(){
|
|
7650
|
+
//console.trace();
|
|
7651
|
+
if(this.p.direction === "rtl") {
|
|
7652
|
+
frzclass += "-rtl";
|
|
7653
|
+
}
|
|
7654
|
+
if(callername) {
|
|
7655
|
+
console.log("called set from:", callername, frzclass);
|
|
7847
7656
|
}
|
|
7848
|
-
|
|
7657
|
+
var $t = this, cm = $t.p.colModel,i=0, len = cm.length;
|
|
7849
7658
|
$t.p.frozenColCount = -1;
|
|
7850
7659
|
while(i<len)
|
|
7851
7660
|
{
|
|
@@ -7859,230 +7668,98 @@ $.jgrid.extend({
|
|
|
7859
7668
|
i++;
|
|
7860
7669
|
}
|
|
7861
7670
|
if( $t.p.frozenColCount >= 0) {
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
$($t.grid.fhDiv).append(htbl);
|
|
7874
|
-
if( $($t).jqGrid('isGroupHeaderOn') ) {
|
|
7875
|
-
fthh = $("tr.jqg-third-row-header", $t.grid.hDiv).height();
|
|
7876
|
-
$("tr.jqg-first-row-header, tr.jqg-third-row-header", htbl).each(function(){
|
|
7877
|
-
$("th", this).slice( $t.p.frozenColCount + 1 ).remove();
|
|
7878
|
-
});
|
|
7879
|
-
var swapfroz = -1, fdel = -1, cs, rs;
|
|
7880
|
-
$("tr.jqg-second-row-header th", htbl).each(function(){
|
|
7881
|
-
cs= parseInt($(this).attr("colspan"),10);
|
|
7882
|
-
rs= parseInt($(this).attr("rowspan"),10);
|
|
7883
|
-
if(rs) {
|
|
7884
|
-
swapfroz++;
|
|
7885
|
-
fdel++;
|
|
7886
|
-
}
|
|
7887
|
-
if(cs) {
|
|
7888
|
-
swapfroz = swapfroz+cs;
|
|
7889
|
-
fdel++;
|
|
7890
|
-
}
|
|
7891
|
-
if(swapfroz === $t.p.frozenColCount) {
|
|
7892
|
-
fdel = $t.p.frozenColCount;
|
|
7893
|
-
return false;
|
|
7894
|
-
}
|
|
7895
|
-
});
|
|
7896
|
-
if(swapfroz !== $t.p.frozenColCount) {
|
|
7897
|
-
fdel = $t.p.frozenColCount;
|
|
7898
|
-
}
|
|
7899
|
-
$("tr.jqg-second-row-header", htbl).each(function(){
|
|
7900
|
-
$("th", this).slice( fdel + 1 ).remove();
|
|
7901
|
-
});
|
|
7902
|
-
var testws = $("tr.jqg-second-row-header th", htbl).filter( function() {
|
|
7903
|
-
return $(this).css("display") !== "none";
|
|
7904
|
-
}).first();
|
|
7905
|
-
if($.jgrid.type(testws) === 'object' && testws.length && testws.css("visibility") !== 'hidden' && $.jgrid.trim(testws[0].outerText) === "") {
|
|
7906
|
-
testws.html(' ');
|
|
7907
|
-
}
|
|
7908
|
-
testws = $("tr.jqg-third-row-header th", htbl).filter( function() { return $(this).css("display") !== "none"; }).first();
|
|
7909
|
-
if($.jgrid.type(testws) === 'object' && testws.length && testws.css("visibility") !== 'hidden' && $.jgrid.trim(testws[0].outerText) === "") {
|
|
7910
|
-
$("div",testws).prepend(' ');
|
|
7671
|
+
$(this).jqGrid('refreshFrozenColumns', true, true, frzclass);
|
|
7672
|
+
$(this).on('jqGridAfterGridComplete.setFrozenColumns',function(){
|
|
7673
|
+
var pos =0;
|
|
7674
|
+
for(i=0;i<$t.p.frozenColCount+1;i++){
|
|
7675
|
+
// from left
|
|
7676
|
+
var nm = this.id+"_"+cm[i].name;
|
|
7677
|
+
$("#"+$.jgrid.jqID(this.id) +' td[aria-describedby="'+nm+'"]').addClass(frzclass).css("inset-inline-start", pos+"px");
|
|
7678
|
+
pos = pos +$('.ui-jqgrid-htable th#'+nm, "#gbox_" + $.jgrid.jqID(this.p.id)).outerWidth();
|
|
7679
|
+
}
|
|
7680
|
+
if($t.p.grouping) {
|
|
7681
|
+
$("#"+$.jgrid.jqID(this.p.id)+' tr.jqgroup td.for-sticky').addClass(frzclass).css("inset-inline-start", "0");
|
|
7911
7682
|
}
|
|
7912
|
-
} else {
|
|
7913
|
-
var maxdh=[];
|
|
7914
|
-
$("#gview_"+$.jgrid.jqID($t.p.id) +" .ui-jqgrid-htable > thead >tr").each(function(i,n){
|
|
7915
|
-
maxdh.push(parseInt($(this).height(),10));
|
|
7916
|
-
});
|
|
7917
|
-
$("thead >tr",htbl).each(function(){
|
|
7918
|
-
$("th", this).slice( $t.p.frozenColCount + 1 ).remove();
|
|
7919
|
-
});
|
|
7920
|
-
$("thead >tr",htbl).each(function(i){
|
|
7921
|
-
if(i===0) {
|
|
7922
|
-
maxdh[i] -=1;
|
|
7923
|
-
}
|
|
7924
|
-
$(this).height(maxdh[i]);
|
|
7925
|
-
});
|
|
7926
|
-
}
|
|
7927
|
-
//if( fthh ) {
|
|
7928
|
-
//$("tr.jqg-third-row-header th", htbl).eq(0).height(fthh);
|
|
7929
|
-
//}
|
|
7930
|
-
//$(htbl).width(1);
|
|
7931
|
-
if(!$.jgrid.msie()) {
|
|
7932
|
-
$(htbl).css("height","100%");
|
|
7933
|
-
}
|
|
7934
|
-
// resizing stuff
|
|
7935
|
-
$($t.grid.fhDiv)//.append(htbl)
|
|
7936
|
-
.mousemove(function (e) {
|
|
7937
|
-
if($t.grid.resizing){ $t.grid.dragMove(e);return false; }
|
|
7938
7683
|
});
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7684
|
+
this.p.frozenColumns = true;
|
|
7685
|
+
}
|
|
7686
|
+
});
|
|
7687
|
+
},
|
|
7688
|
+
refreshFrozenColumns : function (data= true, addfrzclass=false, frzclass='frozen-col-class') {
|
|
7689
|
+
return this.each(function(){
|
|
7690
|
+
if( this.p.direction === "rtl" && frzclass.slice(-4) !== "-rtl") {
|
|
7691
|
+
frzclass += "-rtl";
|
|
7692
|
+
}
|
|
7693
|
+
console.log("called refresh frozen", frzclass);
|
|
7694
|
+
var pos =0, cm = this.p.colModel;
|
|
7695
|
+
var elements =[];
|
|
7696
|
+
for(let i=0;i< this.p.frozenColCount+1; i++){
|
|
7697
|
+
// from left direction only for now
|
|
7698
|
+
if(cm[i].hidden) {
|
|
7699
|
+
continue;
|
|
7942
7700
|
}
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
}
|
|
7947
|
-
if($t.p.footerrow) {
|
|
7948
|
-
$t.grid.fsDiv = $('<div style="position:absolute;' + ($t.p.direction === "rtl" ? 'right:0px;' : 'left:0px;') + 'top:0px;" class="frozen-sdiv ui-jqgrid-sdiv"></div>');
|
|
7949
|
-
$("#gview_"+$.jgrid.jqID($t.p.id)).append($t.grid.fsDiv);
|
|
7701
|
+
var nm = this.p.id+"_"+cm[i].name ;
|
|
7702
|
+
if(data) {
|
|
7703
|
+
elements.push('.ui-jqgrid-bdiv td[aria-describedby="'+nm+'"]');
|
|
7950
7704
|
}
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
$($t.grid.fbDiv).on('mousewheel DOMMouseScroll', function (e) {
|
|
7956
|
-
$t.grid.bDiv.scrollTop +=
|
|
7957
|
-
e.type === "mousewheel" ?
|
|
7958
|
-
-e.originalEvent.wheelDelta / 10 :
|
|
7959
|
-
e.originalEvent.detail * 6;
|
|
7960
|
-
});
|
|
7961
|
-
|
|
7962
|
-
if($t.p.hoverrows === true) {
|
|
7963
|
-
$("#"+$.jgrid.jqID($t.p.id)).off('mouseover mouseout');
|
|
7705
|
+
elements.push('.ui-jqgrid-htable th#'+nm);
|
|
7706
|
+
if(this.p.filterToolbar) {
|
|
7707
|
+
elements.push('.ui-jqgrid-htable th#gsh_'+nm);
|
|
7964
7708
|
}
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
$("#"+$.jgrid.jqID($t.p.id)+"_frozen").remove();
|
|
7968
|
-
|
|
7969
|
-
// hasscroll = parseInt($($t.grid.bDiv)[0].scrollWidth,10) > parseInt($($t.grid.bDiv)[0].clientWidth,10);
|
|
7970
|
-
$($t.grid.fbDiv).height( $($t.grid.bDiv)[0].clientHeight ); //- (hasscroll ? 0 : $t.p.scrollOffset-3));
|
|
7971
|
-
// find max height
|
|
7972
|
-
var mh = [];
|
|
7973
|
-
$("#"+$.jgrid.jqID($t.p.id) + " tr[role=row].jqgrow").each(function(){
|
|
7974
|
-
mh.push( $(this).height() );
|
|
7975
|
-
});
|
|
7976
|
-
|
|
7977
|
-
var btbl = $("#"+$.jgrid.jqID($t.p.id)).clone(true);
|
|
7978
|
-
$("tr[role=row]",btbl).each(function(){
|
|
7979
|
-
$("td[role=gridcell]", this).slice( $t.p.frozenColCount + 1).remove();
|
|
7980
|
-
});
|
|
7981
|
-
|
|
7982
|
-
$(btbl).width(1).attr("id",$t.p.id+"_frozen");
|
|
7983
|
-
$($t.grid.fbDiv).append(btbl);
|
|
7984
|
-
// set the height
|
|
7985
|
-
$("tr[role=row].jqgrow",btbl).each(function(i, n){
|
|
7986
|
-
$(this).height( mh[i] );
|
|
7987
|
-
if( Math.abs($(this).height() - mh[i]) >= 0.3 ) {
|
|
7988
|
-
var tt = $("td:visible", this).first();
|
|
7989
|
-
tt.height(mh[i] - Math.round(parseFloat(tt.css("border-bottom-width")) ));
|
|
7990
|
-
}
|
|
7991
|
-
});
|
|
7992
|
-
if($t.rows[1] && $t.rows[1].id === 'norecs') {
|
|
7993
|
-
$("#norecs td", btbl).html("");
|
|
7994
|
-
}
|
|
7995
|
-
$($t.grid.fbDiv)[0].scrollTop = $($t.grid.bDiv)[0].scrollTop;
|
|
7996
|
-
if($t.p.hoverrows === true) {
|
|
7997
|
-
$("tr.jqgrow", btbl).hover(
|
|
7998
|
-
function(){
|
|
7999
|
-
$(this).addClass( hover );
|
|
8000
|
-
$("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)).addClass( hover );
|
|
8001
|
-
},function(){
|
|
8002
|
-
$(this).removeClass( hover );
|
|
8003
|
-
$("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)).removeClass( hover );
|
|
8004
|
-
}
|
|
8005
|
-
);
|
|
8006
|
-
$("tr.jqgrow", "#"+$.jgrid.jqID($t.p.id)).hover(
|
|
8007
|
-
function(){
|
|
8008
|
-
$(this).addClass( hover );
|
|
8009
|
-
$("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)+"_frozen").addClass( hover );
|
|
8010
|
-
|
|
8011
|
-
},
|
|
8012
|
-
function(){
|
|
8013
|
-
$(this).removeClass( hover );
|
|
8014
|
-
$("#"+$.jgrid.jqID(this.id), "#"+$.jgrid.jqID($t.p.id)+"_frozen").removeClass( hover );
|
|
8015
|
-
}
|
|
8016
|
-
);
|
|
8017
|
-
}
|
|
8018
|
-
//btbl=null;
|
|
8019
|
-
if($t.p.headerrow) {
|
|
8020
|
-
var bhtop = $($t.grid.hrDiv).position();
|
|
8021
|
-
$("table",$t.grid.fhrDiv).remove();
|
|
8022
|
-
var hrtbl = $(".ui-jqgrid-hrtable","#gview_"+$.jgrid.jqID($t.p.id)).clone(true);
|
|
8023
|
-
$("tr",hrtbl).each(function(){
|
|
8024
|
-
$("td", this).slice( $t.p.frozenColCount + 1 ).remove();
|
|
8025
|
-
});
|
|
8026
|
-
$(hrtbl).width(1);
|
|
8027
|
-
$($t.grid.fhrDiv).css("top", bhtop.top+"px").append(hrtbl);
|
|
8028
|
-
}
|
|
8029
|
-
if($t.p.footerrow) {
|
|
8030
|
-
var bttop = $($t.grid.sDiv).position();
|
|
8031
|
-
$("table",$t.grid.fsDiv).remove();
|
|
8032
|
-
var ftbl = $(".ui-jqgrid-ftable","#gview_"+$.jgrid.jqID($t.p.id)).clone(true);
|
|
8033
|
-
$("tr",ftbl).each(function(){
|
|
8034
|
-
$("td", this).slice( $t.p.frozenColCount + 1 ).remove();
|
|
8035
|
-
});
|
|
8036
|
-
$(ftbl).width(1);
|
|
8037
|
-
$($t.grid.fsDiv).css("top", bttop.top+"px").append(ftbl);
|
|
8038
|
-
}
|
|
8039
|
-
});
|
|
8040
|
-
if(!$t.grid.hDiv.loading) {
|
|
8041
|
-
$($t).triggerHandler("jqGridAfterGridComplete.setFrozenColumns");
|
|
7709
|
+
if(this.p.headerrow) {
|
|
7710
|
+
elements.push('.ui-jqgrid-hrtable td[aria-describedby="'+nm+'"]');
|
|
8042
7711
|
}
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
}
|
|
8046
|
-
});
|
|
8047
|
-
},
|
|
8048
|
-
destroyFrozenColumns : function() {
|
|
8049
|
-
return this.each(function() {
|
|
8050
|
-
if ( !this.grid ) {return;}
|
|
8051
|
-
if(this.p.frozenColumns === true) {
|
|
8052
|
-
var $t = this,
|
|
8053
|
-
hover = $($t).jqGrid('getStyleUI',$t.p.styleUI+".common",'hover', true);
|
|
8054
|
-
$($t.grid.fhDiv).remove();
|
|
8055
|
-
$($t.grid.fbDiv).remove();
|
|
8056
|
-
$t.grid.fhDiv = null; $t.grid.fbDiv=null;
|
|
8057
|
-
if($t.p.footerrow) {
|
|
8058
|
-
$($t.grid.fsDiv).remove();
|
|
8059
|
-
$t.grid.fsDiv = null;
|
|
7712
|
+
if(this.p.footerrow) {
|
|
7713
|
+
elements.push('.ui-jqgrid-ftable td[aria-describedby="'+nm+'"]');
|
|
8060
7714
|
}
|
|
8061
|
-
if($
|
|
8062
|
-
|
|
8063
|
-
$t.grid.fhrDiv = null;
|
|
8064
|
-
}
|
|
8065
|
-
$(this).off('.setFrozenColumns');
|
|
8066
|
-
if($t.p.hoverrows === true) {
|
|
8067
|
-
var ptr;
|
|
8068
|
-
$("#"+$.jgrid.jqID($t.p.id)).on({
|
|
8069
|
-
'mouseover': function(e) {
|
|
8070
|
-
ptr = $(e.target).closest("tr.jqgrow");
|
|
8071
|
-
if($(ptr).attr("class") !== "ui-subgrid") {
|
|
8072
|
-
$(ptr).addClass( hover );
|
|
8073
|
-
}
|
|
8074
|
-
},
|
|
8075
|
-
'mouseout' : function(e) {
|
|
8076
|
-
ptr = $(e.target).closest("tr.jqgrow");
|
|
8077
|
-
$(ptr).removeClass( hover );
|
|
8078
|
-
}
|
|
8079
|
-
});
|
|
7715
|
+
if($(this).jqGrid('isGroupHeaderOn')) {
|
|
7716
|
+
elements.push('.ui-jqgrid-htable .ui-jqgrid-labels [data-spname="' + cm[i].name + '"]');
|
|
8080
7717
|
}
|
|
8081
|
-
|
|
8082
|
-
this.p.
|
|
7718
|
+
var parse_str = elements.join();
|
|
7719
|
+
let parseobj = $(parse_str, "#gbox_" + $.jgrid.jqID(this.p.id)).css("inset-inline-start", pos+"px");
|
|
7720
|
+
if(addfrzclass) {
|
|
7721
|
+
parseobj.addClass(frzclass);
|
|
7722
|
+
}
|
|
7723
|
+
pos += $('.ui-jqgrid-htable th#'+nm, "#gbox_" + $.jgrid.jqID(this.p.id)).outerWidth();
|
|
7724
|
+
elements =[];
|
|
8083
7725
|
}
|
|
8084
7726
|
});
|
|
7727
|
+
|
|
8085
7728
|
},
|
|
7729
|
+
destroyFrozenColumns : function(frzclass='frozen-col-class') {
|
|
7730
|
+
return this.each(function() {
|
|
7731
|
+
var cm = this.p.colModel;
|
|
7732
|
+
var elements =[];
|
|
7733
|
+
if( this.p.direction === "rtl" && frzclass.slice(-4) !== "-rtl") {
|
|
7734
|
+
frzclass += "-rtl";
|
|
7735
|
+
}
|
|
7736
|
+
console.log("caled unset",frzclass);
|
|
7737
|
+
for(let i=0;i< this.p.frozenColCount+1; i++){
|
|
7738
|
+
// from left direction only for now
|
|
7739
|
+
var nm = this.p.id+"_"+cm[i].name ;
|
|
7740
|
+
elements.push('.ui-jqgrid-bdiv td[aria-describedby="'+nm+'"]');
|
|
7741
|
+
elements.push('.ui-jqgrid-htable th#'+nm);
|
|
7742
|
+
if(this.p.filterToolbar) {
|
|
7743
|
+
elements.push('.ui-jqgrid-htable th#gsh_'+nm);
|
|
7744
|
+
}
|
|
7745
|
+
if(this.p.headerrow) {
|
|
7746
|
+
elements.push('.ui-jqgrid-hrtable td[aria-describedby="'+nm+'"]');
|
|
7747
|
+
}
|
|
7748
|
+
if(this.p.footerrow) {
|
|
7749
|
+
elements.push('.ui-jqgrid-ftable td[aria-describedby="'+nm+'"]');
|
|
7750
|
+
}
|
|
7751
|
+
if($(this).jqGrid('isGroupHeaderOn')) {
|
|
7752
|
+
elements.push('.ui-jqgrid-htable .ui-jqgrid-labels [data-spname="' + cm[i].name + '"]');
|
|
7753
|
+
}
|
|
7754
|
+
var parse_str = elements.join();
|
|
7755
|
+
$(parse_str, "#gbox_" + $.jgrid.jqID(this.p.id)).css("inset-inline-start","").removeClass(frzclass);
|
|
7756
|
+
elements =[];
|
|
7757
|
+
}
|
|
7758
|
+
$(this).off('jqGridAfterGridComplete.setFrozenColumns');
|
|
7759
|
+
this.p.frozenColumns = false;
|
|
7760
|
+
this.p.frozenColCount = -1;
|
|
7761
|
+
});
|
|
7762
|
+
},
|
|
8086
7763
|
resizeColumn : function ( iCol, newWidth, forceresize, setfrozen ) {
|
|
8087
7764
|
return this.each(function() {
|
|
8088
7765
|
var tgrid = this.grid, pr = this.p,
|
|
@@ -8213,9 +7890,6 @@ $.jgrid.extend({
|
|
|
8213
7890
|
}
|
|
8214
7891
|
$("#"+$.jgrid.jqID($t.p.id)).jqGrid('setGridHeight', wh - bstw, true, false);
|
|
8215
7892
|
}
|
|
8216
|
-
if($t.p.frozenRows) {
|
|
8217
|
-
$($t).trigger('jqGridAfterGridComplete.setFrozenRows');
|
|
8218
|
-
}
|
|
8219
7893
|
if(frozen) {
|
|
8220
7894
|
$("#"+$.jgrid.jqID($t.p.id)).jqGrid("setFrozenColumns");
|
|
8221
7895
|
}
|
|
@@ -8250,12 +7924,15 @@ $.jgrid.extend({
|
|
|
8250
7924
|
}
|
|
8251
7925
|
});
|
|
8252
7926
|
},
|
|
8253
|
-
menubarAdd : function( items ) {
|
|
7927
|
+
menubarAdd : function( items, target ) {
|
|
8254
7928
|
var currstyle = this[0].p.styleUI,
|
|
8255
7929
|
styles = $.jgrid.styleUI[currstyle].common, item, str;
|
|
8256
7930
|
|
|
8257
7931
|
return this.each(function(){
|
|
8258
7932
|
var $t = this;
|
|
7933
|
+
if(target === undefined) {
|
|
7934
|
+
target = "_menubar";
|
|
7935
|
+
}
|
|
8259
7936
|
if( Array.isArray(items)) {
|
|
8260
7937
|
for(var i = 0; i < items.length; i++) {
|
|
8261
7938
|
item = items[i];
|
|
@@ -8280,13 +7957,13 @@ $.jgrid.extend({
|
|
|
8280
7957
|
str = '<li class="ui-menu-item" role="presentation"><a id="'+ item.id+'" class="g-menu-item" tabindex="0" role="menuitem" ><table class="ui-common-table"><tr><td class="menu_icon">'+ico+'</td><td class="menu_text">'+item.title+'</td></tr></table></a></li>';
|
|
8281
7958
|
}
|
|
8282
7959
|
if(item.position === 'last') {
|
|
8283
|
-
$("#"+this.p.id+
|
|
7960
|
+
$("#"+this.p.id + target).append(str);
|
|
8284
7961
|
} else {
|
|
8285
|
-
$("#"+this.p.id+
|
|
7962
|
+
$("#"+this.p.id + target).prepend(str);
|
|
8286
7963
|
}
|
|
8287
7964
|
}
|
|
8288
7965
|
}
|
|
8289
|
-
$("li a", "#"+this.p.id+
|
|
7966
|
+
$("li a", "#"+this.p.id + target).each(function(i,n){
|
|
8290
7967
|
$(items).each(function(j,f){
|
|
8291
7968
|
if(f.id === n.id && $.jgrid.isFunction(f.click)) {
|
|
8292
7969
|
$(n).on('click', function(e){
|
|
@@ -8305,9 +7982,12 @@ $.jgrid.extend({
|
|
|
8305
7982
|
});
|
|
8306
7983
|
});
|
|
8307
7984
|
},
|
|
8308
|
-
menubarDelete : function( itemid ) {
|
|
7985
|
+
menubarDelete : function( itemid, target ) {
|
|
8309
7986
|
return this.each(function(){
|
|
8310
|
-
|
|
7987
|
+
if(target === undefined) {
|
|
7988
|
+
target = "_menubar";
|
|
7989
|
+
}
|
|
7990
|
+
$("#"+itemid, "#"+this.p.id + target).remove();
|
|
8311
7991
|
});
|
|
8312
7992
|
},
|
|
8313
7993
|
addColSearchMenu : function() {
|