]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Removed instances of " .. + (++ .." to avoid a minification bug in closure...
authorScott González <scott.gonzalez@gmail.com>
Tue, 18 May 2010 00:48:07 +0000 (20:48 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 18 May 2010 00:48:07 +0000 (20:48 -0400)
ui/jquery.ui.tabs.js

index 8b6d7232947a368a1169dcf7b6c8a7342eb03fe5..a934c0f218dbbbeed54757177b6e8155fc07cc26 100644 (file)
 var tabId = 0,
        listId = 0;
 
+function getNextTabId() {
+       return ++tabId;
+}
+
+function getNextListId() {
+       return ++listId;
+}
+
 $.widget("ui.tabs", {
        options: {
                add: null,
@@ -56,7 +64,7 @@ $.widget("ui.tabs", {
 
        _tabId: function(a) {
                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) {
@@ -64,7 +72,7 @@ $.widget("ui.tabs", {
        },
 
        _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)));
        },