mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
+ Fixed a typo in iQ.each that was breaking everything
+ Rearranged the UIClass initialization sequence a little, to make sure everything happens in the right sequence
This commit is contained in:
parent
8e3ec23810
commit
0896f3fae1
@ -568,13 +568,28 @@ window.Page = {
|
|||||||
// Class: UIClass
|
// Class: UIClass
|
||||||
// Singleton top-level UI manager. TODO: Integrate with <Page>.
|
// Singleton top-level UI manager. TODO: Integrate with <Page>.
|
||||||
function UIClass(){
|
function UIClass(){
|
||||||
if (window.Tabs)
|
try {
|
||||||
this.init();
|
Utils.log('TabCandy init --------------------');
|
||||||
else {
|
|
||||||
var self = this;
|
// Variable: navBar
|
||||||
TabsManager.addSubscriber(this, 'load', function() {
|
// A reference to the <Navbar>, for manipulating the browser's nav bar.
|
||||||
self.init();
|
this.navBar = Navbar;
|
||||||
});
|
|
||||||
|
// Variable: tabBar
|
||||||
|
// A reference to the <Tabbar>, for manipulating the browser's tab bar.
|
||||||
|
this.tabBar = Tabbar;
|
||||||
|
|
||||||
|
// Variable: devMode
|
||||||
|
// If true (set by an url parameter), adds extra features to the screen.
|
||||||
|
// TODO: Integrate with the dev menu
|
||||||
|
this.devMode = false;
|
||||||
|
|
||||||
|
// Variable: currentTab
|
||||||
|
// Keeps track of which <Tabs> tab we are currently on.
|
||||||
|
// Used to facilitate zooming down from a previous tab.
|
||||||
|
this.currentTab = Utils.activeTab;
|
||||||
|
} catch(e) {
|
||||||
|
Utils.log(e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -583,26 +598,22 @@ UIClass.prototype = {
|
|||||||
// ----------
|
// ----------
|
||||||
init: function() {
|
init: function() {
|
||||||
try {
|
try {
|
||||||
Utils.log('TabCandy init --------------------');
|
if (window.Tabs)
|
||||||
|
this._secondaryInit();
|
||||||
// Variable: navBar
|
else {
|
||||||
// A reference to the <Navbar>, for manipulating the browser's nav bar.
|
var self = this;
|
||||||
this.navBar = Navbar;
|
TabsManager.addSubscriber(this, 'load', function() {
|
||||||
|
self._secondaryInit();
|
||||||
// Variable: tabBar
|
});
|
||||||
// A reference to the <Tabbar>, for manipulating the browser's tab bar.
|
}
|
||||||
this.tabBar = Tabbar;
|
} catch(e) {
|
||||||
|
Utils.log(e);
|
||||||
// Variable: devMode
|
}
|
||||||
// If true (set by an url parameter), adds extra features to the screen.
|
},
|
||||||
// TODO: Integrate with the dev menu
|
|
||||||
this.devMode = false;
|
// -----------
|
||||||
|
_secondaryInit: function() {
|
||||||
// Variable: currentTab
|
try {
|
||||||
// Keeps track of which <Tabs> tab we are currently on.
|
|
||||||
// Used to facilitate zooming down from a previous tab.
|
|
||||||
this.currentTab = Utils.activeTab;
|
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.setBrowserKeyHandler();
|
this.setBrowserKeyHandler();
|
||||||
@ -650,10 +661,7 @@ UIClass.prototype = {
|
|||||||
self.delayInit();
|
self.delayInit();
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
Utils.log("Error in UIClass(): " + e);
|
Utils.log(e);
|
||||||
Utils.log(e.fileName);
|
|
||||||
Utils.log(e.lineNumber);
|
|
||||||
Utils.log(e.stack);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1145,5 +1153,6 @@ UIClass.prototype = {
|
|||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
window.UI = new UIClass();
|
window.UI = new UIClass();
|
||||||
|
window.UI.init();
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -227,7 +227,7 @@ iQ.fn = iQ.prototype = {
|
|||||||
// Function: each
|
// Function: each
|
||||||
// Execute a callback for every element in the matched set.
|
// Execute a callback for every element in the matched set.
|
||||||
each: function( callback ) {
|
each: function( callback ) {
|
||||||
if ( !iQ.isFunction(value) ) {
|
if ( !iQ.isFunction(callback) ) {
|
||||||
Utils.assert("each's argument must be a function", false);
|
Utils.assert("each's argument must be a function", false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user