mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update loading spinner
This commit is contained in:
parent
10d2fbe3b3
commit
4565ac78ab
10 changed files with 54 additions and 56 deletions
|
@ -23,11 +23,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
<div id="items" class="itemsContainer paddedItemsContainer" style="text-align:center;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div data-role="popup" id="popupDialog" data-overlay-theme="b" data-theme="b" data-dismissible="false" style="max-width: 250px;" data-history="false">
|
|
||||||
<div style="padding: .5em 1.5em;">
|
|
||||||
<p style="color: #eee;">${MessageLoadingChannels}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
<div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">
|
||||||
<form>
|
<form>
|
||||||
|
|
|
@ -31,11 +31,11 @@
|
||||||
|
|
||||||
function showLoadingMessage(page) {
|
function showLoadingMessage(page) {
|
||||||
|
|
||||||
$('#popupDialog', page).popup('open');
|
Dashboard.showModalLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideLoadingMessage(page) {
|
function hideLoadingMessage(page) {
|
||||||
$('#popupDialog', page).popup('close');
|
Dashboard.hideModalLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
function reloadFeatures(page) {
|
function reloadFeatures(page) {
|
||||||
|
|
|
@ -486,10 +486,10 @@
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
require([
|
require([
|
||||||
'thirdparty/jstree3.0.8/jstree.min',
|
'thirdparty/jstree3.0.8/jstree.min'
|
||||||
'css!thirdparty/jstree3.0.8/themes/default/style.min'
|
|
||||||
], function () {
|
], function () {
|
||||||
|
|
||||||
|
Dashboard.importCss('thirdparty/jstree3.0.8/themes/default/style.min.css');
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
});
|
});
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
|
|
|
@ -212,6 +212,7 @@
|
||||||
Velocity.animate(elem, { "left": "0px" },
|
Velocity.animate(elem, { "left": "0px" },
|
||||||
{
|
{
|
||||||
complete: function () {
|
complete: function () {
|
||||||
|
$('.headerSearchInput').focus();
|
||||||
$('.btnCloseSearch').show();
|
$('.btnCloseSearch').show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -214,6 +214,17 @@ var Dashboard = {
|
||||||
},
|
},
|
||||||
|
|
||||||
importCss: function (url) {
|
importCss: function (url) {
|
||||||
|
|
||||||
|
if (!Dashboard.importedCss) {
|
||||||
|
Dashboard.importedCss = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Dashboard.importedCss.indexOf(url) != -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Dashboard.importedCss.push(url);
|
||||||
|
|
||||||
if (document.createStyleSheet) {
|
if (document.createStyleSheet) {
|
||||||
document.createStyleSheet(url);
|
document.createStyleSheet(url);
|
||||||
}
|
}
|
||||||
|
@ -470,7 +481,7 @@ var Dashboard = {
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
elem.active = false;
|
elem.active = false;
|
||||||
}, 500);
|
}, 300);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1545,10 +1556,10 @@ var Dashboard = {
|
||||||
var deferred = DeferredBuilder.Deferred();
|
var deferred = DeferredBuilder.Deferred();
|
||||||
|
|
||||||
require([
|
require([
|
||||||
'thirdparty/swipebox-master/js/jquery.swipebox.min',
|
'thirdparty/swipebox-master/js/jquery.swipebox.min'
|
||||||
'css!thirdparty/swipebox-master/css/swipebox.min'
|
|
||||||
], function () {
|
], function () {
|
||||||
|
|
||||||
|
Dashboard.importCss('thirdparty/swipebox-master/css/swipebox.min.css');
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
});
|
});
|
||||||
return deferred.promise();
|
return deferred.promise();
|
||||||
|
@ -1564,10 +1575,17 @@ var Dashboard = {
|
||||||
Dashboard.initPromise.done(fn);
|
Dashboard.initPromise.done(fn);
|
||||||
},
|
},
|
||||||
|
|
||||||
firePageEvent: function (page, name) {
|
firePageEvent: function (page, name, dependencies) {
|
||||||
|
|
||||||
Dashboard.ready(function () {
|
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) {
|
function init(deferred, capabilities, appName, deviceId, deviceName) {
|
||||||
|
|
||||||
requirejs.config({
|
requirejs.config({
|
||||||
map: {
|
|
||||||
'*': {
|
|
||||||
'css': 'thirdparty/requirecss' // or whatever the path to require-css is
|
|
||||||
}
|
|
||||||
},
|
|
||||||
urlArgs: "v=" + window.dashboardVersion,
|
urlArgs: "v=" + window.dashboardVersion,
|
||||||
|
|
||||||
paths: {
|
paths: {
|
||||||
|
@ -2012,7 +2025,10 @@ var AppInfo = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
define("connectservice", ["thirdparty/apiclient/connectservice"]);
|
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']);
|
//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
|
// Do these now to prevent a flash of content
|
||||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||||
require(['css!themes/ios']);
|
Dashboard.importCss('themes/ios.css');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppInfo.enableBottomTabs) {
|
if (AppInfo.enableBottomTabs) {
|
||||||
|
@ -2129,15 +2145,8 @@ $(document).on('pagecreate', ".page", function () {
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
var dependencies = this.getAttribute('data-require');
|
var dependencies = this.getAttribute('data-require');
|
||||||
|
dependencies = dependencies ? dependencies.split(',') : null;
|
||||||
if (dependencies) {
|
Dashboard.firePageEvent(page, 'pageinitdepends', dependencies);
|
||||||
require(dependencies.split(','), function () {
|
|
||||||
|
|
||||||
Dashboard.firePageEvent(page, 'pageinitdepends');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Dashboard.firePageEvent(page, 'pageinitdepends');
|
|
||||||
}
|
|
||||||
|
|
||||||
//$('.localnav a, .libraryViewNav a').attr('data-transition', 'none');
|
//$('.localnav a, .libraryViewNav a').attr('data-transition', 'none');
|
||||||
|
|
||||||
|
@ -2147,29 +2156,15 @@ $(document).on('pagecreate', ".page", function () {
|
||||||
var dependencies = this.getAttribute('data-require');
|
var dependencies = this.getAttribute('data-require');
|
||||||
|
|
||||||
Dashboard.ensurePageTitle($(page));
|
Dashboard.ensurePageTitle($(page));
|
||||||
|
dependencies = dependencies ? dependencies.split(',') : null;
|
||||||
if (dependencies) {
|
Dashboard.firePageEvent(page, 'pagebeforeshowready', dependencies);
|
||||||
require(dependencies.split(','), function () {
|
|
||||||
|
|
||||||
Dashboard.firePageEvent(page, 'pagebeforeshowready');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Dashboard.firePageEvent(page, 'pagebeforeshowready');
|
|
||||||
}
|
|
||||||
|
|
||||||
}).on('pageshow', ".page", function () {
|
}).on('pageshow', ".page", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
var dependencies = this.getAttribute('data-require');
|
var dependencies = this.getAttribute('data-require');
|
||||||
|
dependencies = dependencies ? dependencies.split(',') : null;
|
||||||
if (dependencies) {
|
Dashboard.firePageEvent(page, 'pageshowbeginready', dependencies);
|
||||||
require(dependencies.split(','), function () {
|
|
||||||
|
|
||||||
Dashboard.firePageEvent(page, 'pageshowbeginready');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Dashboard.firePageEvent(page, 'pageshowbeginready');
|
|
||||||
}
|
|
||||||
|
|
||||||
}).on('pageshowbeginready', ".page", function () {
|
}).on('pageshowbeginready', ".page", function () {
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
function reload(page) {
|
function reload(page) {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
var context = '';
|
var context = '';
|
||||||
|
|
||||||
if (LibraryMenu.getTopParentId()) {
|
if (LibraryMenu.getTopParentId()) {
|
||||||
|
@ -99,7 +101,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#nextUpItems', page).html(html).lazyChildren();
|
$('#nextUpItems', page).html(html).lazyChildren();
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
}).on('pagebeforeshowready', "#tvUpcomingPage", function () {
|
}).on('pagebeforeshowready', "#tvUpcomingPage", function () {
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
var limit = AppInfo.hasLowImageBandwidth ?
|
var limit = AppInfo.hasLowImageBandwidth ?
|
||||||
|
@ -69,6 +71,9 @@
|
||||||
showDetailsMenu: true
|
showDetailsMenu: true
|
||||||
|
|
||||||
})).lazyChildren();
|
})).lazyChildren();
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -92,3 +92,8 @@ h1, h1 a {
|
||||||
.visualCardBox .outerCardFooter {
|
.visualCardBox .outerCardFooter {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.viewMenuSearch {
|
||||||
|
background: #1c1c1c;
|
||||||
|
}
|
||||||
|
|
1
dashboard-ui/thirdparty/requirecss.js
vendored
1
dashboard-ui/thirdparty/requirecss.js
vendored
|
@ -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<document.styleSheets.length;e++){var t=document.styleSheets[e];if(t.href==o.href)return clearInterval(a),n()}},10);o.href=t,e.appendChild(o)};return o.normalize=function(e,t){return".css"==e.substr(e.length-4,4)&&(e=e.substr(0,e.length-4)),t(e)},o.load=function(e,t,r){(n?h:p)(t.toUrl(e+".css"),r)},o});
|
|
|
@ -450,12 +450,8 @@
|
||||||
|
|
||||||
destroyCurrentRecognition();
|
destroyCurrentRecognition();
|
||||||
|
|
||||||
require([
|
Dashboard.importCss('voice/voice.css');
|
||||||
'css!voice/voice'
|
startListeningInternal();
|
||||||
], function () {
|
|
||||||
|
|
||||||
startListeningInternal();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function startListeningInternal() {
|
function startListeningInternal() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue