mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
add some icon preloading and improve the statusbar css classes
This commit is contained in:
parent
facb4669e3
commit
5ea7e21943
@ -162,13 +162,17 @@ dl.singleline dd {
|
||||
}
|
||||
|
||||
/* Statusbar */
|
||||
#deluge-statusbar .x-not-connected {
|
||||
background: url('../icons/error.png') no-repeat 2px;
|
||||
padding-left: 20px;
|
||||
.x-deluge-statusbar {
|
||||
background: no-repeat 2px !important;
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
#deluge-statusbar .x-connected {
|
||||
background: transparent;
|
||||
.x-not-connected {
|
||||
background-image: url('../icons/error.png') !important;
|
||||
}
|
||||
|
||||
.x-connected {
|
||||
background-image: transparent !important;
|
||||
}
|
||||
|
||||
/* Styles for renderered progress bars */
|
||||
|
@ -29,5 +29,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<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>
|
||||
</html>
|
||||
|
@ -35,8 +35,8 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, {
|
||||
constructor: function(config) {
|
||||
config = Ext.apply({
|
||||
id: 'deluge-statusbar',
|
||||
defaultIconCls: 'x-not-connected',
|
||||
defaultText: _('Not Connected')
|
||||
defaultIconCls: 'x-deluge-statusbar x-not-connected',
|
||||
defaultText: _('Not Connected'),
|
||||
}, config);
|
||||
Deluge.Statusbar.superclass.constructor.call(this, config);
|
||||
},
|
||||
|
@ -126,7 +126,10 @@ deluge.ui = {
|
||||
},
|
||||
|
||||
onConnectionSuccess: function(result) {
|
||||
deluge.statusbar.setStatus('Connection restored');
|
||||
deluge.statusbar.setStatus({
|
||||
iconCls: 'x-deluge-statusbar icon-ok',
|
||||
text: _('Connection restored')
|
||||
});
|
||||
clearInterval(this.checking);
|
||||
if (!result) {
|
||||
deluge.connectionManager.show();
|
||||
@ -143,7 +146,6 @@ deluge.ui = {
|
||||
});
|
||||
deluge.events.fire('disconnect');
|
||||
deluge.statusbar.setStatus({
|
||||
iconCls: 'icon-ok',
|
||||
text: 'Lost connection to webserver'}
|
||||
);
|
||||
this.checking = setInterval(this.checkConnection, 2000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user