From df1cb91a84dfab124f968020ad0e004eaedc39c7 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Tue, 20 Aug 2013 22:48:25 -0700 Subject: [PATCH] Added loading to recent folder list --- UI/AddSeries/AddSeriesLayout.js | 2 +- UI/AddSeries/RootFolders/Layout.js | 6 +++++- UI/AddSeries/RootFolders/LayoutTemplate.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/UI/AddSeries/AddSeriesLayout.js b/UI/AddSeries/AddSeriesLayout.js index e5a97edc7..ca577de9b 100644 --- a/UI/AddSeries/AddSeriesLayout.js +++ b/UI/AddSeries/AddSeriesLayout.js @@ -38,7 +38,7 @@ define( SeriesCollection.fetch(); QualityProfileCollection.fetch(); - RootFolderCollection.fetch(); + RootFolderCollection.promise = RootFolderCollection.fetch(); }, onShow: function () { diff --git a/UI/AddSeries/RootFolders/Layout.js b/UI/AddSeries/RootFolders/Layout.js index f10788511..b0030f374 100644 --- a/UI/AddSeries/RootFolders/Layout.js +++ b/UI/AddSeries/RootFolders/Layout.js @@ -32,8 +32,12 @@ define( }, onRender: function () { + var self = this; + + RootFolderCollection.promise.done(function () { + self.currentDirs.show(self.rootfolderListView); + }); - this.currentDirs.show(this.rootfolderListView); this.ui.pathInput.autoComplete('/directories'); }, diff --git a/UI/AddSeries/RootFolders/LayoutTemplate.html b/UI/AddSeries/RootFolders/LayoutTemplate.html index 2a5d5f350..6b466dc0f 100644 --- a/UI/AddSeries/RootFolders/LayoutTemplate.html +++ b/UI/AddSeries/RootFolders/LayoutTemplate.html @@ -11,7 +11,7 @@ {{#if items}}

Recent Folders

{{/if}} -
+
loading ...