1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update user pages

This commit is contained in:
Luke Pulverenti 2016-04-09 15:04:14 -04:00
parent 1e4a9af13a
commit ef7cd8f80c
11 changed files with 107 additions and 119 deletions

View file

@ -16,14 +16,14 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.0.49",
"_release": "1.0.49",
"version": "1.0.50",
"_release": "1.0.50",
"_resolution": {
"type": "version",
"tag": "1.0.49",
"commit": "961b40aa65f6171f25603c924bc1ee8d6e0214ab"
"tag": "1.0.50",
"commit": "7988bb63ffe48f61c7a1b69fb5f7ab73a8d30fdd"
},
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "~1.0.3",
"_originalSource": "emby-apiclient"
}

View file

@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.2.6",
"_release": "1.2.6",
"version": "1.2.8",
"_release": "1.2.8",
"_resolution": {
"type": "version",
"tag": "1.2.6",
"commit": "fe1b3e3069c875bb54cfede60ee94f8b8f876c90"
"tag": "1.2.8",
"commit": "ab69b1f6c75888a55b4baa100f2d3c527633bf49"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",

View file

@ -457,6 +457,12 @@ define([], function () {
return result;
}
function sendText(text) {
var elem = document.activeElement;
elem.value = text;
}
return {
autoFocus: autoFocus,
focus: focus,
@ -473,6 +479,7 @@ define([], function () {
},
moveDown: function (sourceElement) {
nav(sourceElement, 3);
}
},
sendText: sendText
};
});

View file

@ -1,4 +1,4 @@
define(['connectionManager', 'playbackManager', 'events', 'inputManager'], function (connectionManager, playbackManager, events, inputManager) {
define(['connectionManager', 'playbackManager', 'events', 'inputManager', 'focusManager'], function (connectionManager, playbackManager, events, inputManager, focusManager) {
function displayMessage(cmd) {
@ -115,6 +115,7 @@ define(['connectionManager', 'playbackManager', 'events', 'inputManager'], funct
break;
case 'SendString':
// todo
focusManager.sendText(cmd.Arguments.String);
break;
default:
console.log('processGeneralCommand does not recognize: ' + cmd.Name);

View file

@ -15,6 +15,9 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
},
showSettings: function () {
show('/settings/settings.html');
},
showSearch: function () {
skinManager.getCurrentSkin().search();
}
};

View file

@ -45,7 +45,7 @@
"tag": "v1.0.11",
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
},
"_source": "git://github.com/polymerelements/paper-behaviors.git",
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/paper-behaviors"
"_originalSource": "PolymerElements/paper-behaviors"
}

View file

@ -32,14 +32,14 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/paper-ripple",
"homepage": "https://github.com/PolymerElements/paper-ripple",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
},
"_source": "git://github.com/polymerelements/paper-ripple.git",
"_source": "git://github.com/PolymerElements/paper-ripple.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/paper-ripple"
"_originalSource": "PolymerElements/paper-ripple"
}

View file

@ -29,26 +29,26 @@
$('#chkIsAdmin', page).checked(user.Policy.IsAdministrator);
$('#chkDisabled', page).checked(user.Policy.IsDisabled).checkboxradio("refresh");
$('#chkIsHidden', page).checked(user.Policy.IsHidden).checkboxradio("refresh");
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl).checkboxradio("refresh");
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Policy.EnableRemoteControlOfOtherUsers).checkboxradio("refresh");
$('#chkDisabled', page).checked(user.Policy.IsDisabled);
$('#chkIsHidden', page).checked(user.Policy.IsHidden);
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl);
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Policy.EnableRemoteControlOfOtherUsers);
$('#chkEnableDownloading', page).checked(user.Policy.EnableContentDownloading).checkboxradio("refresh");
$('#chkEnableDownloading', page).checked(user.Policy.EnableContentDownloading);
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement).checkboxradio("refresh");
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess).checkboxradio("refresh");
$('#chkEnableContentDeletion', page).checked(user.Policy.EnableContentDeletion).checkboxradio("refresh");
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement);
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess);
$('#chkEnableContentDeletion', page).checked(user.Policy.EnableContentDeletion);
$('#chkDisableUserPreferences', page).checked((!user.Policy.EnableUserPreferenceAccess)).checkboxradio("refresh");
$('#chkDisableUserPreferences', page).checked((!user.Policy.EnableUserPreferenceAccess));
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback).checkboxradio("refresh");
$('#chkEnableAudioPlaybackTranscoding', page).checked(user.Policy.EnableAudioPlaybackTranscoding).checkboxradio("refresh");
$('#chkEnableVideoPlaybackTranscoding', page).checked(user.Policy.EnableVideoPlaybackTranscoding).checkboxradio("refresh");
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback);
$('#chkEnableAudioPlaybackTranscoding', page).checked(user.Policy.EnableAudioPlaybackTranscoding);
$('#chkEnableVideoPlaybackTranscoding', page).checked(user.Policy.EnableVideoPlaybackTranscoding);
$('#chkEnableSync', page).checked(user.Policy.EnableSync).checkboxradio("refresh");
$('#chkEnableSyncTranscoding', page).checked(user.Policy.EnableSyncTranscoding).checkboxradio("refresh");
$('#chkEnableSharing', page).checked(user.Policy.EnablePublicSharing).checkboxradio("refresh");
$('#chkEnableSync', page).checked(user.Policy.EnableSync);
$('#chkEnableSyncTranscoding', page).checked(user.Policy.EnableSyncTranscoding);
$('#chkEnableSharing', page).checked(user.Policy.EnablePublicSharing);
Dashboard.hideLoadingMsg();
}

