Skip to content

Commit

Permalink
$.trim updates as required by JQuery 3.5x
Browse files Browse the repository at this point in the history
  • Loading branch information
GedMarc committed Jun 5, 2020
1 parent 3e3bbc7 commit 9c1e97b
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions demos/js/jquery.layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@
retVal = g(fn)(Instance, s, o, lName);
}
} catch (ex) {
_log(options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") + " " + lng)), false);
_log(options.errors.callbackError.replace(/EVENT/, String.prototype.trim.call((pane || "") + " " + lng)), false);
if ($.type(ex) === "string" && string.length)
_log("Exception: " + ex, false);
}
Expand Down Expand Up @@ -1521,7 +1521,7 @@
if (type == "resizer" && $El.hasClass(root + _slide))
classes += (root + _slide + _hover) + (root + _pane + _slide + _hover);

return $.trim(classes);
return String.prototype.trim.call(classes);
}
, addHover = function (evt, el) {
var $E = $(el || this);
Expand Down Expand Up @@ -5482,7 +5482,7 @@ jQuery.cookie = function (name, value, options) {
, pair, data, i
;
for (i = 0; pair = cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
data = String.prototype.trim.call(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion demos/js/jquery.layout.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions demos/js/jquery.layout.state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @preserve jquery.layout.state 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2010
* Copyright (c) 2010
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
Expand Down Expand Up @@ -67,7 +67,7 @@ $.ui.cookie = {
, pair // loop var
;
for (var i=0, n=cs.length; i < n; i++) {
pair = $.trim(cs[i]).split('='); // name=value pair
pair = String.prototype.trim.call(cs[i]).split('='); // name=value pair
if (pair[0] == name) // found the layout cookie
return decodeURIComponent(pair[1]);
}
Expand Down Expand Up @@ -193,7 +193,7 @@ $.layout.state = {
}
return c;
}

/**
* Update layout options from the cookie, if one exists
*
Expand Down Expand Up @@ -336,4 +336,4 @@ $.layout.state = {
$.layout.onCreate.push( $.layout.state._create );
$.layout.onUnload.push( $.layout.state._unload );

})( jQuery );
})( jQuery );
4 changes: 2 additions & 2 deletions demos/js/jquery.layout_and_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@
if (type == "resizer" && $El.hasClass(root + _slide))
classes += (root + _slide + _hover) + (root + _pane + _slide + _hover);

return $.trim(classes);
return String.prototype.trim.call(classes);
}
, addHover = function (evt, el) {
var $E = $(el || this);
Expand Down Expand Up @@ -5503,7 +5503,7 @@
, pair, data, i
;
for (i = 0; pair = cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
data = String.prototype.trim.call(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion demos/js/jquery.layout_and_plugins.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/js/jquery.layout_and_plugins.min.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/jquery.layout_and_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@
if (type == "resizer" && $El.hasClass(root + _slide))
classes += (root + _slide + _hover) + (root + _pane + _slide + _hover);

return $.trim(classes);
return String.prototype.trim.call(classes);
}
, addHover = function (evt, el) {
var $E = $(el || this);
Expand Down Expand Up @@ -5503,7 +5503,7 @@
, pair, data, i
;
for (i = 0; pair = cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
data = String.prototype.trim.call(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
Expand Down Expand Up @@ -6478,7 +6478,7 @@
if ($.contains(oPane, table)) {
$(table).dataTable().fnAdjustColumnSizing();
}
});
});
};
})(jQuery);

Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.layout_and_plugins.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/plugins/jquery.layout.state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @preserve jquery.layout.state 1.0
* $Date: 2011-07-16 08:00:00 (Sat, 16 July 2011) $
*
* Copyright (c) 2010
* Copyright (c) 2010
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
Expand Down Expand Up @@ -67,7 +67,7 @@ $.ui.cookie = {
, pair // loop var
;
for (var i=0, n=cs.length; i < n; i++) {
pair = $.trim(cs[i]).split('='); // name=value pair
pair = String.prototype.trim.call(cs[i]).split('='); // name=value pair
if (pair[0] == name) // found the layout cookie
return decodeURIComponent(pair[1]);
}
Expand Down Expand Up @@ -193,7 +193,7 @@ $.layout.state = {
}
return c;
}

/**
* Update layout options from the cookie, if one exists
*
Expand Down Expand Up @@ -336,4 +336,4 @@ $.layout.state = {
$.layout.onCreate.push( $.layout.state._create );
$.layout.onUnload.push( $.layout.state._unload );

})( jQuery );
})( jQuery );
4 changes: 2 additions & 2 deletions source/stable/jquery.layout_and_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,7 @@
if (type == "resizer" && $El.hasClass(root + _slide))
classes += (root + _slide + _hover) + (root + _pane + _slide + _hover);

return $.trim(classes);
return String.prototype.trim.call(classes);
}
, addHover = function (evt, el) {
var $E = $(el || this);
Expand Down Expand Up @@ -5503,7 +5503,7 @@
, pair, data, i
;
for (i = 0; pair = cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
data = String.prototype.trim.call(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
Expand Down
2 changes: 1 addition & 1 deletion source/stable/jquery.layout_and_plugins.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/stable/plugins/jquery.layout.state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* jquery.layout.state 1.2
* $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
*
* Copyright (c) 2014
* Copyright (c) 2014
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
Expand All @@ -27,7 +27,7 @@ if (!$.layout) return;
* This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
* NOTE: This utility is REQUIRED by the layout.state plugin
*
* Cookie methods in Layout are created as part of State Management
* Cookie methods in Layout are created as part of State Management
*/
if (!$.ui) $.ui = {};
$.ui.cookie = {
Expand All @@ -42,7 +42,7 @@ $.ui.cookie = {
, pair, data, i
;
for (i=0; pair=cs[i]; i++) {
data = $.trim(pair).split('='); // name=value => [ name, value ]
data = String.prototype.trim.call(pair).split('='); // name=value => [ name, value ]
if (data[0] == name) // found the layout cookie
return decodeURIComponent(data[1]);
}
Expand Down Expand Up @@ -244,7 +244,7 @@ $.layout.state = {
var o = $.extend(true, {}, data);
//delete o.center; // center has no state-data - only children
$.each($.layout.config.allPanes, function (idx, pane) {
if (o[pane]) delete o[pane].children;
if (o[pane]) delete o[pane].children;
});
// update CURRENT layout-options with saved state data
$.extend(true, inst.options, o);
Expand Down Expand Up @@ -471,4 +471,4 @@ $.layout.state = {
$.layout.onCreate.push( $.layout.state._create );
$.layout.onUnload.push( $.layout.state._unload );

})( jQuery );
})( jQuery );
1 change: 1 addition & 0 deletions source/stable/plugins/jquery.layout.state.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9c1e97b

Please sign in to comment.