diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index 7d9efac27..cf3862050 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -15,6 +15,14 @@
+ +
diff --git a/dashboard-ui/mypreferenceswebclient.html b/dashboard-ui/mypreferenceswebclient.html index 427d8d43b..dc2e468a9 100644 --- a/dashboard-ui/mypreferenceswebclient.html +++ b/dashboard-ui/mypreferenceswebclient.html @@ -17,7 +17,7 @@
- ${HeaderAllDevices} + ${HeaderHomePage}

@@ -57,7 +57,7 @@
- ${HeaderThisDevice} + ${HeaderSettingsForThisDevice}

    diff --git a/dashboard-ui/scripts/advancedpaths.js b/dashboard-ui/scripts/advancedpaths.js index 6eb8a8a8f..db62f9cf2 100644 --- a/dashboard-ui/scripts/advancedpaths.js +++ b/dashboard-ui/scripts/advancedpaths.js @@ -40,9 +40,9 @@ picker.close(); }, - header: "Select Server Cache Path", + header: Globalize.translate('HeaderSelectServerCachePath'), - instruction: "Browse or enter the path to use for Media Browser Server cache. The folder must be writeable. The location of this folder will directly impact server performance and should ideally be placed on a solid state drive." + instruction: Globalize.translate('HeaderSelectServerCachePathHelp') }); }); @@ -60,9 +60,9 @@ picker.close(); }, - header: "Select Transcoding Temporary Path", + header: Globalize.translate('HeaderSelectTranscodingPath'), - instruction: "Browse or enter the path to use for transcoding temporary files. The folder must be writeable." + instruction: Globalize.translate('HeaderSelectTranscodingPathHelp') }); }); @@ -80,9 +80,9 @@ picker.close(); }, - header: "Select Images By Name Path", + header: Globalize.translate('HeaderSelectImagesByNamePath'), - instruction: "Browse or enter the path to your items by name folder. The folder must be writeable." + instruction: Globalize.translate('HeaderSelectImagesByNamePathHelp') }); }); @@ -100,9 +100,9 @@ picker.close(); }, - header: "Select Metadata Path", + header: Globalize.translate('HeaderSelectMetadataPath'), - instruction: "Browse or enter the path you'd like to store metadata within. The folder must be writeable." + instruction: Globalize.translate('HeaderSelectMetadataPathHelp') }); }); diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index b739b7f62..f06468ea8 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -630,7 +630,6 @@ } if (!tasks.length) { - html += '

    No tasks are currently running.

    '; $('#runningTasksCollapsible', page).hide(); } else { $('#runningTasksCollapsible', page).show(); @@ -638,7 +637,6 @@ for (var i = 0, length = tasks.length; i < length; i++) { - var task = tasks[i]; html += '

    '; diff --git a/dashboard-ui/scripts/dlnaprofiles.js b/dashboard-ui/scripts/dlnaprofiles.js index cccad9a40..234829582 100644 --- a/dashboard-ui/scripts/dlnaprofiles.js +++ b/dashboard-ui/scripts/dlnaprofiles.js @@ -38,7 +38,7 @@ html += profile.Name; html += ''; - html += 'Delete'; + html += '' + Globalize.translate('Delete') + ''; html += ''; } @@ -82,7 +82,7 @@ function deleteProfile(page, id) { - Dashboard.confirm("Are you sure you wish to delete this profile?", "Confirm Profile Deletion", function (result) { + Dashboard.confirm(Globalize.translate('MessageConfirmProfileDeletion'), Globalize.translate('HeaderConfirmProfileDeletion'), function (result) { if (result) { diff --git a/dashboard-ui/scripts/edititemsubtitles.js b/dashboard-ui/scripts/edititemsubtitles.js index c51687876..cd9b0ce2e 100644 --- a/dashboard-ui/scripts/edititemsubtitles.js +++ b/dashboard-ui/scripts/edititemsubtitles.js @@ -128,15 +128,15 @@ itemHtml += ''; if (s.Path) { - itemHtml += 'Delete'; + itemHtml += '' + Globalize.translate('Delete') + ''; } else { - itemHtml += ''; + itemHtml += ''; } itemHtml += ''; return itemHtml; - + }).join(''); html += '

'; @@ -202,7 +202,7 @@ var provider = result.ProviderName; if (provider != lastProvider) { - html += '
  • ' + provider + 'Rating / Downloads
  • '; + html += '
  • ' + provider + '' + Globalize.translate('HeaderRatingsDownloads') + '
  • '; lastProvider = provider; } @@ -279,7 +279,7 @@ if (msg.MessageType === "LibraryChanged") { if (msg.Data.ItemsUpdated.indexOf(currentItem.Id) != -1) { - + console.log('Item updated - reloading subtitles'); reload($.mobile.activePage); } diff --git a/dashboard-ui/scripts/favorites.js b/dashboard-ui/scripts/favorites.js index 8dddd8af8..c54242f1e 100644 --- a/dashboard-ui/scripts/favorites.js +++ b/dashboard-ui/scripts/favorites.js @@ -3,10 +3,10 @@ function getSections() { return [ - { name: "Favorite Movies", types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false }, - { name: "Favorite Shows", types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false }, - { name: "Favorite Episodes", types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true }, - { name: "Favorite Games", types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true } + { name: Globalize.translate('HeaderFavoriteMovies'), types: "Movie", id: "favoriteMovies", shape: 'backdrop', preferThumb: true, showTitle: false }, + { name: Globalize.translate('HeaderFavoriteShows'), types: "Series", id: "favoriteShows", shape: 'backdrop', preferThumb: true, showTitle: false }, + { name: Globalize.translate('HeaderFavoriteEpisodes'), types: "Episode", id: "favoriteEpisode", shape: 'backdrop', preferThumb: false, showTitle: true, showParentTitle: true }, + { name: Globalize.translate('HeaderFavoriteGames'), types: "Game", id: "favoriteGames", shape: 'auto', preferThumb: false, showTitle: true } ]; } @@ -27,7 +27,7 @@ CollapseBoxSetItems: false, ExcludeLocationTypes: "Virtual" }; - + if (isSingleSection) { options.Limit = null; } @@ -55,7 +55,7 @@ var href = "favorites.html?sectionid=" + section.id; - html += 'More ...'; + html += '' + Globalize.translate('ButtonMore') + ''; html += ''; } html += ''; diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index 00919efdc..e6af81032 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -146,7 +146,7 @@ var html = '
    '; if (index) { - html += '

    My Library

    '; + html += '

    ' + Globalize.translate('HeaderMyLibrary') + '

    '; } html += '
    '; html += createMediaLinks({ @@ -185,7 +185,7 @@ var html = ''; if (result.Items.length) { - html += '

    Latest Media

    '; + html += '

    ' + Globalize.translate('HeaderLatestMedia') + '

    '; html += '
    '; html += LibraryBrowser.getPosterViewHtml({ items: result.Items, @@ -217,7 +217,7 @@ var html = ''; if (result.Items.length) { - html += '

    My Library

    '; + html += '

    ' + Globalize.translate('HeaderMyLibrary') + '

    '; html += '
    '; html += LibraryBrowser.getPosterViewHtml({ items: result.Items, @@ -258,7 +258,7 @@ var html = ''; if (result.Items.length) { - html += '

    Resume

    '; + html += '

    '+Globalize.translate('HeaderResume')+'

    '; html += '
    '; html += LibraryBrowser.getPosterViewHtml({ items: result.Items, @@ -334,7 +334,30 @@ }); } - $(document).on('pagebeforeshow', "#indexPage", function () { + function dismissWelcome(page, userId) { + + ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) { + + result.CustomPrefs.homePageWelcomeDismissed = '1'; + ApiClient.updateDisplayPreferences('home', result, userId, 'webclient').done(function() { + + $('.welcomeMessage', page).hide(); + + }); + }); + } + + $(document).on('pageinit', "#indexPage", function () { + + var page = this; + + var userId = Dashboard.getCurrentUserId(); + + $('.btnDismissWelcome', page).on('click', function () { + dismissWelcome(page, userId); + }); + + }).on('pagebeforeshow', "#indexPage", function () { var page = this; @@ -342,6 +365,12 @@ ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) { + if (result.CustomPrefs.homePageWelcomeDismissed) { + $('.welcomeMessage', page).hide(); + } else { + $('.welcomeMessage', page).show(); + } + loadSections(page, userId, result); });