+ changed more uses of Utils.activeWindow to Utils.getCurrentWindow()

+ Generalized Aza's iQ.css('-moz-transform') fix
This commit is contained in:
Ian Gilman 2010-05-28 13:54:29 -07:00
parent 0bf6fe1ad3
commit 97a61c6441
2 changed files with 9 additions and 9 deletions

View File

@ -137,7 +137,7 @@ var Tabbar = {
var self = this;
visibleTabs.forEach(function(tab){
tab.collapsed = false;
Utils.activeWindow.gBrowser.moveTabTo(tab, self.el.children.length-1);
Utils.getCurrentWindow().gBrowser.moveTabTo(tab, self.el.children.length-1);
});
},
@ -177,7 +177,7 @@ window.Page = {
window.statusbar.visible = false;
// Mac Only
Utils.activeWindow.document.getElementById("main-window").setAttribute("activetitlebarcolor", "#C4C4C4");
Utils.getCurrentWindow().document.getElementById("main-window").setAttribute("activetitlebarcolor", "#C4C4C4");
},
showChrome: function(){
@ -186,7 +186,7 @@ window.Page = {
window.statusbar.visible = true;
// Mac Only
Utils.activeWindow.document.getElementById("main-window").removeAttribute("activetitlebarcolor");
Utils.getCurrentWindow().document.getElementById("main-window").removeAttribute("activetitlebarcolor");
},
setupKeyHandlers: function(){

View File

@ -517,6 +517,11 @@ iQ.fn = iQ.prototype = {
} else
properties = a;
var subsitutions = {
'-moz-transform': 'MozTransform',
'z-index': 'zIndex'
};
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
iQ.each(properties, function(key, value) {
if(key == 'left' || key == 'top' || key == 'width' || key == 'height') {
@ -524,12 +529,7 @@ iQ.fn = iQ.prototype = {
value += 'px';
}
// -moz-transform is a special case. To set it doing elem.style["-moz-transform"]
// doesn't work. You have to use elem.style["MozTransform"]. There are probably
// other key values like this.
// TODO: Generalize.
if( key == "-moz-transform" ) key = "MozTransform";
elem.style[key] = value;
elem.style[subsitutions[key] || key] = value;
});
}
},