mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove redundant user type selection dialog
This commit is contained in:
parent
39f71a8f24
commit
6d4aae1312
1 changed files with 3 additions and 40 deletions
|
@ -242,48 +242,11 @@ define(["loading", "dom", "globalize", "humanedate", "paper-icon-button-light",
|
|||
});
|
||||
}
|
||||
|
||||
function showNewUserDialog(e__w) {
|
||||
require(["dialog"], function (dialog) {
|
||||
var items = [];
|
||||
items.push({
|
||||
name: globalize.translate("HeaderAddLocalUser"),
|
||||
id: "manual",
|
||||
type: "submit",
|
||||
description: globalize.translate("AddUserByManually")
|
||||
});
|
||||
// TODO cvium
|
||||
// items.push({
|
||||
// name: globalize.translate("HeaderInviteUser"),
|
||||
// id: "invite",
|
||||
// description: globalize.translate("HeaderInviteUserHelp")
|
||||
// });
|
||||
items.push({
|
||||
name: globalize.translate("sharedcomponents#ButtonCancel"),
|
||||
id: "cancel",
|
||||
type: "cancel"
|
||||
});
|
||||
var options = {
|
||||
title: globalize.translate("ButtonAddUser"),
|
||||
text: globalize.translate("HowWouldYouLikeToAddUser")
|
||||
};
|
||||
options.buttons = items;
|
||||
return dialog(options).then(function (result) {
|
||||
var view = dom.parentWithClass(e__w.target, "page");
|
||||
debugger;
|
||||
if ("invite" === result) {
|
||||
showInvitePopup(view);
|
||||
} else {
|
||||
if ("manual" === result) {
|
||||
Dashboard.navigate("usernew.html");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
pageIdOn("pageinit", "userProfilesPage", function () {
|
||||
var page = this;
|
||||
page.querySelector(".btnAddUser").addEventListener("click", showNewUserDialog);
|
||||
page.querySelector(".btnAddUser").addEventListener("click", function() {
|
||||
Dashboard.navigate("usernew.html");
|
||||
});
|
||||
page.querySelector(".localUsers").addEventListener("click", function (e__e) {
|
||||
var btnUserMenu = dom.parentWithClass(e__e.target, "btnUserMenu");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue