mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Deminify part 2 (#509)
This de-minifies and de-uglifies `controllers` subdirectory
This commit is contained in:
parent
f98a43f06f
commit
23677db990
66 changed files with 8296 additions and 4227 deletions
|
@ -1,17 +1,31 @@
|
|||
define(["loading", "scripts/editorsidebar"], function(loading) {
|
||||
define(["loading", "scripts/editorsidebar"], function (loading) {
|
||||
"use strict";
|
||||
|
||||
function reload(context, itemId) {
|
||||
loading.show(), itemId ? require(["metadataEditor"], function(metadataEditor) {
|
||||
metadataEditor.embed(context.querySelector(".editPageInnerContent"), itemId, ApiClient.serverInfo().Id)
|
||||
}) : (context.querySelector(".editPageInnerContent").innerHTML = "", loading.hide())
|
||||
loading.show();
|
||||
|
||||
if (itemId) {
|
||||
require(["metadataEditor"], function (metadataEditor) {
|
||||
metadataEditor.embed(context.querySelector(".editPageInnerContent"), itemId, ApiClient.serverInfo().Id);
|
||||
});
|
||||
} else {
|
||||
context.querySelector(".editPageInnerContent").innerHTML = "";
|
||||
loading.hide();
|
||||
}
|
||||
}
|
||||
return function(view, params) {
|
||||
view.addEventListener("viewshow", function() {
|
||||
reload(this, MetadataEditor.getCurrentItemId())
|
||||
}), MetadataEditor.setCurrentItemId(null), view.querySelector(".libraryTree").addEventListener("itemclicked", function(event) {
|
||||
|
||||
return function (view, params) {
|
||||
view.addEventListener("viewshow", function () {
|
||||
reload(this, MetadataEditor.getCurrentItemId());
|
||||
});
|
||||
MetadataEditor.setCurrentItemId(null);
|
||||
view.querySelector(".libraryTree").addEventListener("itemclicked", function (event) {
|
||||
var data = event.detail;
|
||||
data.id != MetadataEditor.getCurrentItemId() && (MetadataEditor.setCurrentItemId(data.id), reload(view, data.id))
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
if (data.id != MetadataEditor.getCurrentItemId()) {
|
||||
MetadataEditor.setCurrentItemId(data.id);
|
||||
reload(view, data.id);
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue