mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-17 07:38:42 +00:00
add some icon preloading and improve the statusbar css classes
This commit is contained in:
parent
facb4669e3
commit
5ea7e21943
4 changed files with 19 additions and 9 deletions
|
@ -162,13 +162,17 @@ dl.singleline dd {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Statusbar */
|
/* Statusbar */
|
||||||
#deluge-statusbar .x-not-connected {
|
.x-deluge-statusbar {
|
||||||
background: url('../icons/error.png') no-repeat 2px;
|
background: no-repeat 2px !important;
|
||||||
padding-left: 20px;
|
padding-left: 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#deluge-statusbar .x-connected {
|
.x-not-connected {
|
||||||
background: transparent;
|
background-image: url('../icons/error.png') !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.x-connected {
|
||||||
|
background-image: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styles for renderered progress bars */
|
/* Styles for renderered progress bars */
|
||||||
|
|
|
@ -29,5 +29,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="background-image: url('${base}themes/default/tree/loading.gif');"></div>
|
<div style="background-image: url('${base}themes/default/tree/loading.gif');"></div>
|
||||||
|
|
||||||
|
<!-- Preload icon classes -->
|
||||||
|
<div class="ext-mb-error"></div>
|
||||||
|
<div class="icon-ok"></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -35,8 +35,8 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
config = Ext.apply({
|
||||||
id: 'deluge-statusbar',
|
id: 'deluge-statusbar',
|
||||||
defaultIconCls: 'x-not-connected',
|
defaultIconCls: 'x-deluge-statusbar x-not-connected',
|
||||||
defaultText: _('Not Connected')
|
defaultText: _('Not Connected'),
|
||||||
}, config);
|
}, config);
|
||||||
Deluge.Statusbar.superclass.constructor.call(this, config);
|
Deluge.Statusbar.superclass.constructor.call(this, config);
|
||||||
},
|
},
|
||||||
|
|
|
@ -126,7 +126,10 @@ deluge.ui = {
|
||||||
},
|
},
|
||||||
|
|
||||||
onConnectionSuccess: function(result) {
|
onConnectionSuccess: function(result) {
|
||||||
deluge.statusbar.setStatus('Connection restored');
|
deluge.statusbar.setStatus({
|
||||||
|
iconCls: 'x-deluge-statusbar icon-ok',
|
||||||
|
text: _('Connection restored')
|
||||||
|
});
|
||||||
clearInterval(this.checking);
|
clearInterval(this.checking);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
deluge.connectionManager.show();
|
deluge.connectionManager.show();
|
||||||
|
@ -143,7 +146,6 @@ deluge.ui = {
|
||||||
});
|
});
|
||||||
deluge.events.fire('disconnect');
|
deluge.events.fire('disconnect');
|
||||||
deluge.statusbar.setStatus({
|
deluge.statusbar.setStatus({
|
||||||
iconCls: 'icon-ok',
|
|
||||||
text: 'Lost connection to webserver'}
|
text: 'Lost connection to webserver'}
|
||||||
);
|
);
|
||||||
this.checking = setInterval(this.checkConnection, 2000);
|
this.checking = setInterval(this.checkConnection, 2000);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue