diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-20 19:50:28 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-20 19:50:28 +0100 |
commit | 4ae2c2c2e34a6b9e4275c543f3c230cf2df0e89d (patch) | |
tree | 5f4403659602d855d5ad2205983472045ba63e63 /module | |
parent | updated bootstrap, fixed tooltips (diff) | |
download | pyload-4ae2c2c2e34a6b9e4275c543f3c230cf2df0e89d.tar.xz |
fixed showing files after deletion of package
Diffstat (limited to 'module')
-rw-r--r-- | module/web/static/js/views/dashboardView.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/module/web/static/js/views/dashboardView.js b/module/web/static/js/views/dashboardView.js index 9d5b62cc6..b0757fa11 100644 --- a/module/web/static/js/views/dashboardView.js +++ b/module/web/static/js/views/dashboardView.js @@ -84,15 +84,18 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', }, contentReady: function(files) { - this.files = files; - // show the files when no loading animation is running - if (!this.isLoading && this.files !== files) + // show the files when no loading animation is running and not already open + if (!this.isLoading && this.files !== files) { + this.files = files; this.show(); + } else + this.files = files; }, + // TODO: better state control of dashboard loading: function(model) { - // nothing to load when it is already open - if (model && this.files === model.get('files')) + // nothing to load when it is already open, or nothing is shown + if (!this.files || (model && this.files === model.get('files'))) return; this.isLoading = true; @@ -116,6 +119,6 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', this.files.each(_.bind(this.appendFile, this)); this.fileUL.fadeIn(); App.vent.trigger('dashboard:show', this.files); - }, + } }); });
\ No newline at end of file |