Merge pull request #435 from grafixeyehero/deletehelper

Change primary highlight for delete confirmation dialog
This commit is contained in:
Joshua M. Boniface 2019-09-19 11:27:08 -04:00 committed by GitHub
commit ff68a0d550
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 161 additions and 74 deletions

View file

@ -18,13 +18,13 @@ define(['dialog', 'globalize'], function (dialog, globalize) {
items.push({ items.push({
name: options.cancelText || globalize.translate('ButtonCancel'), name: options.cancelText || globalize.translate('ButtonCancel'),
id: 'cancel', id: 'cancel',
type: options.primary === 'cancel' ? 'submit' : 'cancel' type: 'cancel'
}); });
items.push({ items.push({
name: options.confirmText || globalize.translate('ButtonOk'), name: options.confirmText || globalize.translate('ButtonOk'),
id: 'ok', id: 'ok',
type: options.primary === 'cancel' ? 'cancel' : 'submit' type: options.primary === 'delete' ? 'delete' : 'submit'
}); });
options.buttons = items; options.buttons = items;

View file

@ -27,7 +27,7 @@ define(['connectionManager', 'confirm', 'appRouter', 'globalize'], function (con
title: title, title: title,
text: msg, text: msg,
confirmText: globalize.translate('Delete'), confirmText: globalize.translate('Delete'),
primary: 'cancel' primary: 'delete'
}).then(function () { }).then(function () {

View file

@ -203,7 +203,7 @@ define(['dialogHelper', 'connectionManager', 'loading', 'dom', 'layoutManager',
text: globalize.translate('ConfirmDeleteImage'), text: globalize.translate('ConfirmDeleteImage'),
confirmText: globalize.translate('Delete'), confirmText: globalize.translate('Delete'),
primary: 'cancel' primary: 'delete'
}).then(afterConfirm); }).then(afterConfirm);
}); });

View file

