mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Switch off of jQuery
This commit is contained in:
parent
fa9e2b476b
commit
fdfdcd60fe
8 changed files with 35 additions and 21 deletions
|
@ -34,6 +34,7 @@
|
|||
- [Ryan Hartzell](https://github.com/ryan-hartzell)
|
||||
- [Thibault Nocchi](https://github.com/ThibaultNocchi)
|
||||
- [MrTimscampi](https://github.com/MrTimscampi)
|
||||
- [ConfusedPolarBear](https://github.com/ConfusedPolarBear)
|
||||
|
||||
# Emby Contributors
|
||||
|
||||
|
|
|
@ -15,12 +15,14 @@ define(['require', 'apphost', 'layoutManager', 'focusManager', 'globalize', 'loa
|
|||
}
|
||||
|
||||
function list(apiClient) {
|
||||
console.debug("getting json");
|
||||
apiClient.getJSON("/QuickConnect/List").then(json => {
|
||||
var elem = $("#quickConnectIncoming");
|
||||
elem.html("");
|
||||
apiClient.getJSON("/QuickConnect/List").then(json => {
|
||||
console.debug("raw json", json);
|
||||
console.debug("raw json", json, "length is", json.length);
|
||||
for(var i = 0; i < json.length; i++) {
|
||||
var current = json[i];
|
||||
console.debug("current is", current);
|
||||
var html = "<li>" + current.Code + " - " + current.FriendlyName + " - ";
|
||||
|
||||
if(!current.Authenticated) {
|
||||
|
|
|
@ -2,12 +2,14 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function ($, loading,
|
|||
"use strict";
|
||||
|
||||
function loadPage(page, status) {
|
||||
console.debug("status is \"" + status + "\"");
|
||||
|
||||
var active = (status == "Active");
|
||||
var available = (status == "Available") || active;
|
||||
|
||||
$("#quickConnectStatus").text(status.toLocaleLowerCase());
|
||||
$("#chkQuickConnectAvailable").checked(available);
|
||||
$("#chkQuickConnectActive").checked(active);
|
||||
page.querySelector("#quickConnectStatus").textContent = status.toLocaleLowerCase();
|
||||
page.querySelector("#chkQuickConnectAvailable").checked = available;
|
||||
page.querySelector("#chkQuickConnectActive").checked = active;
|
||||
|
||||
loading.hide();
|
||||
}
|
||||
|
@ -44,8 +46,8 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function ($, loading,
|
|||
}
|
||||
|
||||
$(document).on("pageinit", "#quickConnectPage", function () {
|
||||
$("#quickConnectPage").off("submit", onSubmit).on("submit", onSubmit);
|
||||
$("#btnQuickConnectSubmit").click(onSubmit);
|
||||
document.querySelector("#quickConnectPage").onsubmit = onSubmit;
|
||||
document.querySelector("#btnQuickConnectSubmit").onclick = onSubmit;
|
||||
}).on("pageshow", "#quickConnectPage", function () {
|
||||
loading.show();
|
||||
var page = this;
|
||||
|
|
|
@ -2,6 +2,13 @@ define(["quickConnectSettings", "dom", "globalize", "loading", "userSettings", "
|
|||
"use strict";
|
||||
|
||||
return function (view, params) {
|
||||
function notImplemented() {
|
||||
Dashboard.alert({
|
||||
message: "This button is not implemented yet, you must check the checkbox labeled \"Always accept quick connect login requests\" in the dashboard",
|
||||
title: "Not implemented"
|
||||
});
|
||||
}
|
||||
|
||||
var quickConnectSettingsInstance = null;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
|
@ -9,6 +16,8 @@ define(["quickConnectSettings", "dom", "globalize", "loading", "userSettings", "
|
|||
view.addEventListener("viewshow", function () {
|
||||
console.debug("defining instance");
|
||||
|
||||
$("#btnQuickConnectActivate").click(notImplemented);
|
||||
|
||||
quickConnectSettingsInstance = new QuickConnectSettings({
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: userId,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="quickConnectPreferencesPage" data-role="page" class="page libraryPage userPreferencesPage noSecondaryNavPage" data-title="${HeaderHome}" data-backbutton="true">
|
||||
<button is="emby-button" id="btnQuickConnectActivate" type="button" class="raised button-submit block" disabled>
|
||||
<button is="emby-button" id="btnQuickConnectActivate" type="button" class="raised button-submit block">
|
||||
<span>Activate</span>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</label>
|
||||
<label>
|
||||
<input type="checkbox" is="emby-checkbox" id="chkQuickConnectActive" />
|
||||
<span>Always accept quick connect login requests</span>
|
||||
<span>Make quick connect always active (always accept login requests)</span>
|
||||
</label>
|
||||
<div class="fieldDescription checkboxFieldDescription">If unchecked, users will have to click the Activate button in their profile before initiating a quick connect login.</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue