Tabs: Removed instances of " .. + (++ .." to avoid a minification bug in closure compiler. Fixes #5576 - invalid increment operand.

This commit is contained in:
Scott González 2010-05-17 20:48:07 -04:00
parent bf673476ee
commit fcbf4c0872

12
ui/jquery.ui.tabs.js vendored
View File

@ -16,6 +16,14 @@
var tabId = 0, var tabId = 0,
listId = 0; listId = 0;
function getNextTabId() {
return ++tabId;
}
function getNextListId() {
return ++listId;
}
$.widget("ui.tabs", { $.widget("ui.tabs", {
options: { options: {
add: null, add: null,
@ -56,7 +64,7 @@ $.widget("ui.tabs", {
_tabId: function(a) { _tabId: function(a) {
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') || return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
this.options.idPrefix + (++tabId); this.options.idPrefix + getNextTabId();
}, },
_sanitizeSelector: function(hash) { _sanitizeSelector: function(hash) {
@ -64,7 +72,7 @@ $.widget("ui.tabs", {
}, },
_cookie: function() { _cookie: function() {
var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + (++listId)); var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + getNextListId());
return $.cookie.apply(null, [cookie].concat($.makeArray(arguments))); return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
}, },