v1.1.3.0
This commit is contained in:
@@ -70,6 +70,21 @@
|
||||
}
|
||||
sax.debug = sax.debugMode ? win.console.log.bind(win.console) : function () { };
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.compareCI = function (a, b)
|
||||
{
|
||||
var comparison = a.toLowerCase().localeCompare(b.toLowerCase());
|
||||
if (comparison === 0)
|
||||
return a.localeCompare(b);
|
||||
return comparison;
|
||||
}
|
||||
sax.arraySortCI = function ()
|
||||
{
|
||||
if (!this) return this;
|
||||
this.sort(function (a, b) { return sax.compareCI(a, b); });
|
||||
return this;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------
|
||||
sax.setOddDataRowClass = function (rowSel, cName)
|
||||
{
|
||||
@@ -387,7 +402,7 @@
|
||||
// Data entry.
|
||||
sax.clearControlErrors = function (context)
|
||||
{
|
||||
var $ctrls = $('.sax-form-control', $(context)).removeClass('sax-error');
|
||||
var $ctrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error');
|
||||
$('.sax-message', $ctrls).empty();
|
||||
}
|
||||
sax.clearControlError = function (sel)
|
||||
@@ -402,8 +417,8 @@
|
||||
}
|
||||
sax.refreshControlValues = function (controlValues, context)
|
||||
{
|
||||
var $frmCtrls = $('.sax-form-control', $(context)).removeClass('sax-error');
|
||||
sax.clearControlErrors();
|
||||
var $frmCtrls = $('.sax-form-control', $(context || doc.body)).removeClass('sax-error');
|
||||
sax.clearControlErrors(context);
|
||||
var values = (controlValues || []);
|
||||
var valuesLen = values.length;
|
||||
for (var valIdx = 0; valIdx < valuesLen; valIdx++)
|
||||
@@ -516,4 +531,14 @@
|
||||
|
||||
}(window, window.document));
|
||||
|
||||
//--------------------------------------------------------------
|
||||
(function ()
|
||||
{
|
||||
if (typeof Object.defineProperty === 'function')
|
||||
{
|
||||
try { Object.defineProperty(Array.prototype, 'sortCI', { value: sax.arraySortCI }); } catch (e) { }
|
||||
}
|
||||
if (!Array.prototype.sortBy) Array.prototype.sortCI = sax.arraySortCI;
|
||||
})();
|
||||
|
||||
/* The End */
|
||||
Reference in New Issue
Block a user