mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
+ Removed icons that exist elsewhere in the browser; now using them instead
+ Our toolbar button now uses the standard toolbar button styling; we just apply a glyph to it + Went through the code with http://caja.appspot.com/tools/index and fixed a number of minor issues it found + Added "refresh" to the dev menu (since you won't be able to just refresh the tabcandy page once it's in the xul:deck)
This commit is contained in:
parent
0976054f8a
commit
442793c33a
@ -222,7 +222,7 @@ window.Group = function(listOfEls, options) {
|
|||||||
self.adjustTitleSize();
|
self.adjustTitleSize();
|
||||||
|
|
||||||
self.save();
|
self.save();
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$title
|
this.$title
|
||||||
.css({backgroundRepeat: 'no-repeat'})
|
.css({backgroundRepeat: 'no-repeat'})
|
||||||
@ -276,7 +276,7 @@ window.Group = function(listOfEls, options) {
|
|||||||
|
|
||||||
// ___ Stack Expander
|
// ___ Stack Expander
|
||||||
this.$expander = iQ("<img/>")
|
this.$expander = iQ("<img/>")
|
||||||
.attr('src', 'chrome://tabcandy/content/img/app/stack-expander.png')
|
.attr('src', 'chrome://tabcandy/content/img/stack-expander.png')
|
||||||
.addClass("stackExpander")
|
.addClass("stackExpander")
|
||||||
.appendTo($container)
|
.appendTo($container)
|
||||||
.hide();
|
.hide();
|
||||||
|
@ -69,9 +69,9 @@ window.TabItem = function(container, tab) {
|
|||||||
// override dropOptions with custom tabitem methods
|
// override dropOptions with custom tabitem methods
|
||||||
// This is mostly to support the phantom groups.
|
// This is mostly to support the phantom groups.
|
||||||
this.dropOptions.drop = function(e){
|
this.dropOptions.drop = function(e){
|
||||||
$target = iQ(this.container);
|
var $target = iQ(this.container);
|
||||||
$target.removeClass("acceptsDrop");
|
$target.removeClass("acceptsDrop");
|
||||||
var phantom = $target.data("phantomGroup")
|
var phantom = $target.data("phantomGroup");
|
||||||
|
|
||||||
var group = drag.info.item.parent;
|
var group = drag.info.item.parent;
|
||||||
if( group == null ){
|
if( group == null ){
|
||||||
@ -167,7 +167,6 @@ window.TabItem = function(container, tab) {
|
|||||||
this.setResizable(true);
|
this.setResizable(true);
|
||||||
|
|
||||||
TabItems.register(this);
|
TabItems.register(this);
|
||||||
var self = this;
|
|
||||||
this.tab.mirror.addOnClose(this, function(who, info) {
|
this.tab.mirror.addOnClose(this, function(who, info) {
|
||||||
TabItems.unregister(self);
|
TabItems.unregister(self);
|
||||||
self.removeTrenches();
|
self.removeTrenches();
|
||||||
@ -443,7 +442,7 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
|||||||
width: $tabEl.width(),
|
width: $tabEl.width(),
|
||||||
height: $tabEl.height(),
|
height: $tabEl.height(),
|
||||||
pos: $tabEl.position()
|
pos: $tabEl.position()
|
||||||
}
|
};
|
||||||
|
|
||||||
var scale = window.innerWidth/orig.width;
|
var scale = window.innerWidth/orig.width;
|
||||||
|
|
||||||
@ -550,9 +549,9 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
|||||||
var $div = iQ(this.container);
|
var $div = iQ(this.container);
|
||||||
var data;
|
var data;
|
||||||
|
|
||||||
|
var box = this.getBounds();
|
||||||
if(value) {
|
if(value) {
|
||||||
this._zoomPrep = true;
|
this._zoomPrep = true;
|
||||||
var box = this.getBounds();
|
|
||||||
|
|
||||||
// The divide by two part here is a clever way to speed up the zoom-out code.
|
// The divide by two part here is a clever way to speed up the zoom-out code.
|
||||||
// Because image scaling is slowest on big images, we cheat and start the image
|
// Because image scaling is slowest on big images, we cheat and start the image
|
||||||
@ -573,9 +572,8 @@ window.TabItem.prototype = iQ.extend(new Item(), {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._zoomPrep = false;
|
this._zoomPrep = false;
|
||||||
$div.removeClass('front')
|
$div.removeClass('front');
|
||||||
|
|
||||||
var box = this.getBounds();
|
|
||||||
this.reloadBounds();
|
this.reloadBounds();
|
||||||
this.setBounds(box, true);
|
this.setBounds(box, true);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ Navbar = {
|
|||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
||||||
// ##########
|
// ##########
|
||||||
// Class: Tabbar
|
// Class: Tabbar
|
||||||
@ -786,6 +786,11 @@ UIClass.prototype = {
|
|||||||
Trenches.toggleShown();
|
Trenches.toggleShown();
|
||||||
iQ(this).html((Trenches.showDebug ? 'hide' : 'show') + ' trenches');
|
iQ(this).html((Trenches.showDebug ? 'hide' : 'show') + ' trenches');
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
name: 'refresh',
|
||||||
|
code: function() {
|
||||||
|
location.href = 'index.html';
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
name: 'code docs',
|
name: 'code docs',
|
||||||
code: function() {
|
code: function() {
|
||||||
|
@ -148,18 +148,12 @@ iQ.fn = iQ.prototype = {
|
|||||||
if ( ret ) {
|
if ( ret ) {
|
||||||
if ( iQ.isPlainObject( context ) ) {
|
if ( iQ.isPlainObject( context ) ) {
|
||||||
Utils.assert('does not support HTML creation with context', false);
|
Utils.assert('does not support HTML creation with context', false);
|
||||||
selector = [ document.createElement( ret[1] ) ];
|
|
||||||
/* iQ.fn.attr.call( selector, context, true ); */
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
selector = [ doc.createElement( ret[1] ) ];
|
selector = [ doc.createElement( ret[1] ) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Utils.assert('does not support complex HTML creation', false);
|
Utils.assert('does not support complex HTML creation', false);
|
||||||
/* ret = doc.createDocumentFragment([match */
|
|
||||||
ret = buildFragment( [ match[1] ], [ doc ] );
|
|
||||||
selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return iQ.merge( this, selector );
|
return iQ.merge( this, selector );
|
||||||
@ -453,14 +447,15 @@ iQ.fn = iQ.prototype = {
|
|||||||
// ----------
|
// ----------
|
||||||
// Function: data
|
// Function: data
|
||||||
data: function(key, value) {
|
data: function(key, value) {
|
||||||
|
var data = null;
|
||||||
if(value === undefined) {
|
if(value === undefined) {
|
||||||
Utils.assert('does not yet support multi-objects (or null objects)', this.length == 1);
|
Utils.assert('does not yet support multi-objects (or null objects)', this.length == 1);
|
||||||
var data = this[0].iQData;
|
data = this[0].iQData;
|
||||||
return (data ? data[key] : null);
|
return (data ? data[key] : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
||||||
var data = elem.iQData;
|
data = elem.iQData;
|
||||||
|
|
||||||
if(!data)
|
if(!data)
|
||||||
data = elem.iQData = {};
|
data = elem.iQData = {};
|
||||||
@ -625,7 +620,7 @@ iQ.fn = iQ.prototype = {
|
|||||||
// The latest versions of Firefox do not animate from a non-explicitly set
|
// The latest versions of Firefox do not animate from a non-explicitly set
|
||||||
// css properties. So for each element to be animated, go through and
|
// css properties. So for each element to be animated, go through and
|
||||||
// explicitly define 'em.
|
// explicitly define 'em.
|
||||||
rupper = /([A-Z])/g;
|
var rupper = /([A-Z])/g;
|
||||||
this.each(function(){
|
this.each(function(){
|
||||||
var cStyle = window.getComputedStyle(this, null);
|
var cStyle = window.getComputedStyle(this, null);
|
||||||
for(var prop in css){
|
for(var prop in css){
|
||||||
@ -731,9 +726,9 @@ iQ.fn = iQ.prototype = {
|
|||||||
bind: function(type, func) {
|
bind: function(type, func) {
|
||||||
Utils.assert('does not support eventData argument', iQ.isFunction(func));
|
Utils.assert('does not support eventData argument', iQ.isFunction(func));
|
||||||
|
|
||||||
var handler = function(e) {
|
var handler = function(event) {
|
||||||
try {
|
try {
|
||||||
return func.apply(this, [e]);
|
return func.apply(this, [event]);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
Utils.log(e);
|
Utils.log(e);
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,10 @@ function _isIframe(doc){
|
|||||||
// ##########
|
// ##########
|
||||||
// Class: TabCanvas
|
// Class: TabCanvas
|
||||||
// Takes care of the actual canvas for the tab thumbnail
|
// Takes care of the actual canvas for the tab thumbnail
|
||||||
var TabCanvas = function(tab, canvas){ this.init(tab, canvas) }
|
var TabCanvas = function(tab, canvas){
|
||||||
|
this.init(tab, canvas);
|
||||||
|
};
|
||||||
|
|
||||||
TabCanvas.prototype = {
|
TabCanvas.prototype = {
|
||||||
// ----------
|
// ----------
|
||||||
// Function: init
|
// Function: init
|
||||||
@ -130,7 +133,7 @@ TabCanvas.prototype = {
|
|||||||
animate: function(options, duration){
|
animate: function(options, duration){
|
||||||
Utils.assert('this routine no longer exists', false);
|
Utils.assert('this routine no longer exists', false);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// ##########
|
// ##########
|
||||||
// Class: Mirror
|
// Class: Mirror
|
||||||
@ -213,7 +216,7 @@ var TabMirror = function() {
|
|||||||
self.init();
|
self.init();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
TabMirror.prototype = {
|
TabMirror.prototype = {
|
||||||
// ----------
|
// ----------
|
||||||
@ -273,12 +276,12 @@ TabMirror.prototype = {
|
|||||||
/* Utils.log('hasMirror'); */
|
/* Utils.log('hasMirror'); */
|
||||||
var iconUrl = tab.raw.linkedBrowser.mIconURL;
|
var iconUrl = tab.raw.linkedBrowser.mIconURL;
|
||||||
if( iconUrl == null ){
|
if( iconUrl == null ){
|
||||||
iconUrl = "chrome://tabcandy/content/img/core/default.png";
|
iconUrl = "chrome://mozapps/skin/places/defaultFavicon.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
var label = tab.raw.label;
|
var label = tab.raw.label;
|
||||||
$name = iQ(mirror.nameEl);
|
var $name = iQ(mirror.nameEl);
|
||||||
$canvas = iQ(mirror.canvasEl);
|
var $canvas = iQ(mirror.canvasEl);
|
||||||
|
|
||||||
if(iconUrl != mirror.favEl.src) {
|
if(iconUrl != mirror.favEl.src) {
|
||||||
mirror.favEl.src = iconUrl;
|
mirror.favEl.src = iconUrl;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title> </title>
|
<title> </title>
|
||||||
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
|
||||||
<link rel="icon" href="chrome://tabcandy/content/img/core/tabcandy.png"/>
|
<link rel="icon" href="chrome://tabcandy/content/img/tabcandy.png"/>
|
||||||
<link rel="stylesheet" href="css/app.css" type="text/css">
|
<link rel="stylesheet" href="css/app.css" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 491 B |
Binary file not shown.
Before Width: | Height: | Size: 490 B |
Binary file not shown.
Before Width: | Height: | Size: 186 B |
@ -93,7 +93,7 @@ body {
|
|||||||
right: 6px;
|
right: 6px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url(../img/app/closetab.png) no-repeat;
|
background: url(chrome://global/skin/icons/closetab.png) no-repeat;
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ body {
|
|||||||
right: 6px;
|
right: 6px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
background: url(../img/app/expand.png) no-repeat;
|
background: url(chrome://global/skin/icons/resizer.png) no-repeat;
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ body {
|
|||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
opacity: .3;
|
opacity: .3;
|
||||||
background-image: url(../img/app/new-tab.png);
|
background-image: url(../img/new-tab.png);
|
||||||
z-index:99999;
|
z-index:99999;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ input.name{
|
|||||||
color: #999;
|
color: #999;
|
||||||
margin: 3px 0px 0px 3px;
|
margin: 3px 0px 0px 3px;
|
||||||
padding: 1px;
|
padding: 1px;
|
||||||
background-image: url(../img/app/edit-light.png);
|
background-image: url(../img/edit-light.png);
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ input.defaultName:hover{
|
|||||||
/* Resizable
|
/* Resizable
|
||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
.resizer{
|
.resizer{
|
||||||
background-image: url(../img/app/expand.png);
|
background-image: url(chrome://global/skin/icons/resizer.png);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 6px;
|
bottom: 6px;
|
||||||
right: 6px;
|
right: 6px;
|
||||||
|
Loading…
Reference in New Issue
Block a user