Skip to content

Commit 45e7813

Browse files
committed
update min/map/src and dist files
1 parent 59cfd17 commit 45e7813

17 files changed

+70
-58
lines changed

dist/jquery.jqgrid.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.jqgrid.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.jqgrid.src.js

+16-12
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Dual licensed under the MIT and GPL licenses
99
* http://www.opensource.org/licenses/mit-license.php
1010
* http://www.gnu.org/licenses/gpl-2.0.html
11-
* Date: 2017-05-23
11+
* Date: 2017-05-28
1212
*/
1313
//jsHint options
1414
/*jshint eqnull:true */
@@ -4977,7 +4977,7 @@
49774977
});
49784978
p.sortname = sort1.substring(0, sort1.length - p.sortorder.length - 1);
49794979
},
4980-
sortData = function (index, idxcol, reload, sor, obj) {
4980+
sortData = function (index, idxcol, reload, sor, obj, e) {
49814981
var self = this, mygrid = self.grid, cm = p.colModel[idxcol], disabledClasses = getGuiStyles("states.disabled");
49824982
if (cm == null || !cm.sortable) { return; }
49834983
if (p.savedRow.length > 0) { return; }
@@ -5079,7 +5079,7 @@
50795079
index = index.substring(5 + p.id.length + 1); // bad to be changed!?!
50805080
p.sortname = cm.index || index;
50815081
}
5082-
if (!feedback.call(self, "onSortCol", p.sortname, idxcol, p.sortorder)) {
5082+
if (!feedback.call(self, "onSortCol", p.sortname, idxcol, p.sortorder, e || {})) {
50835083
p.lastsort = idxcol;
50845084
return;
50855085
}
@@ -5594,7 +5594,7 @@
55945594
}
55955595
var iColByName = getColumnHeaderIndex(this);
55965596
if (iColByName != null) {
5597-
sortData.call(ts, $("div", this)[0].id, iColByName, r, d, this);
5597+
sortData.call(ts, $("div", this)[0].id, iColByName, r, d, this, e);
55985598
}
55995599
return false;
56005600
});
@@ -9260,6 +9260,10 @@
92609260
checkValues: function (val, iCol, customobject, nam, options) {
92619261
var edtrul, nm, dft, g = this, p = g.p, colModel = p.colModel, cm, isEmpty = jgrid.isEmpty,
92629262
editMsg = getGridRes.call($(g), "edit.msg"), ret,
9263+
getPropertyValue = function (propertyName) {
9264+
var propValue = edtrul[propertyName];
9265+
return $.isFunction(propValue) ? propValue.call(g, options) : propValue;
9266+
},
92639267
dateMasks = getGridRes.call($(g), "formatter.date.masks");
92649268
if (customobject === undefined) {
92659269
if (typeof iCol === "string") {
@@ -9278,12 +9282,12 @@
92789282
}
92799283
if (edtrul) {
92809284
if (!nm) { nm = p.colNames != null ? p.colNames[iCol] : cm.label; }
9281-
if (edtrul.required === true) {
9285+
if (getPropertyValue("required") === true) {
92829286
if (isEmpty(val)) { return [false, nm + ": " + editMsg.required, ""]; }
92839287
}
92849288
// force required
9285-
var rqfield = edtrul.required === false ? false : true;
9286-
if (edtrul.number === true) {
9289+
var rqfield = getPropertyValue("required") === false ? false : true;
9290+
if (getPropertyValue("number") === true) {
92879291
if (!(rqfield === false && isEmpty(val))) {
92889292
if (isNaN(val)) { return [false, nm + ": " + editMsg.number, ""]; }
92899293
}
@@ -9295,20 +9299,20 @@
92959299
if (parseFloat(val) > parseFloat(edtrul.maxValue)) { return [false, nm + ": " + editMsg.maxValue + " " + edtrul.maxValue, ""]; }
92969300
}
92979301
var filter;
9298-
if (edtrul.email === true) {
9302+
if (getPropertyValue("email") === true) {
92999303
if (!(rqfield === false && isEmpty(val))) {
93009304
// taken from $ Validate plugin
93019305
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;
93029306
if (!filter.test(val)) { return [false, nm + ": " + editMsg.email, ""]; }
93039307
}
93049308
}
9305-
if (edtrul.integer === true) {
9309+
if (getPropertyValue("integer") === true) {
93069310
if (!(rqfield === false && isEmpty(val))) {
93079311
if (isNaN(val)) { return [false, nm + ": " + editMsg.integer, ""]; }
93089312
if ((val % 1 !== 0) || (val.indexOf(".") !== -1)) { return [false, nm + ": " + editMsg.integer, ""]; }
93099313
}
93109314
}
9311-
if (edtrul.date === true) {
9315+
if (getPropertyValue("date") === true) {
93129316
if (!(rqfield === false && isEmpty(val))) {
93139317
if (cm.formatoptions && cm.formatoptions.newformat) {
93149318
dft = cm.formatoptions.newformat;
@@ -9321,12 +9325,12 @@
93219325
if (!jgrid.checkDate(dft, val)) { return [false, nm + ": " + editMsg.date + " - " + dft, ""]; }
93229326
}
93239327
}
9324-
if (edtrul.time === true) {
9328+
if (getPropertyValue("time") === true) {
93259329
if (!(rqfield === false && isEmpty(val))) {
93269330
if (!jgrid.checkTime(val)) { return [false, nm + ": " + editMsg.date + " - hh:mm (am/pm)", ""]; }
93279331
}
93289332
}
9329-
if (edtrul.url === true) {
9333+
if (getPropertyValue("url") === true) {
93309334
if (!(rqfield === false && isEmpty(val))) {
93319335
filter = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
93329336
if (!filter.test(val)) { return [false, nm + ": " + editMsg.url, ""]; }

dist/modules/grid.base.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Dual licensed under the MIT and GPL licenses
99
* http://www.opensource.org/licenses/mit-license.php
1010
* http://www.gnu.org/licenses/gpl-2.0.html
11-
* Date: 2017-05-23
11+
* Date: 2017-05-28
1212
*/
1313
//jsHint options
1414
/*jshint eqnull:true */
@@ -4977,7 +4977,7 @@
49774977
});
49784978
p.sortname = sort1.substring(0, sort1.length - p.sortorder.length - 1);
49794979
},
4980-
sortData = function (index, idxcol, reload, sor, obj) {
4980+
sortData = function (index, idxcol, reload, sor, obj, e) {
49814981
var self = this, mygrid = self.grid, cm = p.colModel[idxcol], disabledClasses = getGuiStyles("states.disabled");
49824982
if (cm == null || !cm.sortable) { return; }
49834983
if (p.savedRow.length > 0) { return; }
@@ -5079,7 +5079,7 @@
50795079
index = index.substring(5 + p.id.length + 1); // bad to be changed!?!
50805080
p.sortname = cm.index || index;
50815081
}
5082-
if (!feedback.call(self, "onSortCol", p.sortname, idxcol, p.sortorder)) {
5082+
if (!feedback.call(self, "onSortCol", p.sortname, idxcol, p.sortorder, e || {})) {
50835083
p.lastsort = idxcol;
50845084
return;
50855085
}
@@ -5594,7 +5594,7 @@
55945594
}
55955595
var iColByName = getColumnHeaderIndex(this);
55965596
if (iColByName != null) {
5597-
sortData.call(ts, $("div", this)[0].id, iColByName, r, d, this);
5597+
sortData.call(ts, $("div", this)[0].id, iColByName, r, d, this, e);
55985598
}
55995599
return false;
56005600
});

dist/modules/grid.common.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,10 @@
732732
checkValues: function (val, iCol, customobject, nam, options) {
733733
var edtrul, nm, dft, g = this, p = g.p, colModel = p.colModel, cm, isEmpty = jgrid.isEmpty,
734734
editMsg = getGridRes.call($(g), "edit.msg"), ret,
735+
getPropertyValue = function (propertyName) {
736+
var propValue = edtrul[propertyName];
737+
return $.isFunction(propValue) ? propValue.call(g, options) : propValue;
738+
},
735739
dateMasks = getGridRes.call($(g), "formatter.date.masks");
736740
if (customobject === undefined) {
737741
if (typeof iCol === "string") {
@@ -750,12 +754,12 @@
750754
}
751755
if (edtrul) {
752756
if (!nm) { nm = p.colNames != null ? p.colNames[iCol] : cm.label; }
753-
if (edtrul.required === true) {
757+
if (getPropertyValue("required") === true) {
754758
if (isEmpty(val)) { return [false, nm + ": " + editMsg.required, ""]; }
755759
}
756760
// force required
757-
var rqfield = edtrul.required === false ? false : true;
758-
if (edtrul.number === true) {
761+
var rqfield = getPropertyValue("required") === false ? false : true;
762+
if (getPropertyValue("number") === true) {
759763
if (!(rqfield === false && isEmpty(val))) {
760764
if (isNaN(val)) { return [false, nm + ": " + editMsg.number, ""]; }
761765
}
@@ -767,20 +771,20 @@
767771
if (parseFloat(val) > parseFloat(edtrul.maxValue)) { return [false, nm + ": " + editMsg.maxValue + " " + edtrul.maxValue, ""]; }
768772
}
769773
var filter;
770-
if (edtrul.email === true) {
774+
if (getPropertyValue("email") === true) {
771775
if (!(rqfield === false && isEmpty(val))) {
772776
// taken from $ Validate plugin
773777
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;
774778
if (!filter.test(val)) { return [false, nm + ": " + editMsg.email, ""]; }
775779
}
776780
}
777-
if (edtrul.integer === true) {
781+
if (getPropertyValue("integer") === true) {
778782
if (!(rqfield === false && isEmpty(val))) {
779783
if (isNaN(val)) { return [false, nm + ": " + editMsg.integer, ""]; }
780784
if ((val % 1 !== 0) || (val.indexOf(".") !== -1)) { return [false, nm + ": " + editMsg.integer, ""]; }
781785
}
782786
}
783-
if (edtrul.date === true) {
787+
if (getPropertyValue("date") === true) {
784788
if (!(rqfield === false && isEmpty(val))) {
785789
if (cm.formatoptions && cm.formatoptions.newformat) {
786790
dft = cm.formatoptions.newformat;
@@ -793,12 +797,12 @@
793797
if (!jgrid.checkDate(dft, val)) { return [false, nm + ": " + editMsg.date + " - " + dft, ""]; }
794798
}
795799
}
796-
if (edtrul.time === true) {
800+
if (getPropertyValue("time") === true) {
797801
if (!(rqfield === false && isEmpty(val))) {
798802
if (!jgrid.checkTime(val)) { return [false, nm + ": " + editMsg.date + " - hh:mm (am/pm)", ""]; }
799803
}
800804
}
801-
if (edtrul.url === true) {
805+
if (getPropertyValue("url") === true) {
802806
if (!(rqfield === false && isEmpty(val))) {
803807
filter = /^(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
804808
if (!filter.test(val)) { return [false, nm + ": " + editMsg.url, ""]; }

dist/modules/min/grid.base.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modules/min/grid.base.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)