From 2dba35a875af281cc072695cd75b2187ff8105ee Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 17 Jun 2016 20:52:04 -0400 Subject: [PATCH] fix artist total record count --- dashboard-ui/forgotpassword.html | 2 +- dashboard-ui/forgotpasswordpin.html | 2 +- dashboard-ui/scripts/forgotpassword.js | 40 ++++++++++------------- dashboard-ui/scripts/forgotpasswordpin.js | 40 ++++++++++------------- dashboard-ui/scripts/moviegenres.js | 4 +-- dashboard-ui/scripts/movietrailers.js | 3 +- dashboard-ui/scripts/site.js | 12 ++++--- dashboard-ui/scripts/tvgenres.js | 4 +-- 8 files changed, 49 insertions(+), 58 deletions(-) diff --git a/dashboard-ui/forgotpassword.html b/dashboard-ui/forgotpassword.html index ac3e983824..4fc03ac7d3 100644 --- a/dashboard-ui/forgotpassword.html +++ b/dashboard-ui/forgotpassword.html @@ -1,4 +1,4 @@ -
+
diff --git a/dashboard-ui/forgotpasswordpin.html b/dashboard-ui/forgotpasswordpin.html index de5372f64b..80c0c21bb5 100644 --- a/dashboard-ui/forgotpasswordpin.html +++ b/dashboard-ui/forgotpasswordpin.html @@ -1,4 +1,4 @@ -
+
diff --git a/dashboard-ui/scripts/forgotpassword.js b/dashboard-ui/scripts/forgotpassword.js index b61ad9e504..1431421d51 100644 --- a/dashboard-ui/scripts/forgotpassword.js +++ b/dashboard-ui/scripts/forgotpassword.js @@ -1,6 +1,6 @@ -define(['jQuery'], function ($) { +define([], function () { - function processForgotPasswordResult(page, result) { + function processForgotPasswordResult(result) { if (result.Action == 'ContactAdmin') { @@ -40,32 +40,26 @@ } } - function onSubmit() { + return function (view, params) { - var page = $(this).parents('.page'); + function onSubmit(e) { - ApiClient.ajax({ + ApiClient.ajax({ - type: 'POST', - url: ApiClient.getUrl('Users/ForgotPassword'), - dataType: 'json', - data: { - EnteredUsername: $('#txtName', page).val() - } + type: 'POST', + url: ApiClient.getUrl('Users/ForgotPassword'), + dataType: 'json', + data: { + EnteredUsername: view.querySelector('#txtName').value + } - }).then(function (result) { + }).then(processForgotPasswordResult); - processForgotPasswordResult(page, result); - }); + e.preventDefault(); + return false; + } - return false; - } - - - $(document).on('pageinit', '#forgotPasswordPage', function () { - - var page = this; - $('.forgotPasswordForm', page).off('submit', onSubmit).on('submit', onSubmit); - }); + view.querySelector('form').addEventListener('submit', onSubmit); + }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/forgotpasswordpin.js b/dashboard-ui/scripts/forgotpasswordpin.js index b2f35d0655..836a06da9b 100644 --- a/dashboard-ui/scripts/forgotpasswordpin.js +++ b/dashboard-ui/scripts/forgotpasswordpin.js @@ -1,6 +1,6 @@ -define(['jQuery'], function ($) { +define([], function () { - function processForgotPasswordResult(page, result) { + function processForgotPasswordResult(result) { if (result.Success) { @@ -31,31 +31,25 @@ return; } - function onSubmit() { + return function (view, params) { - var page = $(this).parents('.page'); + function onSubmit(e) { - ApiClient.ajax({ + ApiClient.ajax({ - type: 'POST', - url: ApiClient.getUrl('Users/ForgotPassword/Pin'), - dataType: 'json', - data: { - Pin: $('#txtPin', page).val() - } + type: 'POST', + url: ApiClient.getUrl('Users/ForgotPassword/Pin'), + dataType: 'json', + data: { + Pin: view.querySelector('#txtPin').value + } - }).then(function (result) { + }).then(processForgotPasswordResult); - processForgotPasswordResult(page, result); - }); - return false; - } - - $(document).on('pageinit', '.forgotPasswordPinPage', function () { - - var page = this; - - $('form', page).off('submit', onSubmit).on('submit', onSubmit); - }); + e.preventDefault(); + return false; + } + view.querySelector('form').addEventListener('submit', onSubmit); + }; }); \ No newline at end of file diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js index 727c1300a1..6e1038e832 100644 --- a/dashboard-ui/scripts/moviegenres.js +++ b/dashboard-ui/scripts/moviegenres.js @@ -58,7 +58,7 @@ showItemCounts: true, centerText: true, lazy: true, - overlayPlayButton: true + overlayMoreButton: true }); } else if (viewStyle == "ThumbCard") { @@ -93,7 +93,7 @@ centerText: true, showItemCounts: true, lazy: true, - overlayPlayButton: true + overlayMoreButton: true }); } diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index 2e88ce1a33..dae762315b 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -184,7 +184,8 @@ require(['components/filterdialog/filterdialog'], function (filterDialogFactory) { var filterDialog = new filterDialogFactory({ - query: getQuery(tabContent) + query: getQuery(tabContent), + mode: 'movies' }); Events.on(filterDialog, 'filterchange', function () { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 8387e920b5..857376ca81 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -621,7 +621,7 @@ var Dashboard = { headerHtml += ''; headerHtml += '
'; - $(page).prepend(headerHtml); + page.insertAdjacentHTML('afterbegin', headerHtml); } }, @@ -2528,15 +2528,17 @@ var AppInfo = {}; defineRoute({ path: '/forgotpassword.html', - dependencies: [], - anonymous: true + dependencies: ['emby-input', 'emby-button'], + anonymous: true, + controller: 'scripts/forgotpassword' }); defineRoute({ path: '/forgotpasswordpin.html', - dependencies: [], + dependencies: ['emby-input', 'emby-button'], autoFocus: false, - anonymous: true + anonymous: true, + controller: 'scripts/forgotpasswordpin' }); defineRoute({ diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 396adf9e71..1b1bc48f2b 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -58,7 +58,7 @@ showItemCounts: true, centerText: true, lazy: true, - overlayPlayButton: true + overlayMoreButton: true }); } else if (viewStyle == "ThumbCard") { @@ -93,7 +93,7 @@ centerText: true, showItemCounts: true, lazy: true, - overlayPlayButton: true + overlayMoreButton: true }); }