@ -59,7 +59,7 @@ define(["loading", "dialogHelper", "dom", "components/libraryoptionseditor/libra
title: Globalize.translate("HeaderRemoveMediaLocation"), title: Globalize.translate("HeaderRemoveMediaLocation"),
text: Globalize.translate("MessageConfirmRemoveMediaLocation"), text: Globalize.translate("MessageConfirmRemoveMediaLocation"),
confirmText: Globalize.translate("ButtonDelete"), confirmText: Globalize.translate("ButtonDelete"),
primary: "cancel" primary: "delete"
}).then(function() { }).then(function() {
var refreshAfterChange = currentOptions.refresh; var refreshAfterChange = currentOptions.refresh;
ApiClient.removeMediaPath(virtualFolder.Name, location, refreshAfterChange).then(function() { ApiClient.removeMediaPath(virtualFolder.Name, location, refreshAfterChange).then(function() {

View file

@ -37,7 +37,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
confirm({ confirm({
text: globalize.translate('MessageConfirmRecordingCancellation'), text: globalize.translate('MessageConfirmRecordingCancellation'),
primary: 'cancel', primary: 'delete',
confirmText: globalize.translate('HeaderCancelRecording'), confirmText: globalize.translate('HeaderCancelRecording'),
cancelText: globalize.translate('HeaderKeepRecording') cancelText: globalize.translate('HeaderKeepRecording')
@ -62,7 +62,7 @@ define(['globalize', 'loading', 'connectionManager'], function (globalize, loadi
confirm({ confirm({
text: globalize.translate('MessageConfirmRecordingCancellation'), text: globalize.translate('MessageConfirmRecordingCancellation'),
primary: 'cancel', primary: 'delete',
confirmText: globalize.translate('HeaderCancelSeries'), confirmText: globalize.translate('HeaderCancelSeries'),
cancelText: globalize.translate('HeaderKeepSeries') cancelText: globalize.translate('HeaderKeepSeries')

View file

@ -74,7 +74,7 @@ define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'userSettings',
title: globalize.translate('ConfirmDeletion'), title: globalize.translate('ConfirmDeletion'),
text: msg, text: msg,
confirmText: globalize.translate('Delete'), confirmText: globalize.translate('Delete'),
primary: 'cancel' primary: 'delete'
}).then(function () { }).then(function () {

View file

@ -101,6 +101,11 @@ html {
background: #0cb0e8 background: #0cb0e8
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -88,6 +88,11 @@ html {
color: #fff color: #fff
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -69,6 +69,11 @@ html {
color: #fff color: #fff
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -69,6 +69,11 @@ html {
color: #fff color: #fff
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -84,6 +84,11 @@ html {
background: #0cb0e8 background: #0cb0e8
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -143,6 +143,11 @@ a[data-role=button] {
background: #ff77f1 background: #ff77f1
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
#btnResetPassword, #btnResetPassword,
.btnForgotPassword, .btnForgotPassword,
.btnCancel, .btnCancel,

View file

@ -94,6 +94,11 @@ html {
color: #fff color: #fff
} }
.button-delete {
background: rgb(247, 0, 0);
color: rgba(255, 255, 255, .87)
}
.checkboxLabel { .checkboxLabel {
color: inherit color: inherit
} }

View file

@ -697,7 +697,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
title: globalize.translate("HeaderRestart"), title: globalize.translate("HeaderRestart"),
text: globalize.translate("MessageConfirmRestart"), text: globalize.translate("MessageConfirmRestart"),
confirmText: globalize.translate("ButtonRestart"), confirmText: globalize.translate("ButtonRestart"),
primary: "cancel" primary: "delete"
}).then(function () { }).then(function () {
var page = dom.parentWithClass(btn, "page"); var page = dom.parentWithClass(btn, "page");
buttonEnabled(page.querySelector("#btnRestartServer"), false); buttonEnabled(page.querySelector("#btnRestartServer"), false);
@ -712,7 +712,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
title: globalize.translate("HeaderShutdown"), title: globalize.translate("HeaderShutdown"),
text: globalize.translate("MessageConfirmShutdown"), text: globalize.translate("MessageConfirmShutdown"),
confirmText: globalize.translate("ButtonShutdown"), confirmText: globalize.translate("ButtonShutdown"),
primary: "cancel" primary: "delete"
}).then(function () { }).then(function () {
var page = dom.parentWithClass(btn, "page"); var page = dom.parentWithClass(btn, "page");
buttonEnabled(page.querySelector("#btnRestartServer"), false); buttonEnabled(page.querySelector("#btnRestartServer"), false);

View file

@ -12,7 +12,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu
text: msg, text: msg,
title: globalize.translate("HeaderDeleteDevice"), title: globalize.translate("HeaderDeleteDevice"),
confirmText: globalize.translate("ButtonDelete"), confirmText: globalize.translate("ButtonDelete"),
primary: "cancel" primary: "delete"
}).then(function() { }).then(function() {
loading.show(), ApiClient.ajax({ loading.show(), ApiClient.ajax({
type: "DELETE", type: "DELETE",

View file

@ -7,7 +7,7 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-button"
confirm({ confirm({
title: globalize.translate("UninstallPluginHeader"), title: globalize.translate("UninstallPluginHeader"),
text: msg, text: msg,
primary: "cancel", primary: "delete",
confirmText: globalize.translate("UninstallPluginHeader") confirmText: globalize.translate("UninstallPluginHeader")
}).then(function() { }).then(function() {
loading.show(); loading.show();

View file

@ -1,48 +1,61 @@
define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "globalize", "dom", "indicators", "scripts/imagehelper", "cardStyle", "emby-itemrefreshindicator"], function($, appHost, taskButton, loading, libraryMenu, globalize, dom, indicators, imageHelper) { define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "globalize", "dom", "indicators", "scripts/imagehelper", "cardStyle", "emby-itemrefreshindicator"], function ($, appHost, taskButton, loading, libraryMenu, globalize, dom, indicators, imageHelper) {
"use strict"; "use strict";
function addVirtualFolder(page) { function addVirtualFolder(page) {
require(["medialibrarycreator"], function(medialibrarycreator) { require(["medialibrarycreator"], function (medialibrarycreator) {
(new medialibrarycreator).show({ new medialibrarycreator().show({
collectionTypeOptions: getCollectionTypeOptions().filter(function(f) { collectionTypeOptions: getCollectionTypeOptions().filter(function (f) {
return !f.hidden; return !f.hidden;
}), }),
refresh: shouldRefreshLibraryAfterChanges(page) refresh: shouldRefreshLibraryAfterChanges(page)
}).then(function(hasChanges) { }).then(function (hasChanges) {
hasChanges && reloadLibrary(page); if (hasChanges) {
}) reloadLibrary(page);
}) }
});
});
} }
function editVirtualFolder(page, virtualFolder) { function editVirtualFolder(page, virtualFolder) {
require(["medialibraryeditor"], function(medialibraryeditor) { require(["medialibraryeditor"], function (medialibraryeditor) {
(new medialibraryeditor).show({ new medialibraryeditor().show({
refresh: shouldRefreshLibraryAfterChanges(page), refresh: shouldRefreshLibraryAfterChanges(page),
library: virtualFolder library: virtualFolder
}).then(function(hasChanges) { }).then(function (hasChanges) {
hasChanges && reloadLibrary(page); if (hasChanges) {
}) reloadLibrary(page);
}) }
});
});
} }
function deleteVirtualFolder(page, virtualFolder) { function deleteVirtualFolder(page, virtualFolder) {
var msg = globalize.translate("MessageAreYouSureYouWishToRemoveMediaFolder"); var msg = globalize.translate("MessageAreYouSureYouWishToRemoveMediaFolder");
if (virtualFolder.Locations.length) { if (virtualFolder.Locations.length) {
msg += "<br/><br/>" + globalize.translate("MessageTheFollowingLocationWillBeRemovedFromLibrary") + "<br/><br/>"; msg += "<br/><br/>" + globalize.translate("MessageTheFollowingLocationWillBeRemovedFromLibrary") + "<br/><br/>";
msg += virtualFolder.Locations.join("<br/>"); msg += virtualFolder.Locations.join("<br/>");
} }
require(["confirm"], function(confirm) {
confirm(msg, globalize.translate("HeaderRemoveMediaFolder")).then(function() { require(["confirm"], function (confirm) {
confirm({
text: msg,
title: globalize.translate('HeaderRemoveMediaFolder'),
confirmText: globalize.translate('Delete'),
primary: 'delete'
}).then(function () {
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function() { ApiClient.removeVirtualFolder(virtualFolder.Name, refreshAfterChange).then(function () {
reloadLibrary(page); reloadLibrary(page);
}) });
}) });
}) });
} }
function refreshVirtualFolder(page, virtualFolder) { function refreshVirtualFolder(page, virtualFolder) {
require(["refreshDialog"], function(refreshDialog) { require(["refreshDialog"], function (refreshDialog) {
new refreshDialog({ new refreshDialog({
itemIds: [virtualFolder.ItemId], itemIds: [virtualFolder.ItemId],
serverId: ApiClient.serverId(), serverId: ApiClient.serverId(),
@ -52,14 +65,14 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
} }
function renameVirtualFolder(page, virtualFolder) { function renameVirtualFolder(page, virtualFolder) {
require(["prompt"], function(prompt) { require(["prompt"], function (prompt) {
prompt({ prompt({
label: globalize.translate("LabelNewName"), label: globalize.translate("LabelNewName"),
confirmText: globalize.translate("ButtonRename") confirmText: globalize.translate("ButtonRename")
}).then(function(newName) { }).then(function (newName) {
if (newName && newName != virtualFolder.Name) { if (newName && newName != virtualFolder.Name) {
var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); var refreshAfterChange = shouldRefreshLibraryAfterChanges(page);
ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function() { ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function () {
reloadLibrary(page); reloadLibrary(page);
}); });
} }
@ -97,24 +110,29 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
id: "refresh", id: "refresh",
ironIcon: "refresh" ironIcon: "refresh"
}); });
require(["actionsheet"], function(actionsheet) {
require(["actionsheet"], function (actionsheet) {
actionsheet.show({ actionsheet.show({
items: menuItems, items: menuItems,
positionTo: elem, positionTo: elem,
callback: function(resultId) { callback: function (resultId) {
switch (resultId) { switch (resultId) {
case "edit": case "edit":
editVirtualFolder(page, virtualFolder); editVirtualFolder(page, virtualFolder);
break; break;
case "editimages": case "editimages":
editImages(page, virtualFolder); editImages(page, virtualFolder);
break; break;
case "rename": case "rename":
renameVirtualFolder(page, virtualFolder); renameVirtualFolder(page, virtualFolder);
break; break;
case "delete": case "delete":
deleteVirtualFolder(page, virtualFolder); deleteVirtualFolder(page, virtualFolder);
break; break;
case "refresh": case "refresh":
refreshVirtualFolder(page, virtualFolder); refreshVirtualFolder(page, virtualFolder);
} }
@ -125,7 +143,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
function reloadLibrary(page) { function reloadLibrary(page) {
loading.show(); loading.show();
ApiClient.getVirtualFolders().then(function(result) { ApiClient.getVirtualFolders().then(function (result) {
reloadVirtualFolders(page, result); reloadVirtualFolders(page, result);
}); });
} }
@ -148,36 +166,40 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
for (var i = 0; i < virtualFolders.length; i++) { for (var i = 0; i < virtualFolders.length; i++) {
var virtualFolder = virtualFolders[i]; var virtualFolder = virtualFolders[i];
html += getVirtualFolderHtml(page, virtualFolder, i) html += getVirtualFolderHtml(page, virtualFolder, i);
} }
var divVirtualFolders = page.querySelector("#divVirtualFolders"); var divVirtualFolders = page.querySelector("#divVirtualFolders");
divVirtualFolders.innerHTML = html; divVirtualFolders.innerHTML = html;
divVirtualFolders.classList.add("itemsContainer"); divVirtualFolders.classList.add("itemsContainer");
divVirtualFolders.classList.add("vertical-wrap"); divVirtualFolders.classList.add("vertical-wrap");
$(".btnCardMenu", divVirtualFolders).on("click", function() { $(".btnCardMenu", divVirtualFolders).on("click", function () {
showCardMenu(page, this, virtualFolders); showCardMenu(page, this, virtualFolders);
}); });
divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function() { divVirtualFolders.querySelector(".addLibrary").addEventListener("click", function () {
addVirtualFolder(page); addVirtualFolder(page);
}); });
$(".editLibrary", divVirtualFolders).on("click", function() { $(".editLibrary", divVirtualFolders).on("click", function () {
var card = $(this).parents(".card")[0]; var card = $(this).parents(".card")[0];
var index = parseInt(card.getAttribute("data-index")); var index = parseInt(card.getAttribute("data-index"));
var virtualFolder = virtualFolders[index]; var virtualFolder = virtualFolders[index];
virtualFolder.ItemId && editVirtualFolder(page, virtualFolder);
if (virtualFolder.ItemId) {
editVirtualFolder(page, virtualFolder);
}
}); });
loading.hide(); loading.hide();
} }
function editImages(page, virtualFolder) { function editImages(page, virtualFolder) {
require(["imageEditor"], function(imageEditor) { require(["imageEditor"], function (imageEditor) {
imageEditor.show({ imageEditor.show({
itemId: virtualFolder.ItemId, itemId: virtualFolder.ItemId,
serverId: ApiClient.serverId() serverId: ApiClient.serverId()
}).then(function() { }).then(function () {
reloadLibrary(page); reloadLibrary(page);
}); });
}) });
} }
function getLink(text, url) { function getLink(text, url) {
@ -214,25 +236,32 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
name: globalize.translate("FolderTypeUnset"), name: globalize.translate("FolderTypeUnset"),
value: "mixed", value: "mixed",
message: globalize.translate("MessageUnsetContentHelp") message: globalize.translate("MessageUnsetContentHelp")
}] }];
} }
function getVirtualFolderHtml(page, virtualFolder, index) { function getVirtualFolderHtml(page, virtualFolder, index) {
var html = ""; var html = "";
var style = ""; var style = "";
page.classList.contains("wizardPage") && (style += "min-width:33.3%;");
if (page.classList.contains("wizardPage")) {
style += "min-width:33.3%;";
}
html += '<div class="card backdropCard scalableCard backdropCard-scalable" style="' + style + '" data-index="' + index + '" data-id="' + virtualFolder.ItemId + '">'; html += '<div class="card backdropCard scalableCard backdropCard-scalable" style="' + style + '" data-index="' + index + '" data-id="' + virtualFolder.ItemId + '">';
html += '<div class="cardBox visualCardBox">'; html += '<div class="cardBox visualCardBox">';
html += '<div class="cardScalable visualCardBox-cardScalable">'; html += '<div class="cardScalable visualCardBox-cardScalable">';
html += '<div class="cardPadder cardPadder-backdrop"></div>'; html += '<div class="cardPadder cardPadder-backdrop"></div>';
html += '<div class="cardContent">'; html += '<div class="cardContent">';
var imgUrl = ""; var imgUrl = "";
if (virtualFolder.PrimaryImageItemId) { if (virtualFolder.PrimaryImageItemId) {
imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, { imgUrl = ApiClient.getScaledImageUrl(virtualFolder.PrimaryImageItemId, {
type: "Primary" type: "Primary"
}); });
} }
var hasCardImageContainer; var hasCardImageContainer;
if (imgUrl) { if (imgUrl) {
html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;background-image:url(\'' + imgUrl + "');\">"; html += '<div class="cardImageContainer editLibrary" style="cursor:pointer;background-image:url(\'' + imgUrl + "');\">";
hasCardImageContainer = true; hasCardImageContainer = true;
@ -241,38 +270,60 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + "</i>"; html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + "</i>";
hasCardImageContainer = true; hasCardImageContainer = true;
} }
if (hasCardImageContainer) { if (hasCardImageContainer) {
html += '<div class="cardIndicators backdropCardIndicators">'; html += '<div class="cardIndicators backdropCardIndicators">';
html += '<div is="emby-itemrefreshindicator"' + (virtualFolder.RefreshProgress || virtualFolder.RefreshStatus && "Idle" !== virtualFolder.RefreshStatus ? "" : ' class="hide"') + ' data-progress="' + (virtualFolder.RefreshProgress || 0) + '" data-status="' + virtualFolder.RefreshStatus + '"></div>'; html += '<div is="emby-itemrefreshindicator"' + (virtualFolder.RefreshProgress || virtualFolder.RefreshStatus && "Idle" !== virtualFolder.RefreshStatus ? "" : ' class="hide"') + ' data-progress="' + (virtualFolder.RefreshProgress || 0) + '" data-status="' + virtualFolder.RefreshStatus + '"></div>';
html += "</div>"; html += "</div>";
html += "</div>"; html += "</div>";
} }
if (!imgUrl && virtualFolder.showNameWithIcon) { if (!imgUrl && virtualFolder.showNameWithIcon) {
html += '<h3 class="cardImageContainer addLibrary" style="position:absolute;top:0;left:0;right:0;bottom:0;cursor:pointer;flex-direction:column;">'; html += '<h3 class="cardImageContainer addLibrary" style="position:absolute;top:0;left:0;right:0;bottom:0;cursor:pointer;flex-direction:column;">';
html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + "</i>"; html += '<i class="cardImageIcon-small md-icon">' + (virtualFolder.icon || imageHelper.getLibraryIcon(virtualFolder.CollectionType)) + "</i>";
virtualFolder.showNameWithIcon && (html += '<div style="margin:1em 0;position:width:100%;">', html += virtualFolder.Name, html += "</div>");
if (virtualFolder.showNameWithIcon) {
html += '<div style="margin:1em 0;position:width:100%;">';
html += virtualFolder.Name;
html += "</div>";
}
html += "</h3>"; html += "</h3>";
} }
html += "</div>";
html += "</div>";
html += '<div class="cardFooter visualCardBox-cardFooter">';
// always show menu unless explicitly hidden html += "</div>";
html += "</div>";
html += '<div class="cardFooter visualCardBox-cardFooter">'; // always show menu unless explicitly hidden
if (virtualFolder.showMenu !== false) { if (virtualFolder.showMenu !== false) {
html += '<div style="text-align:right; float:right;padding-top:5px;">'; html += '<div style="text-align:right; float:right;padding-top:5px;">';
html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon">&#xE5D3;</i></button>'; html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon">&#xE5D3;</i></button>';
html += "</div>"; html += "</div>";
} }
html += "<div class='cardText'>"; html += "<div class='cardText'>";
virtualFolder.showNameWithIcon ? html += "&nbsp;" : html += virtualFolder.Name;
if (virtualFolder.showNameWithIcon) {
html += "&nbsp;";
} else {
html += virtualFolder.Name;
}
html += "</div>"; html += "</div>";
var typeName = getCollectionTypeOptions().filter(function(t) { var typeName = getCollectionTypeOptions().filter(function (t) {
return t.value == virtualFolder.CollectionType return t.value == virtualFolder.CollectionType;
})[0]; })[0];
typeName = typeName ? typeName.name : globalize.translate("FolderTypeUnset"); typeName = typeName ? typeName.name : globalize.translate("FolderTypeUnset");
html += "<div class='cardText cardText-secondary'>"; html += "<div class='cardText cardText-secondary'>";
virtualFolder.showType === false ? html += "&nbsp;" : html += typeName;
if (virtualFolder.showType === false) {
html += "&nbsp;";
} else {
html += typeName;
}
html += "</div>"; html += "</div>";
if (virtualFolder.showLocations === false) { if (virtualFolder.showLocations === false) {
html += "<div class='cardText cardText-secondary'>"; html += "<div class='cardText cardText-secondary'>";
html += "&nbsp;"; html += "&nbsp;";
@ -286,6 +337,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
html += globalize.translate("NumLocationsValue", virtualFolder.Locations.length); html += globalize.translate("NumLocationsValue", virtualFolder.Locations.length);
html += "</div>"; html += "</div>";
} }
html += "</div>"; html += "</div>";
html += "</div>"; html += "</div>";
html += "</div>"; html += "</div>";
@ -305,18 +357,18 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
}, { }, {
href: "metadatanfo.html", href: "metadatanfo.html",
name: globalize.translate("TabNfoSettings") name: globalize.translate("TabNfoSettings")
}] }];
} }
window.WizardLibraryPage = { window.WizardLibraryPage = {
next: function() { next: function () {
Dashboard.navigate("wizardsettings.html") Dashboard.navigate("wizardsettings.html");
} }
}; };
pageClassOn("pageshow", "mediaLibraryPage", function() { pageClassOn("pageshow", "mediaLibraryPage", function () {
reloadLibrary(this); reloadLibrary(this);
}); });
pageIdOn("pageshow", "mediaLibraryPage", function() { pageIdOn("pageshow", "mediaLibraryPage", function () {
libraryMenu.setTabs("librarysetup", 0, getTabs); libraryMenu.setTabs("librarysetup", 0, getTabs);
var page = this; var page = this;
taskButton({ taskButton({
@ -326,7 +378,7 @@ define(["jQuery", "apphost", "scripts/taskbutton", "loading", "libraryMenu", "gl
button: page.querySelector(".btnRefresh") button: page.querySelector(".btnRefresh")
}); });
}); });
pageIdOn("pagebeforehide", "mediaLibraryPage", function() { pageIdOn("pagebeforehide", "mediaLibraryPage", function () {
var page = this; var page = this;
taskButton({ taskButton({
mode: "off", mode: "off",

View file

@ -9,7 +9,7 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
title: globalize.translate("DeleteUser"), title: globalize.translate("DeleteUser"),
text: msg, text: msg,
confirmText: globalize.translate("ButtonDelete"), confirmText: globalize.translate("ButtonDelete"),
primary: "cancel" primary: "delete"
}).then(function () { }).then(function () {
loading.show(); loading.show();
ApiClient.deleteUser(id).then(function () { ApiClient.deleteUser(id).then(function () {