Skip to content

Commit

Permalink
release 1.0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
liedekef committed Jan 3, 2025
1 parent 3a4b7b4 commit 6d66132
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 28 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.22
1.0.23
39 changes: 13 additions & 26 deletions jquery.jtable.js
Original file line number Diff line number Diff line change
Expand Up @@ -1113,12 +1113,12 @@ THE SOFTWARE.
.addClass('jtable-toolbar-item-text').appendTo($toolBarItem);
}

// click event
// click event ("click" is a function defined for the item in the options list, not a triggered jquery event)
if (item.click) {
$toolBarItem.on("click", function (e) {
e.preventDefault();
e.stopPropagation();
item.trigger("click");
item.click(); // call the defined function
});
}

Expand Down Expand Up @@ -4355,14 +4355,11 @@ THE SOFTWARE.
*************************************************************************/
_doExtraActions: function () {
base._doExtraActions.apply(this, arguments);
if (this.options.sorting) {
if (this.options.saveUserPreferences) {
this._loadSavedSortingArray();
}
// if _lastSorting is empty, load the default
if ($.isEmptyObject(this._lastSorting)) {
this._buildDefaultSortingArray();
}
if (this.options.sorting) {
this._buildDefaultSortingArray();
}
if (this.options.saveUserPreferences && this.options.sorting) {
this._loadColumnSortSettings();
}
},

Expand Down Expand Up @@ -4543,7 +4540,7 @@ THE SOFTWARE.

/* Loads field settings from cookie that is saved by _saveColumnSortSettings method.
*************************************************************************/
_loadSavedSortingArray: function () {
_loadColumnSortSettings: function () {
let self = this;

let columnSortSettingsCookie = self._getCookie('column-sortsettings');
Expand All @@ -4559,17 +4556,10 @@ THE SOFTWARE.
let splitted = fieldSetting.split('=');
let fieldName = splitted[0];
let sortOrder = splitted[1];
if (sortOrder.toUpperCase() == 'DESC') {
sortOrder = 'DESC";
} else {
sortOrder = 'ASC";
}
if ($.inArray(fieldName,self._fieldList) > -1) {
self._lastSorting.push({
'fieldName': fieldName,
'sortOrder': sortOrder
});
}
self._lastSorting.push({
'fieldName': fieldName,
'sortOrder': sortOrder
});
});
},
});
Expand Down Expand Up @@ -4717,7 +4707,7 @@ THE SOFTWARE.
// Check if visibility value is valid
if ($.inArray(visibility,['visible', 'hidden', 'fixed','separator']) < 0) {
this._logWarn('Visibility value is not valid: "' + visibility + '"! Setting to visible.');
visibility = 'visible';
visibility = 'visible';
}

// Get the field
Expand Down Expand Up @@ -5044,9 +5034,6 @@ THE SOFTWARE.
let settings = splitted[1].split(';');
let columnVisibility = settings[0];
let columnWidth = settings[1];
if ($.inArray(columnVisibility,['visible', 'hidden', 'fixed','separator']) < 0) {
columnVisibility = 'visible';
}
if ($.inArray(fieldName,self._fieldList) > -1) {
if ( self.options.fields[fieldName].visibility != 'fixed') {
self.options.fields[fieldName].visibility = columnVisibility;
Expand Down
2 changes: 1 addition & 1 deletion jquery.jtable.min.js

Large diffs are not rendered by default.

0 comments on commit 6d66132

Please sign in to comment.