diff options
| -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 | 
