+ The dev menu isn't appearing. Added a try/catch to see if that would illuminate anything. It did not. Will dig in more after applying all the patches.

This commit is contained in:
Ian Gilman 2010-07-06 14:53:40 -07:00
parent 0cb80921f3
commit 047e6bcb2c

View File

@ -916,66 +916,70 @@ UIClass.prototype = {
// ----------
addDevMenu: function() {
var self = this;
var $select = iQ('<select>')
.css({
position: 'absolute',
bottom: 5,
right: 5,
opacity: .2
})
.appendTo('body')
.change(function () {
var index = iQ(this).val();
try {
commands[index].code.apply(commands[index].element);
} catch(e) {
Utils.log('dev menu error', e);
try {
var self = this;
var $select = iQ('<select>')
.css({
position: 'absolute',
bottom: 5,
right: 5,
opacity: .2
})
.appendTo('body')
.change(function () {
var index = iQ(this).val();
try {
commands[index].code.apply(commands[index].element);
} catch(e) {
Utils.log('dev menu error', e);
}
iQ(this).val(0);
});
var commands = [{
name: 'dev menu',
code: function() {
}
iQ(this).val(0);
});
var commands = [{
name: 'dev menu',
code: function() {
}, {
name: 'show trenches',
code: function() {
Trenches.toggleShown();
iQ(this).html((Trenches.showDebug ? 'hide' : 'show') + ' trenches');
}
}, {
name: 'refresh',
code: function() {
location.href = 'tabcandy.html';
}
}, {
name: 'code docs',
code: function() {
self.newTab('http://hg.mozilla.org/labs/tabcandy/raw-file/tip/content/doc/index.html');
}
}, {
name: 'save',
code: function() {
self.saveAll();
}
}, {
name: 'group sites',
code: function() {
self.arrangeBySite();
}
}];
var count = commands.length;
var a;
for(a = 0; a < count; a++) {
commands[a].element = iQ('<option>')
.val(a)
.html(commands[a].name)
.appendTo($select)
.get(0);
}
}, {
name: 'show trenches',
code: function() {
Trenches.toggleShown();
iQ(this).html((Trenches.showDebug ? 'hide' : 'show') + ' trenches');
}
}, {
name: 'refresh',
code: function() {
location.href = 'tabcandy.html';
}
}, {
name: 'code docs',
code: function() {
self.newTab('http://hg.mozilla.org/labs/tabcandy/raw-file/tip/content/doc/index.html');
}
}, {
name: 'save',
code: function() {
self.saveAll();
}
}, {
name: 'group sites',
code: function() {
self.arrangeBySite();
}
}];
var count = commands.length;
var a;
for(a = 0; a < count; a++) {
commands[a].element = iQ('<option>')
.val(a)
.html(commands[a].name)
.appendTo($select)
.get(0);
} catch(e) {
Utils.log(e);
}
},