diff --git a/dashboard-ui/channelitems.html b/dashboard-ui/channelitems.html index 30d54ed73f..3b3da2de50 100644 --- a/dashboard-ui/channelitems.html +++ b/dashboard-ui/channelitems.html @@ -23,11 +23,6 @@
-
-
-

${MessageLoadingChannels}

-
-
diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index 9a37b1e93a..5b5a4f5c6a 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -31,11 +31,11 @@ function showLoadingMessage(page) { - $('#popupDialog', page).popup('open'); + Dashboard.showModalLoadingMsg(); } function hideLoadingMessage(page) { - $('#popupDialog', page).popup('close'); + Dashboard.hideModalLoadingMsg(); } function reloadFeatures(page) { diff --git a/dashboard-ui/scripts/editorsidebar.js b/dashboard-ui/scripts/editorsidebar.js index 0c7eb6855f..4418b9be66 100644 --- a/dashboard-ui/scripts/editorsidebar.js +++ b/dashboard-ui/scripts/editorsidebar.js @@ -486,10 +486,10 @@ var deferred = DeferredBuilder.Deferred(); require([ - 'thirdparty/jstree3.0.8/jstree.min', - 'css!thirdparty/jstree3.0.8/themes/default/style.min' + 'thirdparty/jstree3.0.8/jstree.min' ], function () { + Dashboard.importCss('thirdparty/jstree3.0.8/themes/default/style.min.css'); deferred.resolve(); }); return deferred.promise(); diff --git a/dashboard-ui/scripts/search.js b/dashboard-ui/scripts/search.js index 397bff80ec..16591f4013 100644 --- a/dashboard-ui/scripts/search.js +++ b/dashboard-ui/scripts/search.js @@ -212,6 +212,7 @@ Velocity.animate(elem, { "left": "0px" }, { complete: function () { + $('.headerSearchInput').focus(); $('.btnCloseSearch').show(); } }); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index e5a4d51cb7..4db7a38d10 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -214,6 +214,17 @@ var Dashboard = { }, importCss: function (url) { + + if (!Dashboard.importedCss) { + Dashboard.importedCss = []; + } + + if (Dashboard.importedCss.indexOf(url) != -1) { + return; + } + + Dashboard.importedCss.push(url); + if (document.createStyleSheet) { document.createStyleSheet(url); } @@ -470,7 +481,7 @@ var Dashboard = { setTimeout(function () { elem.active = false; - }, 500); + }, 300); } }, @@ -1545,10 +1556,10 @@ var Dashboard = { var deferred = DeferredBuilder.Deferred(); require([ - 'thirdparty/swipebox-master/js/jquery.swipebox.min', - 'css!thirdparty/swipebox-master/css/swipebox.min' + 'thirdparty/swipebox-master/js/jquery.swipebox.min' ], function () { + Dashboard.importCss('thirdparty/swipebox-master/css/swipebox.min.css'); deferred.resolve(); }); return deferred.promise(); @@ -1564,10 +1575,17 @@ var Dashboard = { Dashboard.initPromise.done(fn); }, - firePageEvent: function (page, name) { + firePageEvent: function (page, name, dependencies) { Dashboard.ready(function () { - $(page).trigger(name); + + if (dependencies && dependencies.length) { + require(dependencies, function () { + $(page).trigger(name); + }); + } else { + $(page).trigger(name); + } }); }, @@ -1949,11 +1967,6 @@ var AppInfo = {}; function init(deferred, capabilities, appName, deviceId, deviceName) { requirejs.config({ - map: { - '*': { - 'css': 'thirdparty/requirecss' // or whatever the path to require-css is - } - }, urlArgs: "v=" + window.dashboardVersion, paths: { @@ -2012,7 +2025,10 @@ var AppInfo = {}; } define("connectservice", ["thirdparty/apiclient/connectservice"]); - define("paperbuttonstyle", ["css!thirdparty/paper-button/paper-button-style"]); + define("paperbuttonstyle", [], function () { + Dashboard.importCss('thirdparty/paper-button/paper-button-style.css'); + return {}; + }); //requirejs(['http://viblast.com/player/free-version/qy2fdwajo1/viblast.js']); @@ -2022,7 +2038,7 @@ var AppInfo = {}; // Do these now to prevent a flash of content if (AppInfo.isNativeApp && $.browser.safari) { - require(['css!themes/ios']); + Dashboard.importCss('themes/ios.css'); } if (AppInfo.enableBottomTabs) { @@ -2129,15 +2145,8 @@ $(document).on('pagecreate', ".page", function () { var page = this; var dependencies = this.getAttribute('data-require'); - - if (dependencies) { - require(dependencies.split(','), function () { - - Dashboard.firePageEvent(page, 'pageinitdepends'); - }); - } else { - Dashboard.firePageEvent(page, 'pageinitdepends'); - } + dependencies = dependencies ? dependencies.split(',') : null; + Dashboard.firePageEvent(page, 'pageinitdepends', dependencies); //$('.localnav a, .libraryViewNav a').attr('data-transition', 'none'); @@ -2147,29 +2156,15 @@ $(document).on('pagecreate', ".page", function () { var dependencies = this.getAttribute('data-require'); Dashboard.ensurePageTitle($(page)); - - if (dependencies) { - require(dependencies.split(','), function () { - - Dashboard.firePageEvent(page, 'pagebeforeshowready'); - }); - } else { - Dashboard.firePageEvent(page, 'pagebeforeshowready'); - } + dependencies = dependencies ? dependencies.split(',') : null; + Dashboard.firePageEvent(page, 'pagebeforeshowready', dependencies); }).on('pageshow', ".page", function () { var page = this; var dependencies = this.getAttribute('data-require'); - - if (dependencies) { - require(dependencies.split(','), function () { - - Dashboard.firePageEvent(page, 'pageshowbeginready'); - }); - } else { - Dashboard.firePageEvent(page, 'pageshowbeginready'); - } + dependencies = dependencies ? dependencies.split(',') : null; + Dashboard.firePageEvent(page, 'pageshowbeginready', dependencies); }).on('pageshowbeginready', ".page", function () { diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 0e95746211..f369068af9 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -20,6 +20,8 @@ function reload(page) { + Dashboard.showLoadingMsg(); + var context = ''; if (LibraryMenu.getTopParentId()) { @@ -99,7 +101,7 @@ } $('#nextUpItems', page).html(html).lazyChildren(); - + Dashboard.hideLoadingMsg(); }); } diff --git a/dashboard-ui/scripts/tvupcoming.js b/dashboard-ui/scripts/tvupcoming.js index b4346fd0e9..f11927f5ec 100644 --- a/dashboard-ui/scripts/tvupcoming.js +++ b/dashboard-ui/scripts/tvupcoming.js @@ -16,6 +16,8 @@ }).on('pagebeforeshowready', "#tvUpcomingPage", function () { + Dashboard.showLoadingMsg(); + var page = this; var limit = AppInfo.hasLowImageBandwidth ? @@ -69,6 +71,9 @@ showDetailsMenu: true })).lazyChildren(); + + Dashboard.hideLoadingMsg(); + }); }); diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index 4c9df99e11..852bd06290 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -92,3 +92,8 @@ h1, h1 a { .visualCardBox .outerCardFooter { padding: 0; } + + +.viewMenuSearch { + background: #1c1c1c; +} diff --git a/dashboard-ui/thirdparty/requirecss.js b/dashboard-ui/thirdparty/requirecss.js deleted file mode 100644 index 2e1d1202fc..0000000000 --- a/dashboard-ui/thirdparty/requirecss.js +++ /dev/null @@ -1 +0,0 @@ -define(function(){if("undefined"==typeof window)return{load:function(e,t,n){n()}};var e=document.getElementsByTagName("head")[0],t=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,n=!1,r=!0;t[1]||t[7]?n=parseInt(t[1])<6||parseInt(t[7])<=9:t[2]||t[8]?r=!1:t[4]&&(n=parseInt(t[4])<18);var o={};o.pluginBuilder="./css-builder";var a,i,s,l=function(){a=document.createElement("style"),e.appendChild(a),i=a.styleSheet||a.sheet},u=0,d=[],c=function(e){u++,32==u&&(l(),u=0),i.addImport(e),a.onload=function(){f()}},f=function(){s();var e=d.shift();return e?(s=e[1],void c(e[0])):void(s=null)},h=function(e,t){if(i&&i.addImport||l(),i&&i.addImport)s?d.push([e,t]):(c(e),s=t);else{a.textContent='@import "'+e+'";';var n=setInterval(function(){try{a.sheet.cssRules,clearInterval(n),t()}catch(e){}},10)}},p=function(t,n){var o=document.createElement("link");if(o.type="text/css",o.rel="stylesheet",r)o.onload=function(){o.onload=function(){},setTimeout(n,7)};else var a=setInterval(function(){for(var e=0;e