add a loading css style for when the torrent doesn't have its info yet

This commit is contained in:
Damien Churchill 2009-04-27 21:14:43 +00:00
parent 200e348f7d
commit a7a13636e6
3 changed files with 16 additions and 4 deletions

View File

@ -97,6 +97,16 @@ input {
background: url('/icons/add.png') no-repeat 2px;
}
.x-deluge-add-torrent-name {
line-height: 20px;
}
.x-deluge-add-torrent-name-loading {
padding-left: 20px;
line-height: 20px;
background: url('/themes/default/tree/loading.gif') no-repeat 2px;
}
/* Add Url Window */
.x-deluge-add-file, .x-btn .x-deluge-add-file {
background: url('/icons/add_file.png') no-repeat 2px;

View File

@ -16,5 +16,7 @@
<script type="text/javascript" src="${script}"></script>
%endfor
</head>
<body></body>
<body>
<div style="background-image: url('/themes/default/tree/loading.gif');"></div>
</body>
</html>

View File

@ -175,10 +175,10 @@ Ext.deluge.add.AddWindow = Ext.extend(Ext.deluge.add.Window, {
this.addButton(_('Add'), this.onAdd, this);
function torrentRenderer(value, p, r) {
if (r.data['infohash']) {
return String.format('<div class="x-add-torrent-name">{0}</div>', value);
if (r.data['info_hash']) {
return String.format('<div class="x-deluge-add-torrent-name">{0}</div>', value);
} else {
return String.format('<div class="x-add-torrent-name-loading">{0}</div>', value);
return String.format('<div class="x-deluge-add-torrent-name-loading">{0}</div>', value);
}
}