View file

@ -4,50 +4,44 @@
var html = '';
html += '<fieldset data-role="controlgroup">';
html += '<div class="paperCheckboxListLabel">' + Globalize.translate('HeaderLibraries') + '</div>';
html += '<legend>' + Globalize.translate('HeaderLibraries') + '</legend>';
html += '<div class="paperCheckboxList paperList" style="padding:.5em 1em;">';
for (var i = 0, length = mediaFolders.length; i < length; i++) {
var folder = mediaFolders[i];
var id = 'mediaFolder' + i;
var checkedAttribute = ' checked="checked"';
html += '<input class="chkFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<label for="' + id + '">' + folder.Name + '</label>';
html += '<paper-checkbox class="chkFolder" data-id="' + folder.Id + '"' + checkedAttribute + '>' + folder.Name + '</paper-checkbox>';
}
html += '</fieldset>';
html += '</div>';
$('.folderAccess', page).html(html).trigger('create');
$('#chkEnableAllFolders', page).checked(true).checkboxradio('refresh').trigger('change');
$('#chkEnableAllFolders', page).checked(true).trigger('change');
}
function loadChannels(page, channels) {
var html = '';
html += '<fieldset data-role="controlgroup">';
html += '<div class="paperCheckboxListLabel">' + Globalize.translate('HeaderChannels') + '</div>';
html += '<legend>' + Globalize.translate('HeaderChannels') + '</legend>';
html += '<div class="paperCheckboxList paperList" style="padding:.5em 1em;">';
for (var i = 0, length = channels.length; i < length; i++) {
var folder = channels[i];
var id = 'channels' + i;
var checkedAttribute = ' checked="checked"';
html += '<input class="chkChannel" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
html += '<label for="' + id + '">' + folder.Name + '</label>';
html += '<paper-checkbox class="chkChannel" data-id="' + folder.Id + '"' + checkedAttribute + '>' + folder.Name + '</paper-checkbox>';
}
html += '</fieldset>';
html += '</div>';
$('.channelAccess', page).show().html(html).trigger('create');
@ -57,7 +51,7 @@
$('.channelAccessContainer', page).hide();
}
$('#chkEnableAllChannels', page).checked(true).checkboxradio('refresh').trigger('change');
$('#chkEnableAllChannels', page).checked(true).trigger('change');
}
function loadUser(page) {
@ -88,23 +82,23 @@
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked();
user.Policy.EnabledFolders = user.Policy.EnableAllFolders ?
[] :
$('.chkFolder:checked', page).map(function () {
return this.getAttribute('data-id');
}).get();
$('.chkFolder', page).get().filter(function (i) {
return i.checked;
}).map(function (i) {
return i.getAttribute('data-id');
});
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
[] :
$('.chkChannel:checked', page).map(function () {
return this.getAttribute('data-id');
}).get();
$('.chkChannel', page).get().filter(function (i) {
return i.checked;
}).map(function (i) {
return i.getAttribute('data-id');
});
ApiClient.updateUserPolicy(user.Id, user.Policy).then(function () {
Dashboard.navigate("useredit.html?userId=" + user.Id);
Dashboard.navigate("userprofiles.html");
});
}, function (response) {

View file

@ -45,77 +45,62 @@
<paper-checkbox id="chkIsAdmin">${OptionAllowUserToManageServer}</paper-checkbox>
</li>
</ul>
<fieldset id="featureAccessFields" data-role="controlgroup">
<legend>${HeaderFeatureAccess}</legend>
<input type="checkbox" id="chkEnableContentDeletion" name="chkEnableContentDeletion" />
<label for="chkEnableContentDeletion">${OptionAllowDeleteLibraryContent}</label>
<input type="checkbox" id="chkEnableDownloading" />
<label for="chkEnableDownloading">${OptionAllowContentDownloading}</label>
<input type="checkbox" id="chkEnableLiveTvAccess" name="chkEnableLiveTvAccess" />
<label for="chkEnableLiveTvAccess">${OptionAllowBrowsingLiveTv}</label>
<input type="checkbox" id="chkManageLiveTv" name="chkManageLiveTv" />
<label for="chkManageLiveTv">${OptionAllowManageLiveTv}</label>
</fieldset>
<br />
<div id="featureAccessFields">
<div class="paperCheckboxListLabel">${HeaderFeatureAccess}</div>
<div class="paperCheckboxList paperList" style="padding:.5em 1em;">
<paper-checkbox id="chkEnableContentDeletion">${OptionAllowDeleteLibraryContent}</paper-checkbox>
<paper-checkbox id="chkEnableDownloading">${OptionAllowContentDownloading}</paper-checkbox>
<paper-checkbox id="chkEnableLiveTvAccess">${OptionAllowBrowsingLiveTv}</paper-checkbox>
<paper-checkbox id="chkManageLiveTv">${OptionAllowManageLiveTv}</paper-checkbox>
</div>
</div>
<div>
<fieldset data-role="controlgroup">
<legend>${HeaderPlayback}</legend>
<input type="checkbox" id="chkEnableMediaPlayback" />
<label for="chkEnableMediaPlayback">${OptionAllowMediaPlayback}</label>
<input type="checkbox" id="chkEnableAudioPlaybackTranscoding" />
<label for="chkEnableAudioPlaybackTranscoding">${OptionAllowAudioPlaybackTranscoding}</label>
<input type="checkbox" id="chkEnableVideoPlaybackTranscoding" />
<label for="chkEnableVideoPlaybackTranscoding">${OptionAllowVideoPlaybackTranscoding}</label>
</fieldset>
<br />
<div class="paperCheckboxListLabel">${HeaderPlayback}</div>
<div class="paperCheckboxList paperList" style="padding:.5em 1em;">
<paper-checkbox id="chkEnableMediaPlayback">${OptionAllowMediaPlayback}</paper-checkbox>
<paper-checkbox id="chkEnableAudioPlaybackTranscoding">${OptionAllowAudioPlaybackTranscoding}</paper-checkbox>
<paper-checkbox id="chkEnableVideoPlaybackTranscoding">${OptionAllowVideoPlaybackTranscoding}</paper-checkbox>
</div>
<div class="fieldDescription">${OptionAllowMediaPlaybackTranscodingHelp}</div>
<br />
</div>
<div>
<fieldset data-role="controlgroup">
<legend>${HeaderRemoteControl}</legend>
<input type="checkbox" id="chkEnableRemoteControlOtherUsers" name="chkEnableRemoteControlOtherUsers" />
<label for="chkEnableRemoteControlOtherUsers">${OptionAllowRemoteControlOthers}</label>
<input type="checkbox" id="chkRemoteControlSharedDevices" />
<label for="chkRemoteControlSharedDevices">${OptionAllowRemoteSharedDevices}</label>
</fieldset>
<br />
<div class="paperCheckboxListLabel">${HeaderRemoteControl}</div>
<div class="paperCheckboxList paperList" style="padding:.5em 1em;">
<paper-checkbox id="chkEnableRemoteControlOtherUsers">${OptionAllowRemoteControlOthers}</paper-checkbox>
<paper-checkbox id="chkRemoteControlSharedDevices">${OptionAllowRemoteSharedDevices}</paper-checkbox>
</div>
<div class="fieldDescription">${OptionAllowRemoteSharedDevicesHelp}</div>
<br />
</div>
<div>
<fieldset data-role="controlgroup">
<legend>${HeaderSharing}</legend>
<input type="checkbox" id="chkEnableSharing" />
<label for="chkEnableSharing">${OptionAllowLinkSharing}</label>
</fieldset>
<div class="fieldDescription">${OptionAllowLinkSharingHelp}</div>
<br />
<div class="paperCheckboxListLabel">${HeaderSync}</div>
<div class="paperCheckboxList paperList" style="padding:.5em 1em;">
<paper-checkbox id="chkEnableSync">${OptionAllowSyncContent}</paper-checkbox>
<paper-checkbox id="chkEnableSyncTranscoding">${OptionAllowSyncTranscoding}</paper-checkbox>
</div>
<br />
</div>
<div>
<fieldset data-role="controlgroup">
<legend>${HeaderSync}</legend>
<input type="checkbox" id="chkEnableSync" />
<label for="chkEnableSync">${OptionAllowSyncContent}</label>
<input type="checkbox" id="chkEnableSyncTranscoding" />
<label for="chkEnableSyncTranscoding">${OptionAllowSyncTranscoding}</label>
</fieldset>
<br />
<paper-checkbox id="chkEnableSharing">${OptionAllowLinkSharing}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${OptionAllowLinkSharingHelp}</div>
<br />
</div>
<div id="fldIsEnabled" style="margin: 1em 0 2em;">
<div data-role="controlgroup">
<input type="checkbox" id="chkDisabled" name="chkDisabled" />
<label for="chkDisabled">${OptionDisableUser}</label>
</div>
<div class="fieldDescription">${OptionDisableUserHelp}</div>
<paper-checkbox id="chkDisabled">${OptionDisableUser}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${OptionDisableUserHelp}</div>
</div>
<div style="margin: 1em 0;">
<input type="checkbox" id="chkDisableUserPreferences" data-mini="true" />
<label for="chkDisableUserPreferences">${OptionDisableUserPreferences}</label>
<div class="fieldDescription">${OptionDisableUserPreferencesHelp}</div>
<paper-checkbox id="chkDisableUserPreferences">${OptionDisableUserPreferences}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${OptionDisableUserPreferencesHelp}</div>
</div>
<div id="fldIsHidden" style="margin: 2em 0 1em;">
<input type="checkbox" id="chkIsHidden" name="chkIsHidden" data-mini="true" />
<label for="chkIsHidden">${OptionHideUser}</label>
<div class="fieldDescription">${OptionHideUserFromLoginHelp}</div>
<paper-checkbox id="chkIsHidden">${OptionHideUser}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${OptionHideUserFromLoginHelp}</div>
</div>
<br />
<ul data-role="listview" class="ulForm">

View file

@ -1,4 +1,4 @@
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/usernew,paper-input,jqmcheckbox">
<div id="newUserPage" data-role="page" class="page type-interior userProfilesPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Users" data-require="scripts/usernew,paper-input,paper-checkbox">
<div data-role="content">
<div class="content-primary">
@ -12,11 +12,10 @@
</ul>
<div class="folderAccessContainer">
<div class="ui-controlgroup-label">${HeaderLibraryAccess}</div>
<h1>${HeaderLibraryAccess}</h1>
<div>
<label for="chkEnableAllFolders">${OptionEnableAccessToAllLibraries}</label>
<input type="checkbox" id="chkEnableAllFolders" />
<div class="fieldDescription">${LibraryAccessHelp}</div>
<paper-checkbox id="chkEnableAllFolders">${OptionEnableAccessToAllLibraries}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${LibraryAccessHelp}</div>
</div>
<div class="folderAccessListContainer">
<br />
@ -27,11 +26,10 @@
<br />
<br />
<div class="channelAccessContainer" style="display:none;">
<div class="ui-controlgroup-label">${HeaderChannelAccess}</div>
<h1>${HeaderChannelAccess}</h1>
<div>
<label for="chkEnableAllChannels">${OptionEnableAccessToAllChannels}</label>
<input type="checkbox" id="chkEnableAllChannels" />
<div class="fieldDescription">${ChannelAccessHelp}</div>
<paper-checkbox id="chkEnableAllChannels">${OptionEnableAccessToAllChannels}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription">${ChannelAccessHelp}</div>
</div>
<div class="channelAccessListContainer">
<br />