jqgrid-jquery-rails 4.3.2.0 → 4.3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jqgrid-jquery-rails/version.rb +1 -1
- data/vendor/assets/javascripts/i18n/grid.locale-ar.js +127 -127
- data/vendor/assets/javascripts/i18n/grid.locale-de.js +47 -9
- data/vendor/assets/javascripts/i18n/grid.locale-dk.js +128 -0
- data/vendor/assets/javascripts/i18n/grid.locale-en.js +52 -12
- data/vendor/assets/javascripts/i18n/grid.locale-fa.js +145 -145
- data/vendor/assets/javascripts/i18n/grid.locale-fi.js +130 -130
- data/vendor/assets/javascripts/i18n/grid.locale-fr.js +127 -127
- data/vendor/assets/javascripts/i18n/grid.locale-hr.js +129 -129
- data/vendor/assets/javascripts/i18n/grid.locale-hr1250.js +129 -129
- data/vendor/assets/javascripts/i18n/grid.locale-is.js +127 -127
- data/vendor/assets/javascripts/i18n/grid.locale-mne.js +129 -129
- data/vendor/assets/javascripts/i18n/grid.locale-no.js +1 -1
- data/vendor/assets/javascripts/i18n/grid.locale-pl.js +79 -75
- data/vendor/assets/javascripts/i18n/grid.locale-sr-latin.js +129 -129
- data/vendor/assets/javascripts/i18n/grid.locale-sr.js +129 -129
- data/vendor/assets/javascripts/i18n/grid.locale-th.js +129 -129
- data/vendor/assets/javascripts/jquery.jqGrid.js +215 -167
- metadata +2 -1
@@ -1,129 +1,129 @@
|
|
1
|
-
;(function($){
|
2
|
-
/**
|
3
|
-
* jqGrid Thai Translation
|
4
|
-
* Kittituch Manakul m.kittituch@Gmail.com
|
5
|
-
* http://trirand.com/blog/
|
6
|
-
* Dual licensed under the MIT and GPL licenses:
|
7
|
-
* http://www.opensource.org/licenses/mit-license.php
|
8
|
-
* http://www.gnu.org/licenses/gpl.html
|
9
|
-
**/
|
10
|
-
$.jgrid = $.jgrid || {};
|
11
|
-
$.extend($.jgrid,{
|
12
|
-
defaults : {
|
13
|
-
recordtext: "แสดง {0} - {1} จาก {2}",
|
14
|
-
emptyrecords: "ไม่พบข้อมูล",
|
15
|
-
loadtext: "กำลังร้องขอข้อมูล...",
|
16
|
-
pgtext : "หน้า {0} จาก {1}"
|
17
|
-
},
|
18
|
-
search : {
|
19
|
-
caption: "กำลังค้นหา...",
|
20
|
-
Find: "ค้นหา",
|
21
|
-
Reset: "คืนค่ากลับ",
|
22
|
-
odata : ['เท่ากับ', 'ไม่เท่ากับ', 'น้อยกว่า', 'ไม่มากกว่า','มากกกว่า','ไม่น้อยกว่า', 'ขึ้นต้นด้วย','ไม่ขึ้นต้นด้วย','มีคำใดคำหนึ่งใน','ไม่มีคำใดคำหนึ่งใน','ลงท้ายด้วย','ไม่ลงท้ายด้วย','มีคำว่า','ไม่มีคำว่า'],
|
23
|
-
groupOps: [ { op: "และ", text: "ทั้งหมด" }, { op: "หรือ", text: "ใดๆ" } ],
|
24
|
-
matchText: " ตรงกันกับ",
|
25
|
-
rulesText: " ตามกฏ"
|
26
|
-
},
|
27
|
-
edit : {
|
28
|
-
addCaption: "เพิ่มข้อมูล",
|
29
|
-
editCaption: "แก้ไขข้อมูล",
|
30
|
-
bSubmit: "บันทึก",
|
31
|
-
bCancel: "ยกเลิก",
|
32
|
-
bClose: "ปิด",
|
33
|
-
saveData: "คุณต้องการบันทึการแก้ไข ใช่หรือไม่?",
|
34
|
-
bYes : "บันทึก",
|
35
|
-
bNo : "ละทิ้งการแก้ไข",
|
36
|
-
bExit : "ยกเลิก",
|
37
|
-
msg: {
|
38
|
-
required:"ข้อมูลนี้จำเป็น",
|
39
|
-
number:"กรุณากรอกหมายเลขให้ถูกต้อง",
|
40
|
-
minValue:"ค่าของข้อมูลนี้ต้องไม่น้อยกว่า",
|
41
|
-
maxValue:"ค่าของข้อมูลนี้ต้องไม่มากกว่า",
|
42
|
-
email: "อีเมลล์นี้ไม่ถูกต้อง",
|
43
|
-
integer: "กรุณากรอกเป็นจำนวนเต็ม",
|
44
|
-
date: "กรุณากรอกวันที่ให้ถูกต้อง",
|
45
|
-
url: "URL ไม่ถูกต้อง URL จำเป็นต้องขึ้นต้นด้วย 'http://' หรือ 'https://'",
|
46
|
-
nodefined : "ไม่ได้ถูกกำหนดค่า!",
|
47
|
-
novalue : "ต้องการการคืนค่า!",
|
48
|
-
customarray : "ฟังก์ชันที่สร้างขึ้นต้องส่งค่ากลับเป็นแบบแอเรย์",
|
49
|
-
customfcheck : "ระบบต้องการฟังก์ชันที่สร้างขึ้นสำหรับการตรวจสอบ!"
|
50
|
-
|
51
|
-
}
|
52
|
-
},
|
53
|
-
view : {
|
54
|
-
caption: "เรียกดูข้อมูล",
|
55
|
-
bClose: "ปิด"
|
56
|
-
},
|
57
|
-
del : {
|
58
|
-
caption: "ลบข้อมูล",
|
59
|
-
msg: "คุณต้องการลบข้อมูลที่ถูกเลือก ใช่หรือไม่?",
|
60
|
-
bSubmit: "ต้องการลบ",
|
61
|
-
bCancel: "ยกเลิก"
|
62
|
-
},
|
63
|
-
nav : {
|
64
|
-
edittext: "",
|
65
|
-
edittitle: "แก้ไขข้อมูล",
|
66
|
-
addtext:"",
|
67
|
-
addtitle: "เพิ่มข้อมูล",
|
68
|
-
deltext: "",
|
69
|
-
deltitle: "ลบข้อมูล",
|
70
|
-
searchtext: "",
|
71
|
-
searchtitle: "ค้นหาข้อมูล",
|
72
|
-
refreshtext: "",
|
73
|
-
refreshtitle: "รีเฟรช",
|
74
|
-
alertcap: "คำเตือน",
|
75
|
-
alerttext: "กรุณาเลือกข้อมูล",
|
76
|
-
viewtext: "",
|
77
|
-
viewtitle: "ดูรายละเอียดข้อมูล"
|
78
|
-
},
|
79
|
-
col : {
|
80
|
-
caption: "กรุณาเลือกคอลัมน์",
|
81
|
-
bSubmit: "ตกลง",
|
82
|
-
bCancel: "ยกเลิก"
|
83
|
-
},
|
84
|
-
errors : {
|
85
|
-
errcap : "เกิดความผิดพลาด",
|
86
|
-
nourl : "ไม่ได้กำหนด URL",
|
87
|
-
norecords: "ไม่มีข้อมูลให้ดำเนินการ",
|
88
|
-
model : "จำนวนคอลัมน์ไม่เท่ากับจำนวนคอลัมน์โมเดล!"
|
89
|
-
},
|
90
|
-
formatter : {
|
91
|
-
integer : {thousandsSeparator: " ", defaultValue: '0'},
|
92
|
-
number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
|
93
|
-
currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
|
94
|
-
date : {
|
95
|
-
dayNames: [
|
96
|
-
"อา", "จ", "อ", "พ", "พฤ", "ศ", "ส",
|
97
|
-
"อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัสบดี", "ศูกร์", "เสาร์"
|
98
|
-
],
|
99
|
-
monthNames: [
|
100
|
-
"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.",
|
101
|
-
"มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฏาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"
|
102
|
-
],
|
103
|
-
AmPm : ["am","pm","AM","PM"],
|
104
|
-
S: function (j) {return ''},
|
105
|
-
srcformat: 'Y-m-d',
|
106
|
-
newformat: 'd/m/Y',
|
107
|
-
masks : {
|
108
|
-
ISO8601Long:"Y-m-d H:i:s",
|
109
|
-
ISO8601Short:"Y-m-d",
|
110
|
-
ShortDate: "n/j/Y",
|
111
|
-
LongDate: "l, F d, Y",
|
112
|
-
FullDateTime: "l, F d, Y g:i:s A",
|
113
|
-
MonthDay: "F d",
|
114
|
-
ShortTime: "g:i A",
|
115
|
-
LongTime: "g:i:s A",
|
116
|
-
SortableDateTime: "Y-m-d\\TH:i:s",
|
117
|
-
UniversalSortableDateTime: "Y-m-d H:i:sO",
|
118
|
-
YearMonth: "F, Y"
|
119
|
-
},
|
120
|
-
reformatAfterEdit : false
|
121
|
-
},
|
122
|
-
baseLinkUrl: '',
|
123
|
-
showAction: '',
|
124
|
-
target: '',
|
125
|
-
checkbox : {disabled:true},
|
126
|
-
idName : 'id'
|
127
|
-
}
|
128
|
-
});
|
129
|
-
})(jQuery);
|
1
|
+
;(function($){
|
2
|
+
/**
|
3
|
+
* jqGrid Thai Translation
|
4
|
+
* Kittituch Manakul m.kittituch@Gmail.com
|
5
|
+
* http://trirand.com/blog/
|
6
|
+
* Dual licensed under the MIT and GPL licenses:
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
8
|
+
* http://www.gnu.org/licenses/gpl.html
|
9
|
+
**/
|
10
|
+
$.jgrid = $.jgrid || {};
|
11
|
+
$.extend($.jgrid,{
|
12
|
+
defaults : {
|
13
|
+
recordtext: "แสดง {0} - {1} จาก {2}",
|
14
|
+
emptyrecords: "ไม่พบข้อมูล",
|
15
|
+
loadtext: "กำลังร้องขอข้อมูล...",
|
16
|
+
pgtext : "หน้า {0} จาก {1}"
|
17
|
+
},
|
18
|
+
search : {
|
19
|
+
caption: "กำลังค้นหา...",
|
20
|
+
Find: "ค้นหา",
|
21
|
+
Reset: "คืนค่ากลับ",
|
22
|
+
odata : ['เท่ากับ', 'ไม่เท่ากับ', 'น้อยกว่า', 'ไม่มากกว่า','มากกกว่า','ไม่น้อยกว่า', 'ขึ้นต้นด้วย','ไม่ขึ้นต้นด้วย','มีคำใดคำหนึ่งใน','ไม่มีคำใดคำหนึ่งใน','ลงท้ายด้วย','ไม่ลงท้ายด้วย','มีคำว่า','ไม่มีคำว่า'],
|
23
|
+
groupOps: [ { op: "และ", text: "ทั้งหมด" }, { op: "หรือ", text: "ใดๆ" } ],
|
24
|
+
matchText: " ตรงกันกับ",
|
25
|
+
rulesText: " ตามกฏ"
|
26
|
+
},
|
27
|
+
edit : {
|
28
|
+
addCaption: "เพิ่มข้อมูล",
|
29
|
+
editCaption: "แก้ไขข้อมูล",
|
30
|
+
bSubmit: "บันทึก",
|
31
|
+
bCancel: "ยกเลิก",
|
32
|
+
bClose: "ปิด",
|
33
|
+
saveData: "คุณต้องการบันทึการแก้ไข ใช่หรือไม่?",
|
34
|
+
bYes : "บันทึก",
|
35
|
+
bNo : "ละทิ้งการแก้ไข",
|
36
|
+
bExit : "ยกเลิก",
|
37
|
+
msg: {
|
38
|
+
required:"ข้อมูลนี้จำเป็น",
|
39
|
+
number:"กรุณากรอกหมายเลขให้ถูกต้อง",
|
40
|
+
minValue:"ค่าของข้อมูลนี้ต้องไม่น้อยกว่า",
|
41
|
+
maxValue:"ค่าของข้อมูลนี้ต้องไม่มากกว่า",
|
42
|
+
email: "อีเมลล์นี้ไม่ถูกต้อง",
|
43
|
+
integer: "กรุณากรอกเป็นจำนวนเต็ม",
|
44
|
+
date: "กรุณากรอกวันที่ให้ถูกต้อง",
|
45
|
+
url: "URL ไม่ถูกต้อง URL จำเป็นต้องขึ้นต้นด้วย 'http://' หรือ 'https://'",
|
46
|
+
nodefined : "ไม่ได้ถูกกำหนดค่า!",
|
47
|
+
novalue : "ต้องการการคืนค่า!",
|
48
|
+
customarray : "ฟังก์ชันที่สร้างขึ้นต้องส่งค่ากลับเป็นแบบแอเรย์",
|
49
|
+
customfcheck : "ระบบต้องการฟังก์ชันที่สร้างขึ้นสำหรับการตรวจสอบ!"
|
50
|
+
|
51
|
+
}
|
52
|
+
},
|
53
|
+
view : {
|
54
|
+
caption: "เรียกดูข้อมูล",
|
55
|
+
bClose: "ปิด"
|
56
|
+
},
|
57
|
+
del : {
|
58
|
+
caption: "ลบข้อมูล",
|
59
|
+
msg: "คุณต้องการลบข้อมูลที่ถูกเลือก ใช่หรือไม่?",
|
60
|
+
bSubmit: "ต้องการลบ",
|
61
|
+
bCancel: "ยกเลิก"
|
62
|
+
},
|
63
|
+
nav : {
|
64
|
+
edittext: "",
|
65
|
+
edittitle: "แก้ไขข้อมูล",
|
66
|
+
addtext:"",
|
67
|
+
addtitle: "เพิ่มข้อมูล",
|
68
|
+
deltext: "",
|
69
|
+
deltitle: "ลบข้อมูล",
|
70
|
+
searchtext: "",
|
71
|
+
searchtitle: "ค้นหาข้อมูล",
|
72
|
+
refreshtext: "",
|
73
|
+
refreshtitle: "รีเฟรช",
|
74
|
+
alertcap: "คำเตือน",
|
75
|
+
alerttext: "กรุณาเลือกข้อมูล",
|
76
|
+
viewtext: "",
|
77
|
+
viewtitle: "ดูรายละเอียดข้อมูล"
|
78
|
+
},
|
79
|
+
col : {
|
80
|
+
caption: "กรุณาเลือกคอลัมน์",
|
81
|
+
bSubmit: "ตกลง",
|
82
|
+
bCancel: "ยกเลิก"
|
83
|
+
},
|
84
|
+
errors : {
|
85
|
+
errcap : "เกิดความผิดพลาด",
|
86
|
+
nourl : "ไม่ได้กำหนด URL",
|
87
|
+
norecords: "ไม่มีข้อมูลให้ดำเนินการ",
|
88
|
+
model : "จำนวนคอลัมน์ไม่เท่ากับจำนวนคอลัมน์โมเดล!"
|
89
|
+
},
|
90
|
+
formatter : {
|
91
|
+
integer : {thousandsSeparator: " ", defaultValue: '0'},
|
92
|
+
number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
|
93
|
+
currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
|
94
|
+
date : {
|
95
|
+
dayNames: [
|
96
|
+
"อา", "จ", "อ", "พ", "พฤ", "ศ", "ส",
|
97
|
+
"อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัสบดี", "ศูกร์", "เสาร์"
|
98
|
+
],
|
99
|
+
monthNames: [
|
100
|
+
"ม.ค.", "ก.พ.", "มี.ค.", "เม.ย.", "พ.ค.", "มิ.ย.", "ก.ค.", "ส.ค.", "ก.ย.", "ต.ค.", "พ.ย.", "ธ.ค.",
|
101
|
+
"มกราคม", "กุมภาพันธ์", "มีนาคม", "เมษายน", "พฤษภาคม", "มิถุนายน", "กรกฏาคม", "สิงหาคม", "กันยายน", "ตุลาคม", "พฤศจิกายน", "ธันวาคม"
|
102
|
+
],
|
103
|
+
AmPm : ["am","pm","AM","PM"],
|
104
|
+
S: function (j) {return ''},
|
105
|
+
srcformat: 'Y-m-d',
|
106
|
+
newformat: 'd/m/Y',
|
107
|
+
masks : {
|
108
|
+
ISO8601Long:"Y-m-d H:i:s",
|
109
|
+
ISO8601Short:"Y-m-d",
|
110
|
+
ShortDate: "n/j/Y",
|
111
|
+
LongDate: "l, F d, Y",
|
112
|
+
FullDateTime: "l, F d, Y g:i:s A",
|
113
|
+
MonthDay: "F d",
|
114
|
+
ShortTime: "g:i A",
|
115
|
+
LongTime: "g:i:s A",
|
116
|
+
SortableDateTime: "Y-m-d\\TH:i:s",
|
117
|
+
UniversalSortableDateTime: "Y-m-d H:i:sO",
|
118
|
+
YearMonth: "F, Y"
|
119
|
+
},
|
120
|
+
reformatAfterEdit : false
|
121
|
+
},
|
122
|
+
baseLinkUrl: '',
|
123
|
+
showAction: '',
|
124
|
+
target: '',
|
125
|
+
checkbox : {disabled:true},
|
126
|
+
idName : 'id'
|
127
|
+
}
|
128
|
+
});
|
129
|
+
})(jQuery);
|
@@ -2,12 +2,12 @@
|
|
2
2
|
// @compilation_level SIMPLE_OPTIMIZATIONS
|
3
3
|
|
4
4
|
/**
|
5
|
-
* @license jqGrid 4.3.
|
5
|
+
* @license jqGrid 4.3.3 - jQuery Grid
|
6
6
|
* Copyright (c) 2008, Tony Tomov, tony@trirand.com
|
7
7
|
* Dual licensed under the MIT and GPL licenses
|
8
8
|
* http://www.opensource.org/licenses/mit-license.php
|
9
9
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
10
|
-
* Date:
|
10
|
+
* Date: 2012-05-31
|
11
11
|
*/
|
12
12
|
//jsHint options
|
13
13
|
/*global document, window, jQuery, DOMParser, ActiveXObject, $, alert */
|
@@ -181,6 +181,14 @@ $.extend($.jgrid,{
|
|
181
181
|
return ret.length > 0 ? $(ret).text() : undefined;
|
182
182
|
}
|
183
183
|
},
|
184
|
+
cellWidth : function () {
|
185
|
+
var $testDiv = $("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>"),
|
186
|
+
testCell = $testDiv.appendTo("body")
|
187
|
+
.find("td")
|
188
|
+
.width();
|
189
|
+
$testDiv.remove();
|
190
|
+
return testCell !== 5;
|
191
|
+
},
|
184
192
|
ajaxOptions: {},
|
185
193
|
from : function(source){
|
186
194
|
// Original Author Hugo Bonacci
|
@@ -244,11 +252,8 @@ $.extend($.jgrid,{
|
|
244
252
|
if(_trim){
|
245
253
|
phrase=$.trim(phrase);
|
246
254
|
}
|
247
|
-
if(!_usecase){
|
248
|
-
phrase=phrase.toLowerCase();
|
249
|
-
}
|
250
255
|
phrase=phrase.toString().replace(/\\/g,'\\\\').replace(/\"/g,'\\"');
|
251
|
-
return phrase;
|
256
|
+
return _usecase ? phrase : phrase.toLowerCase();
|
252
257
|
};
|
253
258
|
this._funcLoop=function(func){
|
254
259
|
var results=[];
|
@@ -933,8 +938,7 @@ $.fn.jqGrid = function( pin ) {
|
|
933
938
|
return;
|
934
939
|
}
|
935
940
|
var gv = $("<div class='ui-jqgrid-view'></div>"), ii,
|
936
|
-
isMSIE = $.browser.msie ? true:false
|
937
|
-
isSafari = $.browser.webkit || $.browser.safari ? true : false;
|
941
|
+
isMSIE = $.browser.msie ? true:false;
|
938
942
|
ts.p.direction = $.trim(ts.p.direction.toLowerCase());
|
939
943
|
if($.inArray(ts.p.direction,["ltr","rtl"]) == -1) { ts.p.direction = "ltr"; }
|
940
944
|
dir = ts.p.direction;
|
@@ -1174,15 +1178,16 @@ $.fn.jqGrid = function( pin ) {
|
|
1174
1178
|
rid = ts.p.idPrefix + rid;
|
1175
1179
|
altr = rcnt === 0 ? 0 : rcnt+1;
|
1176
1180
|
cn1 = (altr+j)%2 == 1 ? cn : '';
|
1177
|
-
var
|
1181
|
+
var iStartTrTag = rowData.length;
|
1182
|
+
rowData.push("");
|
1178
1183
|
if( ni ) {
|
1179
|
-
|
1184
|
+
rowData.push( addRowNum(0,j,ts.p.page,ts.p.rowNum) );
|
1180
1185
|
}
|
1181
1186
|
if( gi ) {
|
1182
|
-
|
1187
|
+
rowData.push( addMulti(rid,ni,j) );
|
1183
1188
|
}
|
1184
1189
|
if( si ) {
|
1185
|
-
|
1190
|
+
rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,j+rcnt) );
|
1186
1191
|
}
|
1187
1192
|
if(xmlRd.repeatitems){
|
1188
1193
|
if (!F) { F=orderedCols(gi+si+ni); }
|
@@ -1192,24 +1197,19 @@ $.fn.jqGrid = function( pin ) {
|
|
1192
1197
|
if (!cell) { return false; }
|
1193
1198
|
v = cell.textContent || cell.text;
|
1194
1199
|
rd[ts.p.colModel[k+gi+si+ni].name] = v;
|
1195
|
-
|
1200
|
+
rowData.push( addCell(rid,v,k+gi+si+ni,j+rcnt,xmlr) );
|
1196
1201
|
});
|
1197
1202
|
} else {
|
1198
1203
|
for(i = 0; i < f.length;i++) {
|
1199
1204
|
v = $.jgrid.getXmlData( xmlr, f[i]);
|
1200
1205
|
rd[ts.p.colModel[i+gi+si+ni].name] = v;
|
1201
|
-
|
1206
|
+
rowData.push( addCell(rid, v, i+gi+si+ni, j+rcnt, xmlr) );
|
1202
1207
|
}
|
1203
1208
|
}
|
1204
|
-
rowData
|
1205
|
-
rowData.push( cs.join(''));
|
1209
|
+
rowData[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr);
|
1206
1210
|
rowData.push("</tr>");
|
1207
1211
|
if(ts.p.grouping) {
|
1208
|
-
|
1209
|
-
for(var z=0;z<grlen;z++) {
|
1210
|
-
grpitem.push(rd[ts.p.groupingView.groupField[z]]);
|
1211
|
-
}
|
1212
|
-
grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpitem, grpdata, rd);
|
1212
|
+
grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, j);
|
1213
1213
|
rowData = [];
|
1214
1214
|
}
|
1215
1215
|
if(locdata || ts.p.treeGrid === true) {
|
@@ -1261,7 +1261,7 @@ $.fn.jqGrid = function( pin ) {
|
|
1261
1261
|
if(locdata) {
|
1262
1262
|
while (ir<gl) {
|
1263
1263
|
xmlr = gxml[ir];
|
1264
|
-
rid = getId(xmlr,ir);
|
1264
|
+
rid = getId(xmlr,ir+br);
|
1265
1265
|
rid = ts.p.idPrefix + rid;
|
1266
1266
|
if(xmlRd.repeatitems){
|
1267
1267
|
if (!F) { F=orderedCols(gi+si+ni); }
|
@@ -1349,15 +1349,16 @@ $.fn.jqGrid = function( pin ) {
|
|
1349
1349
|
idr = ts.p.idPrefix + idr;
|
1350
1350
|
altr = rcnt === 1 ? 0 : rcnt;
|
1351
1351
|
cn1 = (altr+i)%2 == 1 ? cn : '';
|
1352
|
-
var
|
1352
|
+
var iStartTrTag = rowData.length;
|
1353
|
+
rowData.push("");
|
1353
1354
|
if( ni ) {
|
1354
|
-
|
1355
|
+
rowData.push( addRowNum(0,i,ts.p.page,ts.p.rowNum) );
|
1355
1356
|
}
|
1356
1357
|
if( gi ){
|
1357
|
-
|
1358
|
+
rowData.push( addMulti(idr,ni,i) );
|
1358
1359
|
}
|
1359
1360
|
if( si ) {
|
1360
|
-
|
1361
|
+
rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,i+rcnt) );
|
1361
1362
|
}
|
1362
1363
|
if (dReader.repeatitems) {
|
1363
1364
|
if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
|
@@ -1365,18 +1366,13 @@ $.fn.jqGrid = function( pin ) {
|
|
1365
1366
|
}
|
1366
1367
|
for (j=0;j<F.length;j++) {
|
1367
1368
|
v = $.jgrid.getAccessor(cur,F[j]);
|
1368
|
-
|
1369
|
+
rowData.push( addCell(idr,v,j+gi+si+ni,i+rcnt,cur) );
|
1369
1370
|
rd[ts.p.colModel[j+gi+si+ni].name] = v;
|
1370
1371
|
}
|
1371
|
-
rowData
|
1372
|
-
rowData.push( cs.join('') );
|
1372
|
+
rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur);
|
1373
1373
|
rowData.push( "</tr>" );
|
1374
1374
|
if(ts.p.grouping) {
|
1375
|
-
|
1376
|
-
for(var z=0;z<grlen;z++) {
|
1377
|
-
grpitem.push(rd[ts.p.groupingView.groupField[z]]);
|
1378
|
-
}
|
1379
|
-
grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpitem, grpdata, rd);
|
1375
|
+
grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, i);
|
1380
1376
|
rowData = [];
|
1381
1377
|
}
|
1382
1378
|
if(locdata || ts.p.treeGrid===true) {
|
@@ -1465,7 +1461,7 @@ $.fn.jqGrid = function( pin ) {
|
|
1465
1461
|
if(!$.isArray(ts.p.data)) {
|
1466
1462
|
return;
|
1467
1463
|
}
|
1468
|
-
var grpview = ts.p.grouping ? ts.p.groupingView : false;
|
1464
|
+
var grpview = ts.p.grouping ? ts.p.groupingView : false, lengrp, gin;
|
1469
1465
|
$.each(ts.p.colModel,function(){
|
1470
1466
|
sorttype = this.sorttype || "text";
|
1471
1467
|
if(sorttype == "date" || sorttype == "datetime") {
|
@@ -1487,13 +1483,17 @@ $.fn.jqGrid = function( pin ) {
|
|
1487
1483
|
} else {
|
1488
1484
|
cmtypes[this.name] = {"stype": sorttype, "srcfmt":'',"newfmt":''};
|
1489
1485
|
}
|
1490
|
-
if(ts.p.grouping
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1486
|
+
if(ts.p.grouping ) {
|
1487
|
+
for(gin =0, lengrp = grpview.groupField.length; gin< lengrp; gin++) {
|
1488
|
+
if( this.name == grpview.groupField[gin]) {
|
1489
|
+
var grindex = this.name;
|
1490
|
+
if (typeof this.index != 'undefined') {
|
1491
|
+
grindex = this.index;
|
1492
|
+
}
|
1493
|
+
grtypes[gin] = cmtypes[this.name];
|
1494
|
+
grindexes[gin] = grindex;
|
1495
|
+
}
|
1494
1496
|
}
|
1495
|
-
grtypes[0] = cmtypes[grindex];
|
1496
|
-
grindexes.push(grindex);
|
1497
1497
|
}
|
1498
1498
|
if(!fndsort && (this.index == ts.p.sortname || this.name == ts.p.sortname)){
|
1499
1499
|
st = this.name; // ???
|
@@ -1586,7 +1586,9 @@ $.fn.jqGrid = function( pin ) {
|
|
1586
1586
|
}
|
1587
1587
|
}
|
1588
1588
|
if(ts.p.grouping) {
|
1589
|
-
|
1589
|
+
for(gin=0; gin<lengrp;gin++) {
|
1590
|
+
query.orderBy(grindexes[gin],grpview.groupOrder[gin],grtypes[gin].stype, grtypes[gin].srcfmt);
|
1591
|
+
}
|
1590
1592
|
grpview.groupDataSorted = true;
|
1591
1593
|
}
|
1592
1594
|
if (st && ts.p.sortorder && fndsort) {
|
@@ -1777,7 +1779,10 @@ $.fn.jqGrid = function( pin ) {
|
|
1777
1779
|
data: $.isFunction(ts.p.serializeGridData)? ts.p.serializeGridData.call(ts,ts.p.postData) : ts.p.postData,
|
1778
1780
|
success:function(data,st, xhr) {
|
1779
1781
|
if ($.isFunction(ts.p.beforeProcessing)) {
|
1780
|
-
|
1782
|
+
if (ts.p.beforeProcessing.call(ts, data, st, xhr) === false) {
|
1783
|
+
endReq();
|
1784
|
+
return;
|
1785
|
+
}
|
1781
1786
|
}
|
1782
1787
|
if(dt === "xml") { addXmlData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
|
1783
1788
|
else { addJSONData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
|
@@ -2025,7 +2030,7 @@ $.fn.jqGrid = function( pin ) {
|
|
2025
2030
|
if(ts.p.sortname != index && idxcol) {ts.p.lastsort = idxcol;}
|
2026
2031
|
},
|
2027
2032
|
setColWidth = function () {
|
2028
|
-
var initwidth = 0, brd
|
2033
|
+
var initwidth = 0, brd=$.jgrid.cellWidth()? 0: intNum(ts.p.cellLayout,0), vc=0, lvc, scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,
|
2029
2034
|
cl = 0, cr;
|
2030
2035
|
$.each(ts.p.colModel, function() {
|
2031
2036
|
if(typeof this.hidden === 'undefined') {this.hidden=false;}
|
@@ -2085,7 +2090,7 @@ $.fn.jqGrid = function( pin ) {
|
|
2085
2090
|
return j-ret;
|
2086
2091
|
},
|
2087
2092
|
getOffset = function (iCol) {
|
2088
|
-
var i, ret = {}, brd1 =
|
2093
|
+
var i, ret = {}, brd1 = $.jgrid.cellWidth() ? 0 : ts.p.cellLayout;
|
2089
2094
|
ret[0] = ret[1] = ret[2] = 0;
|
2090
2095
|
for(i=0;i<=iCol;i++){
|
2091
2096
|
if(ts.p.colModel[i].hidden === false ) {
|
@@ -2123,7 +2128,7 @@ $.fn.jqGrid = function( pin ) {
|
|
2123
2128
|
if(ts.p.grouping===true) {
|
2124
2129
|
ts.p.scroll = false;
|
2125
2130
|
ts.p.rownumbers = false;
|
2126
|
-
ts.p.subGrid = false;
|
2131
|
+
//ts.p.subGrid = false; expiremental
|
2127
2132
|
ts.p.treeGrid = false;
|
2128
2133
|
ts.p.gridview = true;
|
2129
2134
|
}
|
@@ -2136,7 +2141,7 @@ $.fn.jqGrid = function( pin ) {
|
|
2136
2141
|
}
|
2137
2142
|
if(this.p.multiselect) {
|
2138
2143
|
this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");
|
2139
|
-
this.p.colModel.unshift({name:'cb',width
|
2144
|
+
this.p.colModel.unshift({name:'cb',width:$.jgrid.cellWidth() ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
|
2140
2145
|
}
|
2141
2146
|
if(this.p.rownumbers) {
|
2142
2147
|
this.p.colNames.unshift("");
|
@@ -2582,6 +2587,7 @@ $.fn.jqGrid = function( pin ) {
|
|
2582
2587
|
ts.updatepager = updatepager;
|
2583
2588
|
ts.refreshIndex = refreshIndex;
|
2584
2589
|
ts.setHeadCheckBox = setHeadCheckBox;
|
2590
|
+
ts.constructTr = constructTr;
|
2585
2591
|
ts.formatter = function ( rowId, cellval , colpos, rwdat, act){return formatter(rowId, cellval , colpos, rwdat, act);};
|
2586
2592
|
$.extend(grid,{populate : populate, emptyRows: emptyRows});
|
2587
2593
|
this.grid = grid;
|
@@ -2758,7 +2764,7 @@ $.jgrid.extend({
|
|
2758
2764
|
while(j<len){
|
2759
2765
|
if(getall) { ind = $t.rows[j]; }
|
2760
2766
|
if( $(ind).hasClass('jqgrow') ) {
|
2761
|
-
$('td',ind).each( function(i) {
|
2767
|
+
$('td[role="gridcell"]',ind).each( function(i) {
|
2762
2768
|
nm = $t.p.colModel[i].name;
|
2763
2769
|
if ( nm !== 'cb' && nm !== 'subgrid' && nm !== 'rn') {
|
2764
2770
|
if($t.p.treeGrid===true && nm == $t.p.ExpandColumn) {
|
@@ -2896,7 +2902,7 @@ $.jgrid.extend({
|
|
2896
2902
|
air = $.isFunction(t.p.afterInsertRow) ? true : false;
|
2897
2903
|
while(k < datalen) {
|
2898
2904
|
data = rdata[k];
|
2899
|
-
row=
|
2905
|
+
row=[];
|
2900
2906
|
if(aradd) {
|
2901
2907
|
try {rowid = data[cnm];}
|
2902
2908
|
catch (e) {rowid = $.jgrid.randId();}
|
@@ -2906,15 +2912,15 @@ $.jgrid.extend({
|
|
2906
2912
|
rowid = t.p.idPrefix + rowid;
|
2907
2913
|
if(ni){
|
2908
2914
|
prp = t.formatCol(0,1,'',null,rowid, true);
|
2909
|
-
row
|
2915
|
+
row[row.length] = "<td role=\"gridcell\" class=\"ui-state-default jqgrid-rownum\" "+prp+">0</td>";
|
2910
2916
|
}
|
2911
2917
|
if(gi) {
|
2912
2918
|
v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+t.p.id+"_"+rowid+"\" class=\"cbox\"/>";
|
2913
2919
|
prp = t.formatCol(ni,1,'', null, rowid, true);
|
2914
|
-
row
|
2920
|
+
row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
|
2915
2921
|
}
|
2916
2922
|
if(si) {
|
2917
|
-
row
|
2923
|
+
row[row.length] = $(t).jqGrid("addSubGridCell",gi+ni,1);
|
2918
2924
|
}
|
2919
2925
|
for(i = gi+si+ni; i < t.p.colModel.length;i++){
|
2920
2926
|
cm = t.p.colModel[i];
|
@@ -2922,32 +2928,33 @@ $.jgrid.extend({
|
|
2922
2928
|
lcdata[nm] = cm.formatter && typeof(cm.formatter) === 'string' && cm.formatter == 'date' ? $.unformat.date.call(t,data[nm],cm) : data[nm];
|
2923
2929
|
v = t.formatter( rowid, $.jgrid.getAccessor(data,nm), i, data, 'edit');
|
2924
2930
|
prp = t.formatCol(i,1,v, data, rowid, true);
|
2925
|
-
row
|
2931
|
+
row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
|
2926
2932
|
}
|
2927
|
-
row
|
2933
|
+
row.unshift( t.constructTr(rowid, false, cna, lcdata, lcdata ) );
|
2934
|
+
row[row.length] = "</tr>";
|
2928
2935
|
if(t.rows.length === 0){
|
2929
|
-
$("table:first",t.grid.bDiv).append(row);
|
2936
|
+
$("table:first",t.grid.bDiv).append(row.join(''));
|
2930
2937
|
} else {
|
2931
2938
|
switch (pos) {
|
2932
2939
|
case 'last':
|
2933
|
-
$(t.rows[t.rows.length-1]).after(row);
|
2940
|
+
$(t.rows[t.rows.length-1]).after(row.join(''));
|
2934
2941
|
sind = t.rows.length-1;
|
2935
2942
|
break;
|
2936
2943
|
case 'first':
|
2937
|
-
$(t.rows[0]).after(row);
|
2944
|
+
$(t.rows[0]).after(row.join(''));
|
2938
2945
|
sind = 1;
|
2939
2946
|
break;
|
2940
2947
|
case 'after':
|
2941
2948
|
sind = t.rows.namedItem(src);
|
2942
2949
|
if (sind) {
|
2943
2950
|
if($(t.rows[sind.rowIndex+1]).hasClass("ui-subgrid")) { $(t.rows[sind.rowIndex+1]).after(row); }
|
2944
|
-
else { $(sind).after(row); }
|
2951
|
+
else { $(sind).after(row.join('')); }
|
2945
2952
|
}
|
2946
2953
|
sind++;
|
2947
2954
|
break;
|
2948
2955
|
case 'before':
|
2949
2956
|
sind = t.rows.namedItem(src);
|
2950
|
-
if(sind) {$(sind).before(row);sind=sind.rowIndex;}
|
2957
|
+
if(sind) {$(sind).before(row.join(''));sind=sind.rowIndex;}
|
2951
2958
|
sind--;
|
2952
2959
|
break;
|
2953
2960
|
}
|
@@ -3017,7 +3024,7 @@ $.jgrid.extend({
|
|
3017
3024
|
},
|
3018
3025
|
showHideCol : function(colname,show) {
|
3019
3026
|
return this.each(function() {
|
3020
|
-
var $t = this, fndh=false, brd=$.
|
3027
|
+
var $t = this, fndh=false, brd=$.jgrid.cellWidth()? 0: $t.p.cellLayout, cw;
|
3021
3028
|
if (!$t.grid ) {return;}
|
3022
3029
|
if( typeof colname === 'string') {colname=[colname];}
|
3023
3030
|
show = show != "none" ? "" : "none";
|
@@ -3110,7 +3117,7 @@ $.jgrid.extend({
|
|
3110
3117
|
return this.each(function(){
|
3111
3118
|
if (!this.grid ) {return;}
|
3112
3119
|
var $t = this, cw,
|
3113
|
-
initwidth = 0, brd=$.
|
3120
|
+
initwidth = 0, brd=$.jgrid.cellWidth() ? 0: $t.p.cellLayout, lvc, vc=0, hs=false, scw=$t.p.scrollOffset, aw, gw=0,
|
3114
3121
|
cl = 0,cr;
|
3115
3122
|
if(typeof shrink != 'boolean') {
|
3116
3123
|
shrink=$t.p.shrinkToFit;
|
@@ -3582,7 +3589,7 @@ $.jgrid.extend({
|
|
3582
3589
|
if(tmp2 !== undefined ) {tmp = tmp2;}
|
3583
3590
|
}
|
3584
3591
|
var opt = $.extend({}, cm.editoptions || {} ,{id:iRow+"_"+nm,name:nm});
|
3585
|
-
var elc = $.jgrid.createEl(cm.edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
|
3592
|
+
var elc = $.jgrid.createEl.call($t,cm.edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
|
3586
3593
|
$($t).triggerHandler("jqGridBeforeEditCell", [$t.rows[iRow].id, nm, tmp, iRow, iCol]);
|
3587
3594
|
if ($.isFunction($t.p.beforeEditCell)) {
|
3588
3595
|
$t.p.beforeEditCell.call($t, $t.rows[iRow].id,nm,tmp,iRow,iCol);
|
@@ -4088,7 +4095,7 @@ $.extend($.jgrid,{
|
|
4088
4095
|
if ( $.fn.jqm && p.jqModal === true) {
|
4089
4096
|
if(p.left ===0 && p.top===0 && p.overlay) {
|
4090
4097
|
var pos = [];
|
4091
|
-
pos =
|
4098
|
+
pos = $.jgrid.findPos(posSelector);
|
4092
4099
|
p.left = pos[0] + 4;
|
4093
4100
|
p.top = pos[1] + 4;
|
4094
4101
|
}
|
@@ -4165,8 +4172,8 @@ $.extend($.jgrid,{
|
|
4165
4172
|
overlay: 10,
|
4166
4173
|
modal: false,
|
4167
4174
|
overlayClass : 'ui-widget-overlay',
|
4168
|
-
onShow:
|
4169
|
-
onHide:
|
4175
|
+
onShow: $.jgrid.showModal,
|
4176
|
+
onHide: $.jgrid.closeModal,
|
4170
4177
|
gbox: '',
|
4171
4178
|
jqm : true,
|
4172
4179
|
jqM : true
|
@@ -4225,11 +4232,11 @@ $.extend($.jgrid,{
|
|
4225
4232
|
|
4226
4233
|
try {
|
4227
4234
|
if($("#info_dialog").attr("aria-hidden") == "false") {
|
4228
|
-
|
4235
|
+
$.jgrid.hideModal("#info_dialog",{jqm:jm});
|
4229
4236
|
}
|
4230
4237
|
$("#info_dialog").remove();
|
4231
4238
|
} catch (e){}
|
4232
|
-
|
4239
|
+
$.jgrid.createModal({
|
4233
4240
|
themodal:'info_dialog',
|
4234
4241
|
modalhead:'info_head',
|
4235
4242
|
modalcontent:'info_content',
|
@@ -4253,7 +4260,7 @@ $.extend($.jgrid,{
|
|
4253
4260
|
function(){$(this).removeClass('ui-state-hover');}
|
4254
4261
|
);
|
4255
4262
|
if($.isFunction(mopt.beforeOpen) ) { mopt.beforeOpen(); }
|
4256
|
-
|
4263
|
+
$.jgrid.viewModal("#info_dialog",{
|
4257
4264
|
onHide: function(h) {
|
4258
4265
|
h.w.hide().remove();
|
4259
4266
|
if(h.o) { h.o.remove(); }
|
@@ -4266,10 +4273,10 @@ $.extend($.jgrid,{
|
|
4266
4273
|
},
|
4267
4274
|
// Form Functions
|
4268
4275
|
createEl : function(eltype,options,vl,autowidth, ajaxso) {
|
4269
|
-
var elem = "";
|
4276
|
+
var elem = "", $t = this;
|
4270
4277
|
function bindEv (el, opt) {
|
4271
4278
|
if($.isFunction(opt.dataInit)) {
|
4272
|
-
opt.dataInit(el);
|
4279
|
+
opt.dataInit.call($t,el);
|
4273
4280
|
}
|
4274
4281
|
if(opt.dataEvents) {
|
4275
4282
|
$.each(opt.dataEvents, function() {
|
@@ -4355,8 +4362,8 @@ $.extend($.jgrid,{
|
|
4355
4362
|
var a, ovm = [], elem = this.elem, vl = this.vl,
|
4356
4363
|
options = $.extend({},this.options),
|
4357
4364
|
msl = options.multiple===true;
|
4358
|
-
if(
|
4359
|
-
var b = options.buildSelect(data);
|
4365
|
+
if($.isFunction(options.buildSelect)) {
|
4366
|
+
var b = options.buildSelect.call($t,data);
|
4360
4367
|
a = $(b).html();
|
4361
4368
|
} else {
|
4362
4369
|
a = $(data).html();
|
@@ -4460,7 +4467,7 @@ $.extend($.jgrid,{
|
|
4460
4467
|
elem = document.createElement("span");
|
4461
4468
|
try {
|
4462
4469
|
if($.isFunction(options.custom_element)) {
|
4463
|
-
var celm = options.custom_element.call(
|
4470
|
+
var celm = options.custom_element.call($t,vl,options);
|
4464
4471
|
if(celm) {
|
4465
4472
|
celm = $(celm).addClass("customelement").attr({id:options.id,name:options.name});
|
4466
4473
|
$(elem).empty().append(celm);
|
@@ -4471,9 +4478,9 @@ $.extend($.jgrid,{
|
|
4471
4478
|
throw "e1";
|
4472
4479
|
}
|
4473
4480
|
} catch (e) {
|
4474
|
-
if (e=="e1") {
|
4475
|
-
if (e=="e2") {
|
4476
|
-
else {
|
4481
|
+
if (e=="e1") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.nodefined, $.jgrid.edit.bClose);}
|
4482
|
+
if (e=="e2") { $.jgrid.info_dialog($.jgrid.errors.errcap,"function 'custom_element' "+$.jgrid.edit.msg.novalue,$.jgrid.edit.bClose);}
|
4483
|
+
else { $.jgrid.info_dialog($.jgrid.errors.errcap,typeof(e)==="string"?e:e.message,$.jgrid.edit.bClose); }
|
4477
4484
|
}
|
4478
4485
|
break;
|
4479
4486
|
}
|
@@ -4566,7 +4573,7 @@ $.extend($.jgrid,{
|
|
4566
4573
|
checkTime : function(time){
|
4567
4574
|
// checks only hh:ss (and optional am/pm)
|
4568
4575
|
var re = /^(\d{1,2}):(\d{2})([ap]m)?$/,regs;
|
4569
|
-
if(
|
4576
|
+
if(!$.jgrid.isEmpty(time))
|
4570
4577
|
{
|
4571
4578
|
regs = time.match(re);
|
4572
4579
|
if(regs) {
|
@@ -4606,12 +4613,12 @@ $.extend($.jgrid,{
|
|
4606
4613
|
if(edtrul) {
|
4607
4614
|
if(!nm) { nm = g.p.colNames[valref]; }
|
4608
4615
|
if(edtrul.required === true) {
|
4609
|
-
if(
|
4616
|
+
if( $.jgrid.isEmpty(val) ) { return [false,nm+": "+$.jgrid.edit.msg.required,""]; }
|
4610
4617
|
}
|
4611
4618
|
// force required
|
4612
4619
|
var rqfield = edtrul.required === false ? false : true;
|
4613
4620
|
if(edtrul.number === true) {
|
4614
|
-
if( !(rqfield === false &&
|
4621
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4615
4622
|
if(isNaN(val)) { return [false,nm+": "+$.jgrid.edit.msg.number,""]; }
|
4616
4623
|
}
|
4617
4624
|
}
|
@@ -4623,41 +4630,41 @@ $.extend($.jgrid,{
|
|
4623
4630
|
}
|
4624
4631
|
var filter;
|
4625
4632
|
if(edtrul.email === true) {
|
4626
|
-
if( !(rqfield === false &&
|
4633
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4627
4634
|
// taken from $ Validate plugin
|
4628
4635
|
filter = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;
|
4629
4636
|
if(!filter.test(val)) {return [false,nm+": "+$.jgrid.edit.msg.email,""];}
|
4630
4637
|
}
|
4631
4638
|
}
|
4632
4639
|
if(edtrul.integer === true) {
|
4633
|
-
if( !(rqfield === false &&
|
4640
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4634
4641
|
if(isNaN(val)) { return [false,nm+": "+$.jgrid.edit.msg.integer,""]; }
|
4635
4642
|
if ((val % 1 !== 0) || (val.indexOf('.') != -1)) { return [false,nm+": "+$.jgrid.edit.msg.integer,""];}
|
4636
4643
|
}
|
4637
4644
|
}
|
4638
4645
|
if(edtrul.date === true) {
|
4639
|
-
if( !(rqfield === false &&
|
4646
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4640
4647
|
if(g.p.colModel[valref].formatoptions && g.p.colModel[valref].formatoptions.newformat) {
|
4641
4648
|
dft = g.p.colModel[valref].formatoptions.newformat;
|
4642
4649
|
} else {
|
4643
4650
|
dft = g.p.colModel[valref].datefmt || "Y-m-d";
|
4644
4651
|
}
|
4645
|
-
if(
|
4652
|
+
if(!$jgrid.checkDate (dft, val)) { return [false,nm+": "+$.jgrid.edit.msg.date+" - "+dft,""]; }
|
4646
4653
|
}
|
4647
4654
|
}
|
4648
4655
|
if(edtrul.time === true) {
|
4649
|
-
if( !(rqfield === false &&
|
4650
|
-
if(
|
4656
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4657
|
+
if(!$.jgrid.checkTime (val)) { return [false,nm+": "+$.jgrid.edit.msg.date+" - hh:mm (am/pm)",""]; }
|
4651
4658
|
}
|
4652
4659
|
}
|
4653
4660
|
if(edtrul.url === true) {
|
4654
|
-
if( !(rqfield === false &&
|
4661
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4655
4662
|
filter = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
|
4656
4663
|
if(!filter.test(val)) {return [false,nm+": "+$.jgrid.edit.msg.url,""];}
|
4657
4664
|
}
|
4658
4665
|
}
|
4659
4666
|
if(edtrul.custom === true) {
|
4660
|
-
if( !(rqfield === false &&
|
4667
|
+
if( !(rqfield === false && $.jgrid.isEmpty(val)) ) {
|
4661
4668
|
if($.isFunction(edtrul.custom_func)) {
|
4662
4669
|
var ret = edtrul.custom_func.call(g,val,nm);
|
4663
4670
|
if($.isArray(ret)) {
|
@@ -4865,7 +4872,7 @@ $.jgrid.extend({
|
|
4865
4872
|
if(!bsr) { $($t).jqGrid("setGridParam",{search:sd}).trigger("reloadGrid",[{page:1}]); }
|
4866
4873
|
if(saveurl) {$($t).jqGrid("setGridParam",{url:saveurl});}
|
4867
4874
|
$($t).triggerHandler("jqGridToolbarAfterSearch");
|
4868
|
-
if($.isFunction(p.afterSearch)){p.afterSearch();}
|
4875
|
+
if($.isFunction(p.afterSearch)){p.afterSearch.call($t);}
|
4869
4876
|
};
|
4870
4877
|
var clearToolbar = function(trigger){
|
4871
4878
|
var sdata={}, j=0, nm;
|
@@ -5527,7 +5534,7 @@ $.fn.jqFilter = function( arg ) {
|
|
5527
5534
|
groupButton : true,
|
5528
5535
|
ruleButtons : true,
|
5529
5536
|
direction : "ltr"
|
5530
|
-
}, arg || {});
|
5537
|
+
}, $.jgrid.filter, arg || {});
|
5531
5538
|
return this.each( function() {
|
5532
5539
|
if (this.filter) {return;}
|
5533
5540
|
this.p = p;
|
@@ -5860,7 +5867,9 @@ $.fn.jqFilter = function( arg ) {
|
|
5860
5867
|
$(".input-elm",trpar).bind('change',function( e ) {
|
5861
5868
|
var tmo = $(this).hasClass("ui-autocomplete-input") ? 200 :0;
|
5862
5869
|
setTimeout(function(){
|
5863
|
-
|
5870
|
+
var elem = e.target;
|
5871
|
+
rule.data = elem.nodeName.toUpperCase() === "SPAN" && cm.searchoptions && $.isFunction(cm.searchoptions.custom_value) ?
|
5872
|
+
cm.searchoptions.custom_value($(elem).children(".customelement:first"), 'get') : elem.value;
|
5864
5873
|
that.onchange(); // signals that the filter has changed
|
5865
5874
|
}, tmo);
|
5866
5875
|
});
|
@@ -5950,7 +5959,7 @@ $.fn.jqFilter = function( arg ) {
|
|
5950
5959
|
$(ruleDataInput)
|
5951
5960
|
.addClass("input-elm")
|
5952
5961
|
.bind('change', function() {
|
5953
|
-
rule.data = $(this).val();
|
5962
|
+
rule.data = cm.inputtype === 'custom' ? cm.searchoptions.custom_value($(this).children(".customelement:first"),'get') : $(this).val();
|
5954
5963
|
that.onchange(); // signals that the filter has changed
|
5955
5964
|
});
|
5956
5965
|
|
@@ -6202,9 +6211,11 @@ $.jgrid.extend({
|
|
6202
6211
|
afterShowSearch : null,
|
6203
6212
|
onInitializeSearch: null,
|
6204
6213
|
afterRedraw : null,
|
6214
|
+
afterChange: null,
|
6205
6215
|
closeAfterSearch : false,
|
6206
6216
|
closeAfterReset: false,
|
6207
6217
|
closeOnEscape : false,
|
6218
|
+
searchOnEnter : false,
|
6208
6219
|
multipleSearch : false,
|
6209
6220
|
multipleGroup : false,
|
6210
6221
|
//cloneSearchRowOnAdd: true,
|
@@ -6242,15 +6253,14 @@ $.jgrid.extend({
|
|
6242
6253
|
var fid = "fbox_"+$t.p.id,
|
6243
6254
|
showFrm = true,
|
6244
6255
|
IDs = {themodal:'searchmod'+fid,modalhead:'searchhd'+fid,modalcontent:'searchcnt'+fid, scrollelm : fid},
|
6245
|
-
defaultFilters = $t.p.postData[p.sFilter]
|
6246
|
-
_filter = $("#"+$.jgrid.jqID(fid));
|
6256
|
+
defaultFilters = $t.p.postData[p.sFilter];
|
6247
6257
|
if(typeof(defaultFilters) === "string") {
|
6248
6258
|
defaultFilters = $.jgrid.parse( defaultFilters );
|
6249
6259
|
}
|
6250
6260
|
if(p.recreateFilter === true) {
|
6251
6261
|
$("#"+$.jgrid.jqID(IDs.themodal)).remove();
|
6252
6262
|
}
|
6253
|
-
function showFilter() {
|
6263
|
+
function showFilter(_filter) {
|
6254
6264
|
showFrm = $($t).triggerHandler("jqGridFilterBeforeShow", [_filter]);
|
6255
6265
|
if(typeof(showFrm) === "undefined") {
|
6256
6266
|
showFrm = true;
|
@@ -6267,7 +6277,7 @@ $.jgrid.extend({
|
|
6267
6277
|
}
|
6268
6278
|
}
|
6269
6279
|
if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
|
6270
|
-
showFilter();
|
6280
|
+
showFilter($("#fbox_"+$.jgrid.jqID(+$t.p.id)));
|
6271
6281
|
} else {
|
6272
6282
|
var fil = $("<div><div id='"+fid+"' class='searchFilter' style='overflow:auto'></div></div>").insertBefore("#gview_"+$.jgrid.jqID($t.p.id)),
|
6273
6283
|
align = "left", butleft ="";
|
@@ -6343,6 +6353,9 @@ $.jgrid.extend({
|
|
6343
6353
|
if(this.p.showQuery) {
|
6344
6354
|
$('.query',this).html(this.toUserFriendlyString());
|
6345
6355
|
}
|
6356
|
+
if ($.isFunction(p.afterChange)) {
|
6357
|
+
p.afterChange.call($t, $("#"+fid), p);
|
6358
|
+
}
|
6346
6359
|
},
|
6347
6360
|
direction : $t.p.direction
|
6348
6361
|
});
|
@@ -6369,6 +6382,22 @@ $.jgrid.extend({
|
|
6369
6382
|
} else {
|
6370
6383
|
$.jgrid.createModal(IDs ,fil,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gbox_"+$.jgrid.jqID($t.p.id))[0]);
|
6371
6384
|
}
|
6385
|
+
if (p.searchOnEnter || p.closeOnEscape) {
|
6386
|
+
$("#"+$.jgrid.jqID(IDs.themodal)).keydown(function (e) {
|
6387
|
+
var $target = $(e.target);
|
6388
|
+
if (p.searchOnEnter && e.which === 13 && // 13 === $.ui.keyCode.ENTER
|
6389
|
+
!$target.hasClass('add-group') && !$target.hasClass('add-rule') &&
|
6390
|
+
!$target.hasClass('delete-group') && !$target.hasClass('delete-rule') &&
|
6391
|
+
(!$target.hasClass("fm-button") || !$target.is("[id$=_query]"))) {
|
6392
|
+
$("#"+fid+"_search").focus().click();
|
6393
|
+
return false;
|
6394
|
+
}
|
6395
|
+
if (p.closeOnEscape && e.which === 27) { // 27 === $.ui.keyCode.ESCAPE
|
6396
|
+
$("#"+$.jgrid.jqID(IDs.modalhead)).find(".ui-jqdialog-titlebar-close").focus().click();
|
6397
|
+
return false;
|
6398
|
+
}
|
6399
|
+
});
|
6400
|
+
}
|
6372
6401
|
if(bQ) {
|
6373
6402
|
$("#"+fid+"_query").bind('click', function(){
|
6374
6403
|
$(".queryresult", fil).toggle();
|
@@ -6449,7 +6478,7 @@ $.jgrid.extend({
|
|
6449
6478
|
$($t).trigger("reloadGrid",[{page:1}]);
|
6450
6479
|
return false;
|
6451
6480
|
});
|
6452
|
-
showFilter();
|
6481
|
+
showFilter($("#"+fid));
|
6453
6482
|
$(".fm-button:not(.ui-state-disabled)",fil).hover(
|
6454
6483
|
function(){$(this).addClass('ui-state-hover');},
|
6455
6484
|
function(){$(this).removeClass('ui-state-hover');}
|
@@ -6626,11 +6655,11 @@ $.jgrid.extend({
|
|
6626
6655
|
rp = parseInt(frmopt.rowpos,10) || cnt+1,
|
6627
6656
|
cp = parseInt((parseInt(frmopt.colpos,10) || 1)*2,10);
|
6628
6657
|
if(rowid == "_empty" && opt.defaultValue ) {
|
6629
|
-
tmp = $.isFunction(opt.defaultValue) ? opt.defaultValue() : opt.defaultValue;
|
6658
|
+
tmp = $.isFunction(opt.defaultValue) ? opt.defaultValue.call($t) : opt.defaultValue;
|
6630
6659
|
}
|
6631
6660
|
if(!this.edittype) {this.edittype = "text";}
|
6632
6661
|
if($t.p.autoencode) {tmp = $.jgrid.htmlDecode(tmp);}
|
6633
|
-
elc = $.jgrid.createEl(this.edittype,opt,tmp,false,$.extend({},$.jgrid.ajaxOptions,obj.p.ajaxSelectOptions || {}));
|
6662
|
+
elc = $.jgrid.createEl.call($t,this.edittype,opt,tmp,false,$.extend({},$.jgrid.ajaxOptions,obj.p.ajaxSelectOptions || {}));
|
6634
6663
|
if(tmp === "" && this.edittype == "checkbox") {tmp = $(elc).attr("offval");}
|
6635
6664
|
if(tmp === "" && this.edittype == "select") {tmp = $("option:eq(0)",elc).text();}
|
6636
6665
|
if(rp_ge[$t.p.id].checkOnSubmit || rp_ge[$t.p.id].checkOnUpdate) {rp_ge[$t.p.id]._savedData[nm] = tmp;}
|
@@ -6676,7 +6705,7 @@ $.jgrid.extend({
|
|
6676
6705
|
if(fld && fld.length && fld[0] !== null) {
|
6677
6706
|
vl = "";
|
6678
6707
|
if(opt.defaultValue ) {
|
6679
|
-
vl = $.isFunction(opt.defaultValue) ? opt.defaultValue() : opt.defaultValue;
|
6708
|
+
vl = $.isFunction(opt.defaultValue) ? opt.defaultValue.call($t) : opt.defaultValue;
|
6680
6709
|
if(fld[0].type=='checkbox') {
|
6681
6710
|
vlc = vl.toLowerCase();
|
6682
6711
|
if(vlc.search(/(false|0|no|off|undefined)/i)<0 && vlc!=="") {
|
@@ -6808,7 +6837,7 @@ $.jgrid.extend({
|
|
6808
6837
|
}
|
6809
6838
|
for( key in postdata ){
|
6810
6839
|
if(postdata.hasOwnProperty(key)) {
|
6811
|
-
ret = $.jgrid.checkValues(postdata[key],key,$t);
|
6840
|
+
ret = $.jgrid.checkValues.call($t,postdata[key],key,$t);
|
6812
6841
|
if(ret[0] === false) {break;}
|
6813
6842
|
}
|
6814
6843
|
}
|
@@ -6823,7 +6852,7 @@ $.jgrid.extend({
|
|
6823
6852
|
ret = [true,"",""];
|
6824
6853
|
}
|
6825
6854
|
if( ret[0] && $.isFunction(rp_ge[$t.p.id].beforeSubmit)) {
|
6826
|
-
ret = rp_ge[$t.p.id].beforeSubmit(postdata,$("#"+frmgr));
|
6855
|
+
ret = rp_ge[$t.p.id].beforeSubmit.call($t,postdata,$("#"+frmgr));
|
6827
6856
|
}
|
6828
6857
|
}
|
6829
6858
|
|
@@ -6863,7 +6892,7 @@ $.jgrid.extend({
|
|
6863
6892
|
var ajaxOptions = $.extend({
|
6864
6893
|
url: rp_ge[$t.p.id].url ? rp_ge[$t.p.id].url : $($t).jqGrid('getGridParam','editurl'),
|
6865
6894
|
type: rp_ge[$t.p.id].mtype,
|
6866
|
-
data: $.isFunction(rp_ge[$t.p.id].serializeEditData) ? rp_ge[$t.p.id].serializeEditData(postdata) : postdata,
|
6895
|
+
data: $.isFunction(rp_ge[$t.p.id].serializeEditData) ? rp_ge[$t.p.id].serializeEditData.call($t,postdata) : postdata,
|
6867
6896
|
complete:function(data,Status){
|
6868
6897
|
postdata[idname] = $t.p.idPrefix + postdata[idname];
|
6869
6898
|
if(Status != "success") {
|
@@ -7067,7 +7096,7 @@ $.jgrid.extend({
|
|
7067
7096
|
showFrm = true;
|
7068
7097
|
}
|
7069
7098
|
if(showFrm && onBeforeInit) {
|
7070
|
-
showFrm = onBeforeInit.call($t
|
7099
|
+
showFrm = onBeforeInit.call($t,$("#"+frmgr));
|
7071
7100
|
}
|
7072
7101
|
if(showFrm === false) {return;}
|
7073
7102
|
restoreInline();
|
@@ -7123,7 +7152,7 @@ $.jgrid.extend({
|
|
7123
7152
|
showFrm = true;
|
7124
7153
|
}
|
7125
7154
|
if(showFrm && onBeforeInit) {
|
7126
|
-
showFrm = onBeforeInit.call($t
|
7155
|
+
showFrm = onBeforeInit.call($t,$("#"+frmgr));
|
7127
7156
|
}
|
7128
7157
|
if(showFrm === false) {return;}
|
7129
7158
|
restoreInline();
|
@@ -7260,7 +7289,7 @@ $.jgrid.extend({
|
|
7260
7289
|
}
|
7261
7290
|
// here initform - only once
|
7262
7291
|
$($t).triggerHandler("jqGridAddEditInitializeForm", [$("#"+frmgr), frmoper]);
|
7263
|
-
if(onInitializeForm) {onInitializeForm($("#"+frmgr));}
|
7292
|
+
if(onInitializeForm) {onInitializeForm.call($t,$("#"+frmgr));}
|
7264
7293
|
if(rowid=="_empty" || !rp_ge[$t.p.id].viewPagerButtons) {$("#pData,#nData",frmtb+"_2").hide();} else {$("#pData,#nData",frmtb+"_2").show();}
|
7265
7294
|
$($t).triggerHandler("jqGridAddEditBeforeShowForm", [$("#"+frmgr), frmoper]);
|
7266
7295
|
if(onBeforeShow) { onBeforeShow.call($t, $("#"+frmgr));}
|
@@ -7507,7 +7536,7 @@ $.jgrid.extend({
|
|
7507
7536
|
|
7508
7537
|
if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
|
7509
7538
|
if(onBeforeInit) {
|
7510
|
-
showFrm = onBeforeInit($("#"+frmgr));
|
7539
|
+
showFrm = onBeforeInit.call($t,$("#"+frmgr));
|
7511
7540
|
if(typeof(showFrm) == "undefined") {
|
7512
7541
|
showFrm = true;
|
7513
7542
|
}
|
@@ -7516,7 +7545,7 @@ $.jgrid.extend({
|
|
7516
7545
|
$(".ui-jqdialog-title","#"+$.jgrid.jqID(IDs.modalhead)).html(p.caption);
|
7517
7546
|
$("#FormError","#"+frmtb).hide();
|
7518
7547
|
fillData(rowid,$t);
|
7519
|
-
if($.isFunction(p.beforeShowForm)) {p.beforeShowForm($("#"+frmgr));}
|
7548
|
+
if($.isFunction(p.beforeShowForm)) {p.beforeShowForm.call($t,$("#"+frmgr));}
|
7520
7549
|
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, jqM: false, overlay: p.overlay, modal:p.modal});
|
7521
7550
|
focusaref();
|
7522
7551
|
} else {
|
@@ -7524,7 +7553,7 @@ $.jgrid.extend({
|
|
7524
7553
|
var frm = $("<form name='FormPost' id='"+frmgr_id+"' class='FormGrid' style='width:100%;overflow:auto;position:relative;height:"+dh+";'></form>"),
|
7525
7554
|
tbl =$("<table id='"+frmtb_id+"' class='EditTable' cellspacing='1' cellpadding='2' border='0' style='table-layout:fixed'><tbody></tbody></table>");
|
7526
7555
|
if(onBeforeInit) {
|
7527
|
-
showFrm = onBeforeInit($("#"+frmgr));
|
7556
|
+
showFrm = onBeforeInit.call($t,$("#"+frmgr));
|
7528
7557
|
if(typeof(showFrm) == "undefined") {
|
7529
7558
|
showFrm = true;
|
7530
7559
|
}
|
@@ -7595,7 +7624,7 @@ $.jgrid.extend({
|
|
7595
7624
|
$("#cData","#"+frmtb+"_2").addClass(p.closeicon[1] == "right" ? 'fm-button-icon-right' : 'fm-button-icon-left')
|
7596
7625
|
.append("<span class='ui-icon "+p.closeicon[2]+"'></span>");
|
7597
7626
|
}
|
7598
|
-
if($.isFunction(p.beforeShowForm)) {p.beforeShowForm($("#"+frmgr));}
|
7627
|
+
if($.isFunction(p.beforeShowForm)) {p.beforeShowForm.call($t,$("#"+frmgr));}
|
7599
7628
|
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, modal:p.modal});
|
7600
7629
|
$(".fm-button:not(.ui-state-disabled)","#"+frmtb+"_2").hover(
|
7601
7630
|
function(){$(this).addClass('ui-state-hover');},
|
@@ -7612,12 +7641,12 @@ $.jgrid.extend({
|
|
7612
7641
|
npos[0] = parseInt(npos[0],10);
|
7613
7642
|
if(npos[0] != -1 && npos[1][npos[0]+1]) {
|
7614
7643
|
if($.isFunction(p.onclickPgButtons)) {
|
7615
|
-
p.onclickPgButtons('next',$("#"+frmgr),npos[1][npos[0]]);
|
7644
|
+
p.onclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]]);
|
7616
7645
|
}
|
7617
7646
|
fillData(npos[1][npos[0]+1],$t);
|
7618
7647
|
$($t).jqGrid("setSelection",npos[1][npos[0]+1]);
|
7619
7648
|
if($.isFunction(p.afterclickPgButtons)) {
|
7620
|
-
p.afterclickPgButtons('next',$("#"+frmgr),npos[1][npos[0]+1]);
|
7649
|
+
p.afterclickPgButtons.call($t,'next',$("#"+frmgr),npos[1][npos[0]+1]);
|
7621
7650
|
}
|
7622
7651
|
updateNav(npos[0]+1,npos[1].length-1);
|
7623
7652
|
}
|
@@ -7629,12 +7658,12 @@ $.jgrid.extend({
|
|
7629
7658
|
var ppos = getCurrPos();
|
7630
7659
|
if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
|
7631
7660
|
if($.isFunction(p.onclickPgButtons)) {
|
7632
|
-
p.onclickPgButtons('prev',$("#"+frmgr),ppos[1][ppos[0]]);
|
7661
|
+
p.onclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]]);
|
7633
7662
|
}
|
7634
7663
|
fillData(ppos[1][ppos[0]-1],$t);
|
7635
7664
|
$($t).jqGrid("setSelection",ppos[1][ppos[0]-1]);
|
7636
7665
|
if($.isFunction(p.afterclickPgButtons)) {
|
7637
|
-
p.afterclickPgButtons('prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
|
7666
|
+
p.afterclickPgButtons.call($t,'prev',$("#"+frmgr),ppos[1][ppos[0]-1]);
|
7638
7667
|
}
|
7639
7668
|
updateNav(ppos[0]-1,ppos[1].length-1);
|
7640
7669
|
}
|
@@ -7693,7 +7722,7 @@ $.jgrid.extend({
|
|
7693
7722
|
if (jQuery.isArray(rowids)) {rowids = rowids.join();}
|
7694
7723
|
if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
|
7695
7724
|
if(onBeforeInit) {
|
7696
|
-
showFrm = onBeforeInit(
|
7725
|
+
showFrm = onBeforeInit.call($t,$("#"+dtbl));
|
7697
7726
|
if(typeof(showFrm) == "undefined") {
|
7698
7727
|
showFrm = true;
|
7699
7728
|
}
|
@@ -7705,9 +7734,9 @@ $.jgrid.extend({
|
|
7705
7734
|
rp_ge[$t.p.id].processing=false;
|
7706
7735
|
$("#dData", "#"+dtbl).removeClass('ui-state-active');
|
7707
7736
|
}
|
7708
|
-
if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm($("#"+dtbl));}
|
7737
|
+
if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+dtbl));}
|
7709
7738
|
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal,jqM: false, overlay: rp_ge[$t.p.id].overlay, modal:rp_ge[$t.p.id].modal});
|
7710
|
-
if(onAfterShow) {rp_ge[$t.p.id].afterShowForm($("#"+dtbl));}
|
7739
|
+
if(onAfterShow) {rp_ge[$t.p.id].afterShowForm.call($t,$("#"+dtbl));}
|
7711
7740
|
} else {
|
7712
7741
|
var dh = isNaN(rp_ge[$t.p.id].dataheight) ? rp_ge[$t.p.id].dataheight : rp_ge[$t.p.id].dataheight+"px";
|
7713
7742
|
var tbl = "<div id='"+dtbl_id+"' class='formdata' style='width:100%;overflow:auto;position:relative;height:"+dh+";'>";
|
@@ -7725,7 +7754,7 @@ $.jgrid.extend({
|
|
7725
7754
|
$.jgrid.createModal(IDs,tbl,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gview_"+$.jgrid.jqID($t.p.id))[0]);
|
7726
7755
|
|
7727
7756
|
if(onBeforeInit) {
|
7728
|
-
showFrm = onBeforeInit(
|
7757
|
+
showFrm = onBeforeInit.call($t,$("#"+dtbl));
|
7729
7758
|
if(typeof(showFrm) == "undefined") {
|
7730
7759
|
showFrm = true;
|
7731
7760
|
}
|
@@ -7749,8 +7778,8 @@ $.jgrid.extend({
|
|
7749
7778
|
$("#dData","#"+dtbl+"_2").click(function(){
|
7750
7779
|
var ret=[true,""];onCS = {};
|
7751
7780
|
var postdata = $("#DelData>td","#"+dtbl).text(); //the pair is name=val1,val2,...
|
7752
|
-
if( $.isFunction( rp_ge[$t.p.id].onclickSubmit ) ) {onCS = rp_ge[$t.p.id].onclickSubmit(rp_ge[$t.p.id], postdata) || {};}
|
7753
|
-
if( $.isFunction( rp_ge[$t.p.id].beforeSubmit ) ) {ret = rp_ge[$t.p.id].beforeSubmit(postdata);}
|
7781
|
+
if( $.isFunction( rp_ge[$t.p.id].onclickSubmit ) ) {onCS = rp_ge[$t.p.id].onclickSubmit.call($t,rp_ge[$t.p.id], postdata) || {};}
|
7782
|
+
if( $.isFunction( rp_ge[$t.p.id].beforeSubmit ) ) {ret = rp_ge[$t.p.id].beforeSubmit.call($t,postdata);}
|
7754
7783
|
if(ret[0] && !rp_ge[$t.p.id].processing) {
|
7755
7784
|
rp_ge[$t.p.id].processing = true;
|
7756
7785
|
opers = $t.p.prmNames;
|
@@ -7770,12 +7799,12 @@ $.jgrid.extend({
|
|
7770
7799
|
var ajaxOptions = $.extend({
|
7771
7800
|
url: rp_ge[$t.p.id].url ? rp_ge[$t.p.id].url : $($t).jqGrid('getGridParam','editurl'),
|
7772
7801
|
type: rp_ge[$t.p.id].mtype,
|
7773
|
-
data: $.isFunction(rp_ge[$t.p.id].serializeDelData) ? rp_ge[$t.p.id].serializeDelData(postd) : postd,
|
7802
|
+
data: $.isFunction(rp_ge[$t.p.id].serializeDelData) ? rp_ge[$t.p.id].serializeDelData.call($t,postd) : postd,
|
7774
7803
|
complete:function(data,Status){
|
7775
7804
|
if(Status != "success") {
|
7776
7805
|
ret[0] = false;
|
7777
7806
|
if ($.isFunction(rp_ge[$t.p.id].errorTextFormat)) {
|
7778
|
-
ret[1] = rp_ge[$t.p.id].errorTextFormat(data);
|
7807
|
+
ret[1] = rp_ge[$t.p.id].errorTextFormat.call($t,data);
|
7779
7808
|
} else {
|
7780
7809
|
ret[1] = Status + " Status: '" + data.statusText + "'. Error code: " + data.status;
|
7781
7810
|
}
|
@@ -7783,7 +7812,7 @@ $.jgrid.extend({
|
|
7783
7812
|
// data is posted successful
|
7784
7813
|
// execute aftersubmit with the returned data from server
|
7785
7814
|
if( $.isFunction( rp_ge[$t.p.id].afterSubmit ) ) {
|
7786
|
-
ret = rp_ge[$t.p.id].afterSubmit(data,postd);
|
7815
|
+
ret = rp_ge[$t.p.id].afterSubmit.call($t,data,postd);
|
7787
7816
|
}
|
7788
7817
|
}
|
7789
7818
|
if(ret[0] === false) {
|
@@ -7804,7 +7833,7 @@ $.jgrid.extend({
|
|
7804
7833
|
$t.p.selarrrow = [];
|
7805
7834
|
}
|
7806
7835
|
if($.isFunction(rp_ge[$t.p.id].afterComplete)) {
|
7807
|
-
setTimeout(function(){rp_ge[$t.p.id].afterComplete(data,postdata);},500);
|
7836
|
+
setTimeout(function(){rp_ge[$t.p.id].afterComplete.call($t,data,postdata);},500);
|
7808
7837
|
}
|
7809
7838
|
}
|
7810
7839
|
rp_ge[$t.p.id].processing=false;
|
@@ -7848,9 +7877,9 @@ $.jgrid.extend({
|
|
7848
7877
|
$.jgrid.hideModal("#"+$.jgrid.jqID(IDs.themodal),{gb:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal, onClose: rp_ge[$t.p.id].onClose});
|
7849
7878
|
return false;
|
7850
7879
|
});
|
7851
|
-
if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm($("#"+dtbl));}
|
7880
|
+
if(onBeforeShow) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+dtbl));}
|
7852
7881
|
$.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:rp_ge[$t.p.id].jqModal, overlay: rp_ge[$t.p.id].overlay, modal:rp_ge[$t.p.id].modal});
|
7853
|
-
if(onAfterShow) {rp_ge[$t.p.id].afterShowForm($("#"+dtbl));}
|
7882
|
+
if(onAfterShow) {rp_ge[$t.p.id].afterShowForm.call($t,$("#"+dtbl));}
|
7854
7883
|
}
|
7855
7884
|
if(rp_ge[$t.p.id].closeOnEscape===true) {
|
7856
7885
|
setTimeout(function(){$(".ui-jqdialog-titlebar-close","#"+$.jgrid.jqID(IDs.modalhead)).focus();},0);
|
@@ -8089,13 +8118,13 @@ $.jgrid.extend({
|
|
8089
8118
|
.attr({"title":o.refreshtitle || "",id: "refresh_"+elemids})
|
8090
8119
|
.click(function(){
|
8091
8120
|
if (!$(this).hasClass('ui-state-disabled')) {
|
8092
|
-
if($.isFunction(o.beforeRefresh)) {o.beforeRefresh();}
|
8121
|
+
if($.isFunction(o.beforeRefresh)) {o.beforeRefresh.call($t);}
|
8093
8122
|
$t.p.search = false;
|
8094
8123
|
try {
|
8095
8124
|
var gID = $t.p.id;
|
8096
8125
|
$t.p.postData.filters ="";
|
8097
8126
|
$("#fbox_"+$.jgrid.jqID(gID)).jqFilter('resetFilter');
|
8098
|
-
if($.isFunction($t.clearToolbar)) {$t.clearToolbar(false);}
|
8127
|
+
if($.isFunction($t.clearToolbar)) {$t.clearToolbar.call($t,false);}
|
8099
8128
|
} catch (e) {}
|
8100
8129
|
switch (o.refreshstate) {
|
8101
8130
|
case 'firstpage':
|
@@ -8105,7 +8134,7 @@ $.jgrid.extend({
|
|
8105
8134
|
$($t).trigger("reloadGrid", [{current:true}]);
|
8106
8135
|
break;
|
8107
8136
|
}
|
8108
|
-
if($.isFunction(o.afterRefresh)) {o.afterRefresh();}
|
8137
|
+
if($.isFunction(o.afterRefresh)) {o.afterRefresh.call($t);}
|
8109
8138
|
}
|
8110
8139
|
return false;
|
8111
8140
|
}).hover(
|
@@ -8294,14 +8323,18 @@ $.jgrid.extend({
|
|
8294
8323
|
}
|
8295
8324
|
});
|
8296
8325
|
},
|
8297
|
-
groupingPrepare : function (rData,
|
8326
|
+
groupingPrepare : function (rData, gdata, record) {
|
8298
8327
|
this.each(function(){
|
8299
8328
|
// currently only one level
|
8300
8329
|
// Is this a good idea to do it so!!!!?????
|
8330
|
+
var grp = this.p.groupingView, $t= this;
|
8331
|
+
var grlen = grp.groupField.length, items = [];
|
8332
|
+
for(var z=0;z<grlen;z++) {
|
8333
|
+
items.push(record[grp.groupField[z]]);
|
8334
|
+
}
|
8301
8335
|
items[0] += "";
|
8302
8336
|
var itm = items[0].toString().split(' ').join('');
|
8303
8337
|
|
8304
|
-
var grp = this.p.groupingView, $t= this;
|
8305
8338
|
if(gdata.hasOwnProperty(itm)) {
|
8306
8339
|
gdata[itm].push(rData);
|
8307
8340
|
} else {
|
@@ -8823,7 +8856,7 @@ $.jgrid.extend({
|
|
8823
8856
|
var opt = $.extend({},cm[i].editoptions || {},{id:rowid+"_"+nm,name:nm});
|
8824
8857
|
if(!cm[i].edittype) { cm[i].edittype = "text"; }
|
8825
8858
|
if(tmp == " " || tmp == " " || (tmp.length==1 && tmp.charCodeAt(0)==160) ) {tmp='';}
|
8826
|
-
var elc = $.jgrid.createEl(cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
|
8859
|
+
var elc = $.jgrid.createEl.call($t,cm[i].edittype,opt,tmp,true,$.extend({},$.jgrid.ajaxOptions,$t.p.ajaxSelectOptions || {}));
|
8827
8860
|
$(elc).addClass("editable");
|
8828
8861
|
if(treeg) { $("span:first",this).append(elc); }
|
8829
8862
|
else { $(this).append(elc); }
|
@@ -9142,6 +9175,7 @@ $.jgrid.extend({
|
|
9142
9175
|
});
|
9143
9176
|
}
|
9144
9177
|
$($t).jqGrid('addRowData', p.rowID, p.initdata, p.position);
|
9178
|
+
p.rowID = $t.p.idPrefix + p.rowID;
|
9145
9179
|
$("#"+$.jgrid.jqID(p.rowID), "#"+$.jgrid.jqID($t.p.id)).addClass("jqgrid-new-row");
|
9146
9180
|
if(p.useFormatter) {
|
9147
9181
|
$("#"+$.jgrid.jqID(p.rowID)+" .ui-inline-edit", "#"+$.jgrid.jqID($t.p.id)).click();
|
@@ -9580,7 +9614,7 @@ $.jgrid.extend({
|
|
9580
9614
|
}
|
9581
9615
|
|
9582
9616
|
select.append("<option value='"+i+"' "+
|
9583
|
-
(this.hidden?"":"selected='selected'")+">"+colNames[i]+"</option>");
|
9617
|
+
(this.hidden?"":"selected='selected'")+">"+jQuery.jgrid.stripHtml(colNames[i])+"</option>");
|
9584
9618
|
});
|
9585
9619
|
function call(fn, obj) {
|
9586
9620
|
if (!fn) { return; }
|
@@ -10936,39 +10970,39 @@ $.jqDnR={
|
|
10936
10970
|
dnr:{},
|
10937
10971
|
e:0,
|
10938
10972
|
drag:function(v){
|
10939
|
-
|
10940
|
-
|
10973
|
+
if(M.k == 'd'){E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY});}
|
10974
|
+
else {
|
10941
10975
|
E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)});
|
10942
10976
|
if(M1){E1.css({width:Math.max(v.pageX-M1.pX+M1.W,0),height:Math.max(v.pageY-M1.pY+M1.H,0)});}
|
10943
10977
|
}
|
10944
|
-
|
10945
|
-
|
10978
|
+
return false;
|
10979
|
+
},
|
10946
10980
|
stop:function(){
|
10947
10981
|
//E.css('opacity',M.o);
|
10948
10982
|
$(document).unbind('mousemove',J.drag).unbind('mouseup',J.stop);
|
10949
10983
|
}
|
10950
10984
|
};
|
10951
|
-
var J=$.jqDnR,M=J.dnr,E=J.e,E1,
|
10985
|
+
var J=$.jqDnR,M=J.dnr,E=J.e,E1,M1,
|
10952
10986
|
i=function(e,h,k,aR){
|
10953
10987
|
return e.each(function(){
|
10954
10988
|
h=(h)?$(h,e):e;
|
10955
|
-
|
10956
|
-
|
10957
|
-
|
10958
|
-
|
10959
|
-
|
10960
|
-
|
10961
|
-
|
10962
|
-
|
10963
|
-
|
10964
|
-
|
10965
|
-
|
10966
|
-
|
10967
|
-
|
10968
|
-
|
10989
|
+
h.bind('mousedown',{e:e,k:k},function(v){
|
10990
|
+
var d=v.data,p={};E=d.e;E1 = aR ? $(aR) : false;
|
10991
|
+
// attempt utilization of dimensions plugin to fix IE issues
|
10992
|
+
if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}}
|
10993
|
+
M={
|
10994
|
+
X:p.left||f('left')||0,
|
10995
|
+
Y:p.top||f('top')||0,
|
10996
|
+
W:f('width')||E[0].scrollWidth||0,
|
10997
|
+
H:f('height')||E[0].scrollHeight||0,
|
10998
|
+
pX:v.pageX,
|
10999
|
+
pY:v.pageY,
|
11000
|
+
k:d.k
|
11001
|
+
//o:E.css('opacity')
|
11002
|
+
};
|
10969
11003
|
// also resize
|
10970
11004
|
if(E1 && d.k != 'd'){
|
10971
|
-
|
11005
|
+
M1={
|
10972
11006
|
X:p.left||f1('left')||0,
|
10973
11007
|
Y:p.top||f1('top')||0,
|
10974
11008
|
W:E1[0].offsetWidth||f1('width')||0,
|
@@ -10978,17 +11012,17 @@ i=function(e,h,k,aR){
|
|
10978
11012
|
k:d.k
|
10979
11013
|
};
|
10980
11014
|
} else {M1 = false;}
|
10981
|
-
|
11015
|
+
//E.css({opacity:0.8});
|
10982
11016
|
if($("input.hasDatepicker",E[0])[0]) {
|
10983
11017
|
try {$("input.hasDatepicker",E[0]).datepicker('hide');}catch (dpe){}
|
10984
11018
|
}
|
10985
|
-
|
10986
|
-
|
10987
|
-
|
11019
|
+
$(document).mousemove($.jqDnR.drag).mouseup($.jqDnR.stop);
|
11020
|
+
return false;
|
11021
|
+
});
|
10988
11022
|
});
|
10989
11023
|
},
|
10990
|
-
f=function(k){return parseInt(E.css(k))||false;}
|
10991
|
-
f1=function(k){
|
11024
|
+
f=function(k){return parseInt(E.css(k),10)||false;},
|
11025
|
+
f1=function(k){return parseInt(E1.css(k),10)||false;};
|
10992
11026
|
})(jQuery);/*
|
10993
11027
|
* jqModal - Minimalist Modaling with jQuery
|
10994
11028
|
* (http://dev.iceburg.net/jquery/jqmodal/)
|
@@ -11324,7 +11358,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11324
11358
|
};
|
11325
11359
|
$.fn.fmatter.checkbox =function(cval, opts) {
|
11326
11360
|
var op = $.extend({},opts.checkbox), ds;
|
11327
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11361
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11328
11362
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11329
11363
|
}
|
11330
11364
|
if(op.disabled===true) {ds = "disabled=\"disabled\"";} else {ds="";}
|
@@ -11336,7 +11370,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11336
11370
|
$.fn.fmatter.link = function(cellval, opts) {
|
11337
11371
|
var op = {target:opts.target};
|
11338
11372
|
var target = "";
|
11339
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11373
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11340
11374
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11341
11375
|
}
|
11342
11376
|
if(op.target) {target = 'target=' + op.target;}
|
@@ -11349,7 +11383,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11349
11383
|
$.fn.fmatter.showlink = function(cellval, opts) {
|
11350
11384
|
var op = {baseLinkUrl: opts.baseLinkUrl,showAction:opts.showAction, addParam: opts.addParam || "", target: opts.target, idName: opts.idName},
|
11351
11385
|
target = "", idUrl;
|
11352
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11386
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11353
11387
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11354
11388
|
}
|
11355
11389
|
if(op.target) {target = 'target=' + op.target;}
|
@@ -11362,7 +11396,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11362
11396
|
};
|
11363
11397
|
$.fn.fmatter.integer = function(cellval, opts) {
|
11364
11398
|
var op = $.extend({},opts.integer);
|
11365
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11399
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11366
11400
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11367
11401
|
}
|
11368
11402
|
if($.fmatter.isEmpty(cellval)) {
|
@@ -11372,7 +11406,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11372
11406
|
};
|
11373
11407
|
$.fn.fmatter.number = function (cellval, opts) {
|
11374
11408
|
var op = $.extend({},opts.number);
|
11375
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11409
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11376
11410
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11377
11411
|
}
|
11378
11412
|
if($.fmatter.isEmpty(cellval)) {
|
@@ -11382,7 +11416,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11382
11416
|
};
|
11383
11417
|
$.fn.fmatter.currency = function (cellval, opts) {
|
11384
11418
|
var op = $.extend({},opts.currency);
|
11385
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11419
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11386
11420
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11387
11421
|
}
|
11388
11422
|
if($.fmatter.isEmpty(cellval)) {
|
@@ -11392,7 +11426,7 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11392
11426
|
};
|
11393
11427
|
$.fn.fmatter.date = function (cellval, opts, rwd, act) {
|
11394
11428
|
var op = $.extend({},opts.date);
|
11395
|
-
if(!$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11429
|
+
if(opts.colModel !== undefined && !$.fmatter.isUndefined(opts.colModel.formatoptions)) {
|
11396
11430
|
op = $.extend({},op,opts.colModel.formatoptions);
|
11397
11431
|
}
|
11398
11432
|
if(!op.reformatAfterEdit && act=='edit'){
|
@@ -11462,6 +11496,8 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11462
11496
|
afterRestore: null,
|
11463
11497
|
extraparam: {},
|
11464
11498
|
url: null,
|
11499
|
+
restoreAfterError: true,
|
11500
|
+
mtype: "POST",
|
11465
11501
|
delOptions: {},
|
11466
11502
|
editOptions : {}
|
11467
11503
|
};
|
@@ -11493,16 +11529,28 @@ hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function()
|
|
11493
11529
|
oper = opers.oper;
|
11494
11530
|
op.extraparam[oper] = opers.addoper;
|
11495
11531
|
}
|
11532
|
+
var actop = {
|
11533
|
+
keys : op.keys,
|
11534
|
+
oneditfunc: op.onEdit,
|
11535
|
+
successfunc: op.onSuccess,
|
11536
|
+
url: op.url,
|
11537
|
+
extraparam: op.extraparam,
|
11538
|
+
aftersavefunc: saverow,
|
11539
|
+
errorfunc: op.onError,
|
11540
|
+
afterrestorefunc: restorerow,
|
11541
|
+
restoreAfterError: op.restoreAfterError,
|
11542
|
+
mtype: op.mtype
|
11543
|
+
};
|
11496
11544
|
switch(act)
|
11497
11545
|
{
|
11498
11546
|
case 'edit':
|
11499
|
-
$('#'+gid).jqGrid('editRow',rid,
|
11547
|
+
$('#'+gid).jqGrid('editRow', rid, actop);
|
11500
11548
|
$("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").hide();
|
11501
11549
|
$("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").show();
|
11502
11550
|
$($t).triggerHandler("jqGridAfterGridComplete");
|
11503
11551
|
break;
|
11504
11552
|
case 'save':
|
11505
|
-
if ( $('#'+gid).jqGrid('saveRow',rid,
|
11553
|
+
if ( $('#'+gid).jqGrid('saveRow', rid, actop) ) {
|
11506
11554
|
$("tr#"+rid+" div.ui-inline-edit, "+"tr#"+rid+" div.ui-inline-del","#"+gid+ ".ui-jqgrid-btable:first").show();
|
11507
11555
|
$("tr#"+rid+" div.ui-inline-save, "+"tr#"+rid+" div.ui-inline-cancel","#"+gid+ ".ui-jqgrid-btable:first").hide();
|
11508
11556
|
$($t).triggerHandler("jqGridAfterGridComplete");
|