summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Churchill <damoxc@gmail.com>2011-10-04 20:39:59 +0100
committerDamien Churchill <damoxc@gmail.com>2011-10-05 01:36:58 +0100
commit0c3d2322ccb832bf380cf3376f04e8303e1378ab (patch)
tree7c1dcdf51a7108ec919926ab55504ab487201bbb
parent07b6db0c9887214c1f1b0e5cf1fa5b6800b2bb07 (diff)
downloaddeluge-0c3d2322ccb832bf380cf3376f04e8303e1378ab.tar.gz
deluge-0c3d2322ccb832bf380cf3376f04e8303e1378ab.tar.bz2
deluge-0c3d2322ccb832bf380cf3376f04e8303e1378ab.zip
web: add loading mask
Add a loading mask that hides the loading of the interface with some text and a nice ajax spinner. The situation can be further improved by loading all of the scripts and other resources dynamically, which will be added later.
-rw-r--r--deluge/ui/web/css/deluge.css30
-rw-r--r--deluge/ui/web/images/loading.gifbin0 -> 3208 bytes
-rw-r--r--deluge/ui/web/index.html7
-rw-r--r--deluge/ui/web/js/deluge-all/UI.js2
4 files changed, 38 insertions, 1 deletions
diff --git a/deluge/ui/web/css/deluge.css b/deluge/ui/web/css/deluge.css
index 303a0d1f7..12ad52b5e 100644
--- a/deluge/ui/web/css/deluge.css
+++ b/deluge/ui/web/css/deluge.css
@@ -11,6 +11,36 @@ input {
color: Black;
}
+#loading-mask {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 20000;
+ background-color: white;
+}
+
+#loading {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ padding: 2px;
+ z-index: 20001;
+ height: auto;
+ margin: -35px 0 0 -30px;
+}
+
+#loading .loading-indicator {
+ background: url('../images/loading.gif') no-repeat;
+ color: #555;
+ font: 24px "UbuntuBeta Regular",Ubuntu,"Bitstream Vera Sans","DejaVu Sans",Tahoma,sans-serif;
+ padding: 2px 42px;
+ margin: 0;
+ text-align: center;
+ height: auto;
+}
+
.x-deluge-main-panel {
background-image: url('../icons/deluge.png');
}
diff --git a/deluge/ui/web/images/loading.gif b/deluge/ui/web/images/loading.gif
new file mode 100644
index 000000000..3c2f7c058
--- /dev/null
+++ b/deluge/ui/web/images/loading.gif
Binary files differ
diff --git a/deluge/ui/web/index.html b/deluge/ui/web/index.html
index 3b53400be..694c5b843 100644
--- a/deluge/ui/web/index.html
+++ b/deluge/ui/web/index.html
@@ -31,7 +31,12 @@
</script>
</head>
<body>
- <div style="background-image: url('${base}resources/themes/images/default/tree/loading.gif');"></div>
+ <div id="loading-mask"></div>
+ <div id="loading">
+ <div class="loading-indicator">
+ Loading...
+ </div>
+ </div>
<!-- Preload icon classes -->
<div class="ext-mb-error"></div>
diff --git a/deluge/ui/web/js/deluge-all/UI.js b/deluge/ui/web/js/deluge-all/UI.js
index bab33294e..d7c710516 100644
--- a/deluge/ui/web/js/deluge-all/UI.js
+++ b/deluge/ui/web/js/deluge-all/UI.js
@@ -99,6 +99,8 @@ deluge.ui = {
deluge.client.on('connected', function(e) {
deluge.login.show();
+ Ext.get('loading').remove();
+ Ext.get('loading-mask').fadeOut({remove:true});
}, this, {single: true});
this.update = Ext.bind(this.update, this);