forked from tonytomov/jqGrid
/
grid.base.js
8490 lines (8344 loc) · 315 KB
/
grid.base.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ==ClosureCompiler==
// @compilation_level SIMPLE_OPTIMIZATIONS
/**
* @license jqGrid 4.15.5 - free jqGrid: https://github.com/free-jqgrid/jqGrid
* Copyright (c) 2008-2014, Tony Tomov, tony@trirand.com
* Copyright (c) 2014-2018, 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
* Date: 2018-08-13
*/
//jsHint options
/*jshint eqnull:true */
/*jslint browser: true, evil: true, devel: true, white: true */
/*global jQuery, define, HTMLElement, HTMLTableRowElement, module, require */
(function (global, factory) {
"use strict";
if (typeof define === "function" && define.amd) {
// AMD. Register as an anonymous module.
//console.log("grid.base AMD");
define([
"jquery"
], function ($) {
//console.log("grid.base AMD: define callback");
return factory($, global.document);
});
} else if (typeof module === "object" && module.exports) {
// Node/CommonJS
//console.log("grid.base CommonJS");
module.exports = function (root, $) {
//console.log("grid.base CommonJS: in module.exports");
if (!root) {
root = window;
}
//console.log("grid.base CommonJS: before require('jquery')");
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);
}
//global.jQuery = $;
//root.jQuery = $;
//console.log("grid.base CommonJS: before factory");
factory($, root.document);
return $;
};
} else {
// Browser globals
//console.log("grid.base Browser: before factory");
factory(jQuery, global.document);
}
}(typeof window !== "undefined" ? window : this, function ($, document) {
"use strict";
// begin module grid.base
/** @const */
var englishLanguageDefaults = {
name: "English (United States)",
nameEnglish: "English (United States)",
isRTL: false,
defaults: {
recordtext: "View {0} - {1} of {2}",
emptyrecords: "No records to view",
loadtext: "Loading...",
pgtext: "Page {0} of {1}",
pgfirst: "First Page",
pglast: "Last Page",
pgnext: "Next Page",
pgprev: "Previous Page",
pgrecs: "Records per Page",
showhide: "Toggle Expand Collapse Grid",
savetext: "Saving..."
},
search: {
caption: "Search...",
Find: "Find",
Reset: "Reset",
odata: [
{ oper: "eq", text: "equal" },
{ oper: "ne", text: "not equal" },
{ oper: "lt", text: "less" },
{ oper: "le", text: "less or equal" },
{ oper: "gt", text: "greater" },
{ oper: "ge", text: "greater or equal" },
{ oper: "bw", text: "begins with" },
{ oper: "bn", text: "does not begin with" },
{ oper: "in", text: "is in" },
{ oper: "ni", text: "is not in" },
{ oper: "ew", text: "ends with" },
{ oper: "en", text: "does not end with" },
{ oper: "cn", text: "contains" },
{ oper: "nc", text: "does not contain" },
{ oper: "nu", text: "is null" },
{ oper: "nn", text: "is not null" }
],
groupOps: [
{ op: "AND", text: "all" },
{ op: "OR", text: "any" }
],
addGroupTitle: "Add subgroup",
deleteGroupTitle: "Delete group",
addRuleTitle: "Add rule",
deleteRuleTitle: "Delete rule",
operandTitle: "Click to select search operation.",
resetTitle: "Reset Search Value"
},
edit: {
addCaption: "Add Record",
editCaption: "Edit Record",
bSubmit: "Submit",
bCancel: "Cancel",
bClose: "Close",
saveData: "Data has been changed! Save changes?",
bYes: "Yes",
bNo: "No",
bExit: "Cancel",
msg: {
required: "Field is required",
number: "Please, enter valid number",
minValue: "value must be greater than or equal to ",
maxValue: "value must be less than or equal to",
email: "is not a valid e-mail",
integer: "Please, enter valid integer value",
date: "Please, enter valid date value",
url: "is not a valid URL. Prefix required ('http://' or 'https://')",
nodefined: " is not defined!",
novalue: " return value is required!",
customarray: "Custom function should return array!",
customfcheck: "Custom function should be present in case of custom checking!"
}
},
view: {
caption: "View Record",
bClose: "Close"
},
del: {
caption: "Delete",
msg: "Delete selected record(s)?",
bSubmit: "Delete",
bCancel: "Cancel"
},
nav: {
edittext: "",
edittitle: "Edit selected row",
addtext: "",
addtitle: "Add new row",
deltext: "",
deltitle: "Delete selected row",
searchtext: "",
searchtitle: "Find records",
refreshtext: "",
refreshtitle: "Reload Grid",
alertcap: "Warning",
alerttext: "Please, select row",
viewtext: "",
viewtitle: "View selected row",
savetext: "",
savetitle: "Save row",
canceltext: "",
canceltitle: "Cancel row editing"
},
col: {
caption: "Select columns",
bSubmit: "Ok",
bCancel: "Cancel"
},
errors: {
errcap: "Error",
nourl: "No url is set",
norecords: "No records to process",
model: "Length of colNames <> colModel!"
},
formatter: {
integer: {
thousandsSeparator: ",",
defaultValue: "0"
},
number: {
decimalSeparator: ".",
thousandsSeparator: ",",
decimalPlaces: 2,
defaultValue: "0.00"
},
currency: {
decimalSeparator: ".",
thousandsSeparator: ",",
decimalPlaces: 2,
prefix: "",
suffix: "",
defaultValue: "0.00"
},
date: {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
],
AmPm: ["am", "pm", "AM", "PM"],
S: function (j) {
var ending = ["st", "nd", "rd", "th"];
return j < 11 || j > 13 ? ending[Math.min((j - 1) % 10, 3)] : "th";
},
srcformat: "Y-m-d",
newformat: "n/j/Y",
masks: {
// see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
// and see http://docs.jquery.com/UI/Datepicker/formatDate
// and https://github.com/jquery/globalize#dates for alternative formats used frequently
// one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
// information about date, time, numbers and currency formats used in different countries
// one should just convert the information in PHP format
// short date:
// n - Numeric representation of a month, without leading zeros
// j - Day of the month without leading zeros
// Y - A full numeric representation of a year, 4 digits
// example: 3/1/2012 which means 1 March 2012
ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
// long date:
// l - A full textual representation of the day of the week
// F - A full textual representation of a month
// d - Day of the month, 2 digits with leading zeros
// Y - A full numeric representation of a year, 4 digits
LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
// long date with long time:
// l - A full textual representation of the day of the week
// F - A full textual representation of a month
// d - Day of the month, 2 digits with leading zeros
// Y - A full numeric representation of a year, 4 digits
// g - 12-hour format of an hour without leading zeros
// i - Minutes with leading zeros
// s - Seconds, with leading zeros
// A - Uppercase Ante meridiem and Post meridiem (AM or PM)
FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
// month day:
// F - A full textual representation of a month
// d - Day of the month, 2 digits with leading zeros
MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
// short time (without seconds)
// g - 12-hour format of an hour without leading zeros
// i - Minutes with leading zeros
// A - Uppercase Ante meridiem and Post meridiem (AM or PM)
ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
// long time (with seconds)
// g - 12-hour format of an hour without leading zeros
// i - Minutes with leading zeros
// s - Seconds, with leading zeros
// A - Uppercase Ante meridiem and Post meridiem (AM or PM)
LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
// month with year
// Y - A full numeric representation of a year, 4 digits
// F - A full textual representation of a month
YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
}
}
}
};
$.jgrid = $.jgrid || {};
var jgrid = $.jgrid;
jgrid.locales = jgrid.locales || {};
var locales = jgrid.locales;
/**
* Enum with different components of jqGrid.
* @enum {number} @const
*/
/*var INPUT_NAME_TYPE = {
COL_NAME: 0,
ADDITIONAL_PROPERTY: 1,
ROWID: 2
};*/
/**
* Enum with different components of jqGrid.
* @enum {number} @const
*/
var COMPONENT_NAMES = {
// let us this - <table> from which grid is created. Then
// gBox (grid box) - outer div which includes all grid components: $(this).closest(".ui-jqgrid")[0]
// In the same way
GRID_BOX_DIV: 0, // tagName: "div". class: "ui-jqgrid". Id: "gbox_" + gridId
GRID_OVERLAY_DIV: 1, // tagName: "div". class: "jqgrid-overlay". Id: "lui_" + gridId
LOADING_DIV: 2, // tagName: "div". class: "loading". Id: "load_" + gridId
DIALOG_ALERT_DIV: 3, // tagName: "div". class: "ui-jqdialog". Id: "alertmod_" + gridId
DIALOG_SEARCH_DIV: 4, // tagName: "div". class: "ui-jqdialog". Id: "searchmodfbox_" + gridId
DIALOG_VIEW_DIV: 5, // tagName: "div". class: "ui-jqdialog". Id: "viewmod" + gridId
DIALOG_EDIT_DIV: 6, // tagName: "div". class: "ui-jqdialog". Id: "editmod" + gridId
DIALOG_DELETE_DIV: 7, // tagName: "div". class: "ui-jqdialog". Id: "delmod" + gridId
GRID_VIEW_DIV: 8, // tagName: "div". class: "ui-jqgrid-view". Id: "gview_" + gridId
TITLE_BAR_DIV: 9, // tagName: "div". class: "ui-jqgrid-titlebar" and either "ui-jqgrid-caption" or "ui-jqgrid-caption-rtl"
UPPER_TOOLBAR_DIV: 10, // tagName: "div". class: "ui-userdata". Id: "tb_" + gridId
TOP_PAGER_DIV: 11, // tagName: "div". class: "ui-jqgrid-toppager". Id: gridId + "_toppager"
HEADER_DIV: 12, // tagName: "div". class: "ui-jqgrid-hdiv"
HEADER_BOX_DIV: 13, // tagName: "div". class: either "ui-jqgrid-hdiv" or "ui-jqgrid-hbox-rtl"
HEADER_TABLE: 14, // tagName: "table". class: "ui-jqgrid-htable"
HEADER_COLS_ROW: 15, // tagName: "tr". class: "jqgfirstrow" or the row with column headers
HEADER_COLS: 16, // tagName: "th". class: either "ui-first-th-rtl" or "ui-first-th-rtl"
HEADER_ROWS: 47, // tagName: "tr". class: "ui-jqgrid-labels"
HEADER_TH: 48, // tagName: "th". class: "ui-th-column" and either "ui-th-ltr" or "ui-th-rtl"
HEADER_SORTABLE_DIV: 49, // tagName: "div". class: "ui-jqgrid-labels"
HEADER_RESIZABLE_SPAN: 50, // tagName: "span". class: "ui-jqgrid-resize" and either "ui-jqgrid-resize-ltr" or "ui-jqgrid-resize-rtl"
HEADER_SELECT_ALL_ROWS_CHECKBOX: 45, // tagName: "input" (can be changed to "button" in the future). class: "cbox". Id: "cb_" + gridId
SEARCH_TOOLBAR: 17, // tagName: "tr". class: "ui-search-toolbar". Its direct children are th having class "ui-th-column" and optionally "ui-th-rtl"
BODY_DIV: 18, // tagName: "div". class: "ui-jqgrid-bdiv"
BODY_SCROLL_FULL_DIV: 19, // tagName: "div" - It can have height CSS property which simulate the total size of virtual data.
BODY_SCROLL_TOP_DIV: 20, // tagName: "div" - It can have height CSS property which simulate virtual data before the current displayed in btable.
BODY_TABLE: 21, // tagName: "table". class: "ui-jqgrid-btable". Id: gridId
GRID: 21, // tagName: "table". class: "ui-jqgrid-btable". Id: gridId
BODY_COLS_ROW: 22, // tagName: "tr". class: "jqgfirstrow"
BODY_COLS: 23, // tagName: "td"
BODY_DATA_ROWS: 24, // tagName: "tr". class: "jqgrow" and optionally "ui-row-rtl"
FOOTER_DIV: 25, // tagName: "div". class: "ui-jqgrid-sdiv"
FOOTER_BOX_DIV: 26, // tagName: "div". class: either "ui-jqgrid-hdiv" or "ui-jqgrid-hbox-rtl". ??? is it really needed ???
FOOTER_TABLE: 27, // tagName: "table". class: "ui-jqgrid-ftable"
FOOTER_DATA_ROWS: 28, // tagName: "tr". class: "footrow", optionally additionally "footrow-rtl"
BOTTOM_TOOLBAR_DIV: 29, // tagName: "div". class: "ui-userdata". Id: "tb_" + gridId
FROZEN_HEADER_DIV: 30, // tagName: "div". class: "frozen-div" and "ui-jqgrid-hdiv"
// no hBox currently exists
FROZEN_HEADER_TABLE: 31, // tagName: "table". class: "ui-jqgrid-htable"
FROZEN_HEADER_COLS_ROW: 32, // tagName: "tr". class: "jqgfirstrow"
FROZEN_HEADER_COLS: 33, // tagName: "th". class: either "ui-first-th-rtl" or "ui-first-th-rtl"
FROZEN_SEARCH_TOOLBAR: 34, // tagName: "tr". class: "ui-search-toolbar". Its direct children are th having class "ui-th-column" and optionally "ui-th-rtl"
// TODO: fix id of children of .ui-search-input to have no id duplicates with the main grid
FROZEN_FOOTER_DIV: 35, // tagName: "div". class: "frozen-div" and "ui-jqgrid-sdiv"
FROZEN_FOOTER_TABLE: 36, // tagName: "table". class: "ui-jqgrid-ftable"
FROZEN_FOOTER_DATA_ROWS: 37, // tagName: "tr". class: "footrow", optionally additionally "footrow-rtl"
FROZEN_BODY_DIV: 38, // tagName: "div". class: "frozen-div" and "ui-jqgrid-bdiv"
// no full scroll div and top scroll div is currently exist
FROZEN_BODY_TABLE: 39, // tagName: "table". class: "ui-jqgrid-btable". Id: gridId + "_frozen"
FROZEN_BODY_COLS_ROW: 40, // tagName: "tr". class: "jqgfirstrow"
FROZEN_BODY_COLS: 41, // tagName: "td"
FROZEN_BODY_DATA_ROWS: 42, // tagName: "tr". class: "jqgrow" and optionally "ui-row-rtl"
// TODO: fix id of children of .jqgrow to have no id duplicates with the main grid
COLUMN_RESIZER_DIV: 43, // tagName: "div". class: "ui-jqgrid-resize-mark". Id: "rs_m" + gridId
BOTTOM_PAGER_DIV: 44, // tagName: "div". class: "ui-jqgrid-pager"
SEARCH_OPERATION_MENU_UL: 46 // tagName: "ul". class: "ui-search-menu". id="sopt_menu"
};
if (jgrid.defaults == null || $.isEmptyObject(locales) || locales["en-US"] === undefined) {
// set English options only if no grid.locale-XX.js file are included before jquery.jqGrid.min.js or jquery.jqGrid.src.js
// the files included AFTER jquery.jqGrid.min.js or jquery.jqGrid.src.js will just overwrite all the settings which were set previously
// We can set locInfo under $.jgrid additionally to setting under $.jgrid.locales[locale]
// only to have more compatibility with the previous version of jqGrid.
// We don't make this currently.
if (locales["en-US"] === undefined) {
$.extend(true, jgrid, /*englishLanguageDefaults,*/ {
locales: {
"en-US": englishLanguageDefaults // and for English US
}
});
}
jgrid.defaults = jgrid.defaults || {};
if (jgrid.defaults.locale === undefined) {
jgrid.defaults.locale = "en-US";
}
}
jgrid.defaults = jgrid.defaults || {};
var defaults = jgrid.defaults;
//if (jgrid.defaults.locale && locales[jgrid.defaults.locale]) {
// $.extend(true, $.jgrid, locales[jgrid.defaults.locale]); // add to improve compatibility only
//}
$.extend(true, jgrid, {
/** @const */
version: "4.15.5",
/** @const */
productName: "free jqGrid",
defaults: {},
search: {},
edit: {},
view: {},
del: {},
nav: {},
col: {},
errors: {},
formatter: {
unused: "" // used only to detect whether the changes are overwritten because of wrong usage
},
icons: {
jQueryUI: {
common: "ui-icon",
pager: {
first: "ui-icon-seek-first",
prev: "ui-icon-seek-prev",
next: "ui-icon-seek-next",
last: "ui-icon-seek-end"
},
sort: {
asc: "ui-icon-triangle-1-n",
desc: "ui-icon-triangle-1-s"
},
gridMinimize: {
visible: "ui-icon-circle-triangle-n",
hidden: "ui-icon-circle-triangle-s"
},
nav: {
edit: "ui-icon-pencil",
add: "ui-icon-plus",
del: "ui-icon-trash",
search: "ui-icon-search",
refresh: "ui-icon-refresh",
view: "ui-icon-document",
save: "ui-icon-disk",
cancel: "ui-icon-cancel",
newbutton: "ui-icon-newwin"
},
actions: {
edit: "ui-icon-pencil",
del: "ui-icon-trash",
save: "ui-icon-disk",
cancel: "ui-icon-cancel"
},
form: {
close: "ui-icon-closethick",
prev: "ui-icon-triangle-1-w",
next: "ui-icon-triangle-1-e",
save: "ui-icon-disk",
undo: "ui-icon-close",
del: "ui-icon-scissors",
cancel: "ui-icon-cancel",
resizableLtr: "ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se"
},
search: {
search: "ui-icon-search",
reset: "ui-icon-arrowreturnthick-1-w",
query: "ui-icon-comment"
},
subgrid: {
plus: "ui-icon-plus",
minus: "ui-icon-minus",
openLtr: "ui-icon-caret-1-sw",
openRtl: "ui-icon-caret-1-se"
},
grouping: {
plus: "ui-icon-circlesmall-plus",
minus: "ui-icon-circlesmall-minus"
},
treeGrid: {
minus: "ui-icon-triangle-1-s",
leaf: "ui-icon-radio-off",
plusLtr: "ui-icon-triangle-1-e",
plusRtl: "ui-icon-triangle-1-w"
}
},
fontAwesome: {
common: "fa",
pager: {
common: "fa-fw",
first: "fa-step-backward",
prev: "fa-backward",
next: "fa-forward",
last: "fa-step-forward"
},
sort: {
common: "fa-lg", // common: "",
asc: "fa-sort-asc", // asc: "fa-sort-amount-asc",
desc: "fa-sort-desc" // desc: "fa-sort-amount-desc"
},
gridMinimize: {
visible: "fa-chevron-circle-up",
hidden: "fa-chevron-circle-down"
},
nav: {
common: "fa-lg fa-fw",
edit: "fa-pencil",
add: "fa-plus",
del: "fa-trash-o",
search: "fa-search",
refresh: "fa-refresh",
view: "fa-file-o",
save: "fa-floppy-o",
cancel: "fa-ban",
newbutton: "fa-external-link"
},
actions: {
common: "fa-fw",
edit: "fa-pencil",
del: "fa-trash-o",
save: "fa-floppy-o",
cancel: "fa-ban"
},
form: {
close: "fa-times",
prev: "fa-caret-left",
next: "fa-caret-right",
save: "fa-floppy-o",
undo: "fa-undo",
del: "fa-trash-o",
cancel: "fa-ban",
resizableLtr: "fa-rss fa-rotate-270"
},
search: {
search: "fa-search",
reset: "fa-undo",
query: "fa-comments-o"
},
subgrid: {
common: "fa-fw",
plus: "fa-plus",
minus: "fa-minus",
openLtr: "fa-reply fa-rotate-180",
openRtl: "fa-share fa-rotate-180"
},
grouping: {
common: "fa-fw",
plus: "fa-plus-square-o",
minus: "fa-minus-square-o"
},
treeGrid: {
common: "fa-fw",
minus: "fa-lg fa-sort-desc",
leaf: "fa-dot-circle-o",
plusLtr: "fa-lg fa-caret-right",
plusRtl: "fa-lg fa-caret-left"
},
checkbox: {
checkedClasses: "fa-check-square-o",
checked: "fa-check-square-o fa-lg",
unchecked: "fa-square-o fa-lg"
}
},
fontAwesome5: {
//common: "fas", //"fa"
pager: {
common: "fa-fw",
first: "fa-step-backward",
prev: "fa-backward",
next: "fa-forward",
last: "fa-step-forward"
},
sort: {
common: "fa-lg", // common: "",
asc: "fa-sort-up", //"fa-sort-asc", // asc: "fa-sort-amount-asc",
desc: "fa-sort-down" //"fa-sort-desc" // desc: "fa-sort-amount-desc"
},
gridMinimize: {
visible: "fa-chevron-circle-up",
hidden: "fa-chevron-circle-down"
},
nav: {
common: "fa-lg fa-fw",
edit: "fa-pencil-alt",
add: "fa-plus",
del: "fa-trash-alt",
search: "fa-search",
refresh: "fa-sync", //"fa-refresh",
view: "fa-file",
save: "fa-save",
cancel: "fa-ban",
newbutton: "fa-external-link-alt"
},
actions: {
common: "fa-fw",
edit: "fa-pencil-alt",
del: "fa-trash-alt",
save: "fa-save",
cancel: "fa-ban"
},
form: {
close: "fa-times",
prev: "fa-caret-left",
next: "fa-caret-right",
save: "fa-save",
undo: "fa-undo",
del: "fa-trash-alt",
cancel: "fa-ban",
resizableLtr: "fa-rss fa-lg fa-rotate-270"
},
search: {
search: "fa-search",
reset: "fa-undo",
query: "fa-comments"
},
subgrid: {
common: "fa-fw",
plus: "fa-plus",
minus: "fa-minus",
openLtr: "fa-reply fa-rotate-180",
openRtl: "fa-share fa-rotate-180"
},
grouping: {
common: "fa-fw",
plus: "fa-plus-square",
minus: "fa-minus-square"
},
treeGrid: {
common: "fa-fw",
minus: "fa-lg fa-sort-down", //"fa-lg fa-sort-desc",
leaf: "fa-dot-circle",
plusLtr: "fa-lg fa-caret-right",
plusRtl: "fa-lg fa-caret-left"
},
checkbox: {
ignoreParents: true,
checkedClasses: "fa-check-square",
checked: "far fa-check-square fa-lg",
unchecked: "far fa-square fa-lg"
}
},
fontAwesomeBrands: {
baseIconSet: "fontAwesome5",
common: "fab"
},
fontAwesomeLight: {
baseIconSet: "fontAwesome5",
common: "fal"
},
fontAwesomeRegular: {
baseIconSet: "fontAwesome5",
common: "far"
},
fontAwesomeSolid: {
baseIconSet: "fontAwesome5",
common: "fas"
},
fontAwesomeSVG: {
baseIconSet: "fontAwesome5",
common: "fas"
},
glyph: {
common: "glyphicon",
pager: {
common: "",
first: "glyphicon-step-backward",
prev: "glyphicon-backward",
next: "glyphicon-forward",
last: "glyphicon-step-forward"
},
sort: {
common: "",
asc: "glyphicon-triangle-top",
desc: "glyphicon-triangle-bottom"
},
gridMinimize: {
visible: "glyphicon-circle-arrow-up",
hidden: "glyphicon-circle-arrow-down"
},
nav: {
common: "",
edit: "glyphicon-edit",
add: "glyphicon-plus",
del: "glyphicon-trash",
search: "glyphicon-search",
refresh: "glyphicon-refresh",
view: "glyphicon-file", // glyphicon glyphicon-th-list
save: "glyphicon-save",
cancel: "glyphicon-ban-circle",
newbutton: "glyphicon-new-window"
},
actions: {
common: "",
edit: "glyphicon-edit",
del: "glyphicon-trash",
save: "glyphicon-save",
cancel: "glyphicon-ban-circle"
},
form: {
close: "glyphicon-remove-circle",
prev: "glyphicon-step-backward",
next: "glyphicon-step-forward",
save: "glyphicon-save",
undo: "glyphicon-repeat",
del: "glyphicon-trash",
cancel: "glyphicon-ban-circle",
resizableLtr: "glyphicon-import"
},
search: {
search: "glyphicon-search",
reset: "glyphicon-repeat",
query: "glyphicon-cog" //"glyphicon-comment"
},
subgrid: {
common: "",
plus: "glyphicon-zoom-in", //"glyphicon-plus", "glyphicon-th-list",
minus: "glyphicon-zoom-out", // "glyphicon-minus",
openLtr: "glyphicon-indent-left",
openRtl: "glyphicon-indent-left"
},
grouping: {
common: "",
plus: "glyphicon-expand",
minus: "glyphicon-collapse-down"
},
treeGrid: {
common: "",
minus: "glyphicon-triangle-bottom",
leaf: "glyphicon-record", // glyphicon-unchecked
plusLtr: "glyphicon-triangle-right",
plusRtl: "glyphicon-triangle-left"
},
checkbox: {
checkedClasses: "glyphicon-check",
checked: "glyphicon-check",
unchecked: "glyphicon-unchecked"
}
}
},
guiStyles: {
jQueryUI: {
gBox: "ui-jqgrid-jquery-ui ui-widget ui-widget-content ui-corner-all", // ui-widget-content??? for the children of gbox
gView: "",
overlay: "ui-widget-overlay",
loading: "ui-state-default ui-state-active",
hDiv: "ui-state-default ui-corner-top",
hTable: "",
colHeaders: "ui-state-default",
states: {
select: "ui-state-highlight",
disabled: "ui-state-disabled ui-jqgrid-disablePointerEvents",
hover: "ui-state-hover", // can be table-hover on <table> only and style like .table-hover tbody tr:hover td
error: "ui-state-error",
active: "ui-state-active",
textOfClickable: "ui-state-default"
},
dialog: {
header: "ui-widget-header ui-dialog-titlebar ui-corner-all ui-helper-clearfix",
window: "ui-jqgrid-jquery-ui ui-widget ui-widget-content ui-corner-all ui-front",
document: "",
subdocument: "",
body: "",
footer: "",
content: "ui-widget-content",
hr: "ui-widget-content",
closeButton: "ui-corner-all",
fmButton: "ui-state-default",
dataField: "ui-widget-content ui-corner-all",
viewCellLabel: "ui-widget-content",
viewLabel: "",
viewCellData: "ui-widget-content",
viewData: "",
leftCorner: "ui-corner-left",
rightCorner: "ui-corner-right",
defaultCorner: "ui-corner-all"
},
filterToolbar: {
dataField: "ui-widget-content"
},
subgrid: {
thSubgrid: "ui-state-default", // used only with subGridModel
rowSubTable: "ui-widget-content", // used only with subGridModel additionally to ui-subtblcell
row: "ui-widget-content", // class of the subgrid row, additional to ui-subgrid
tdStart: "", // it can be with span over rownumber and multiselect columns
tdWithIcon: "ui-widget-content", // class of cell with +- icon, additional to subgrid-cell
buttonDiv: "",
button: "",
tdData: "ui-widget-content", // class of main td with span over the grid, additional subgrid-data
legacyTable: ""
},
grid: "",
gridRow: "ui-widget-content",
rowNum: "ui-state-default",
gridFooter: "",
rowFooter: "ui-widget-content",
gridTitle: "ui-widget-header ui-corner-top",
gridError: "ui-state-error",
gridErrorText: "",
titleButton: "ui-corner-all",
toolbarUpper: "ui-state-default",
toolbarBottom: "ui-state-default",
actionsDiv: "ui-widget-content",
actionsButton: "ui-corner-all",
pager: {
pager: "ui-state-default",
pagerButton: "ui-corner-all",
pagerInput: "ui-widget-content",
pagerSelect: "ui-widget-content"
},
navButton: "ui-corner-all",
searchDialog: {
operator: "ui-corner-all",
label: "ui-corner-all",
elem: "ui-corner-all",
operationGroup: "",
addRuleButton: "ui-corner-all",
deleteRuleButton: "ui-corner-all",
operationSelect: "ui-corner-all",
addGroupButton: "ui-corner-all",
deleteGroupButton: "ui-corner-all"
},
searchToolbar: {
menu: "ui-menu-jqueryui ui-menu ui-widget ui-widget-content ui-corner-all",
menuItem: "ui-menu-item",
menuItemButton: "ui-corner-all",
operButton: "ui-corner-all",
clearButton: "ui-corner-all"
},
top: "ui-corner-top",
bottom: "ui-corner-bottom",
resizer: "ui-widget-header"
},
bootstrap: {
gBox: "ui-jqgrid-bootstrap",
gView: "panel-info",
overlay: "modal-backdrop",
loading: "alert alert-info",
hDiv: "",
hTable: "table table-hover table-condensed table-bordered",
colHeaders: "",
states: {
select: "success",
disabled: "disabled ui-jqgrid-disablePointerEvents",
hover: "active",
error: "danger",
active: "active",
textOfClickable: ""
},
dialog: {
header: "modal-header",
window: "modal ui-jqgrid-bootstrap",
document: "modal-dialog",
subdocument: "modal-content",
body: "modal-body",
footer: "modal-footer",
content: "modal-content",
hr: "hidden",
closeButton: "btn btn-xs btn-default",
fmButton: "btn btn-default",
dataField: "form-control",
viewCellLabel: "",
viewLabel: "control-label",
viewCellData: "",
viewData: "form-control",
leftCorner: "",
rightCorner: "",
defaultCorner: ""
},
filterToolbar: {
dataField: "form-control"
},
subgrid: {
thSubgrid: "",
rowSubTable: "",
row: "",
tdStart: "",
tdWithIcon: "",
buttonDiv: "",
button: "btn btn-xs",
tdData: "",
legacyTable: "table table-condensed table-hover table-bordered"
},
grid: "table table-condensed table-hover table-bordered",
gridRow: "",
rowNum: "",
gridFooter: "table table-hover table-condensed table-bordered",
rowFooter: "",
gridTitle: "",
gridError: "alert alert-danger",
gridErrorText: "sr-only",
titleButton: "btn btn-xs btn-default",
actionsDiv: "",
actionsButton: "btn btn-xs btn-default",
toolbarUpper: "",
toolbarBottom: "",
pager: {
pager: "panel-footer",
pagerButton: "btn btn-xs",
pagerInput: "form-control",
pagerSelect: "form-control"
},
navButton: "btn btn-xs",
searchDialog: {
operator: "form-control",
label: "form-control",
elem: "form-control",
operationGroup: "form-inline",
addRuleButton: "btn btn-xs btn-default",
deleteRuleButton: "btn btn-xs btn-default",
operationSelect: "form-control",
addGroupButton: "btn btn-xs btn-default",
deleteGroupButton: "btn btn-xs btn-default"
},
searchToolbar: {
menu: "dropdown-menu",
menuItem: "",
menuItemButton: "ui-corner-all",
operButton: "btn btn-xs btn-default",
clearButton: "btn btn-xs btn-default"
},
top: "ui-jqgrid-bootstrap-corner-top",
bottom: "ui-jqgrid-bootstrap-corner-bottom",
resizer: "ui-jqgrid-bootstrap"
},
bootstrapPrimary: {
baseGuiStyle: "bootstrap",
dialog: {
closeButton: "btn btn-xs close",
fmButton: "btn btn-primary"
},
searchDialog: {
addRuleButton: "btn btn-xs btn-primary",
deleteRuleButton: "btn btn-xs btn-primary",
addGroupButton: "btn btn-xs btn-primary",
deleteGroupButton: "btn btn-xs btn-primary"
}
},
bootstrap4: {
gBox: "ui-jqgrid-bootstrap",
gView: "card",
overlay: "modal-backdrop",
loading: "alert alert-info",
hDiv: "",
hTable: "table table-hover table-sm table-bordered",
colHeaders: "",
states: {
select: "table-success",
disabled: "disabled ui-jqgrid-disablePointerEvents",
hover: "active",
hoverTh: "table-active",
error: "danger",
active: "active",
textOfClickable: ""
},
dialog: {
header: "modal-header",
window: "modal ui-jqgrid-bootstrap",
document: "modal-dialog",
subdocument: "modal-content",
body: "modal-body",
footer: "modal-footer",
content: "modal-content",
hr: "d-none",
closeButton: "btn btn-xs btn-outline-primary",
fmButton: "btn btn-outline-secondary",
dataField: "form-control",
viewCellLabel: "",
viewLabel: "control-label",
viewCellData: "",
viewData: "form-control",
leftCorner: "",
rightCorner: "",
defaultCorner: ""
},
filterToolbar: {
dataField: "form-control"
},
subgrid: {
thSubgrid: "",
rowSubTable: "",
row: "",
tdStart: "",
tdWithIcon: "",
buttonDiv: "",
button: "btn btn-xs",
tdData: "",
legacyTable: "table table-condensed table-hover table-bordered"
},
grid: "table table-condensed table-hover table-bordered",
gridRow: "",
rowNum: "",
gridFooter: "table table-hover table-condensed table-bordered",
rowFooter: "",
gridTitle: "",
gridError: "alert alert-danger",
gridErrorText: "sr-only",
titleButton: "btn btn-xs btn-outline-primary",
actionsDiv: "",
actionsButton: "btn btn-xs btn-outline-secondary",
toolbarUpper: "",
toolbarBottom: "",
pager: {
pager: "card-footer",
pagerButton: "btn btn-xs",
pagerInput: "form-control",
pagerSelect: "form-control"
},
navButton: "btn btn-xs",
searchDialog: {
operator: "form-control",
label: "form-control",
elem: "form-control",
operationGroup: "form-inline",
addRuleButton: "btn btn-xs btn-default",
deleteRuleButton: "btn btn-xs btn-default",
operationSelect: "form-control",
addGroupButton: "btn btn-xs btn-default",
deleteGroupButton: "btn btn-xs btn-default"
},
searchToolbar: {
menu: "dropdown-menu",
menuItem: "",
menuItemButton: "dropdown-item",