mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove button markup
This commit is contained in:
parent
c58b7f3469
commit
aed5226fe5
32 changed files with 217 additions and 643 deletions
|
@ -217,16 +217,6 @@
|
|||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<td class="organizerButtonCell">';
|
||||
|
||||
|
||||
if (item.Status != 'Success') {
|
||||
html += '<button data-resultid="' + item.Id + '" type="button" data-inline="true" data-icon="delete" data-mini="true" data-iconpos="notext" class="btnDeleteResult organizerButton" title="' + Globalize.translate('ButtonDeleteFile') + '">' + Globalize.translate('ButtonDeleteFile') + '</button>';
|
||||
html += '<button data-resultid="' + item.Id + '" type="button" data-inline="true" data-icon="action" data-mini="true" data-iconpos="notext" class="btnProcessResult organizerButton" title="' + Globalize.translate('ButtonOrganizeFile') + '">' + Globalize.translate('ButtonOrganizeFile') + '</button>';
|
||||
}
|
||||
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>';
|
||||
|
||||
var date = parseISO8601Date(item.Date, { toLocal: true });
|
||||
|
@ -257,6 +247,16 @@
|
|||
html += item.TargetPath || '';
|
||||
html += '</td>';
|
||||
|
||||
html += '<td class="organizerButtonCell">';
|
||||
|
||||
|
||||
if (item.Status != 'Success') {
|
||||
html += '<paper-icon-button data-resultid="' + item.Id + '" icon="folder" class="btnProcessResult organizerButton" title="' + Globalize.translate('ButtonOrganizeFile') + '"></paper-icon-button>';
|
||||
html += '<paper-icon-button data-resultid="' + item.Id + '" icon="delete" class="btnDeleteResult organizerButton" title="' + Globalize.translate('ButtonDeleteFile') + '"></paper-icon-button>';
|
||||
}
|
||||
|
||||
html += '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
return html;
|
||||
|
|
|
@ -751,7 +751,7 @@
|
|||
|
||||
html += "<span style='color:#009F00;margin-left:5px;margin-right:5px;'>" + progress + "%</span>";
|
||||
|
||||
html += '<button type="button" data-icon="delete" data-iconpos="notext" data-inline="true" data-mini="true" onclick="DashboardPage.stopTask(\'' + task.Id + '\');">' + Globalize.translate('ButtonStop') + '</button>';
|
||||
html += '<paper-icon-button title="' + Globalize.translate('ButtonStop') + '" icon="cancel" onclick="DashboardPage.stopTask(\'' + task.Id + '\');"></paper-icon-button>';
|
||||
}
|
||||
else if (task.State == "Cancelling") {
|
||||
html += '<span style="color:#cc0000;">' + Globalize.translate('LabelStopping') + '</span>';
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
html += '<label for="txtDirectoryPickerPath" class="lblDirectoryPickerPath">' + Globalize.translate('LabelCurrentPath') + '</label>';
|
||||
|
||||
html += '<div><input id="txtDirectoryPickerPath" name="txtDirectoryPickerPath" type="text" required="required" style="font-weight:bold;width:82%;display:inline-block;" />';
|
||||
html += '<button class="btnRefreshDirectories" type="button" data-icon="refresh" data-inline="true" data-mini="true" data-iconpos="notext">' + Globalize.translate('ButtonRefresh') + '</button>';
|
||||
html += '<paper-icon-button icon="refresh" class="btnRefreshDirectories" title="' + Globalize.translate('ButtonRefresh') + '"></paper-icon-button>';
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
|
|
@ -210,9 +210,9 @@
|
|||
|
||||
if (showControls) {
|
||||
html += '<div data-role="controlgroup" data-type="horizontal" style="display:inline-block;">';
|
||||
html += '<button data-icon="arrow-l" data-iconpos="notext" data-inline="true" data-mini="true" class="btnPreviousPage" ' + (startIndex ? '' : 'disabled') + '>' + Globalize.translate('ButtonPreviousPage') + '</button>';
|
||||
|
||||
html += '<button data-icon="arrow-r" data-iconpos="notext" data-inline="true" data-mini="true" class="btnNextPage" ' + (startIndex + limit > totalRecordCount ? 'disabled' : '') + '>' + Globalize.translate('ButtonNextPage') + '</button>';
|
||||
html += '<paper-icon-button icon="arrow-back" title="' + Globalize.translate('ButtonPreviousPage') + '" class="btnPreviousPage" ' + (startIndex ? '' : 'disabled') + '></paper-icon-button>';
|
||||
html += '<paper-icon-button icon="arrow-forward" title="' + Globalize.translate('ButtonNextPage') + '" class="btnNextPage" ' + (startIndex + limit > totalRecordCount ? 'disabled' : '') + '></paper-icon-button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#indexPage", function () {
|
||||
pageIdOn('pageinit', "indexPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -2565,7 +2565,7 @@
|
|||
//html += '<paper-button raised class="subdued notext"><iron-icon icon="view-comfy"></iron-icon></paper-button>';
|
||||
var viewPanelClass = options.viewPanelClass || 'viewPanel';
|
||||
var title = options.viewIcon == 'filter-list' ? Globalize.translate('ButtonFilter') : Globalize.translate('ButtonMenu');
|
||||
html += '<paper-icon-button title="' + title + '" icon="' + (options.viewIcon || AppInfo.moreIcon) + '" onclick="require([\'jqmicons\']);jQuery(\'.' + viewPanelClass + '\', jQuery(this).parents(\'.page\')).panel(\'toggle\');"></paper-icon-button>';
|
||||
html += '<paper-icon-button title="' + title + '" icon="' + (options.viewIcon || AppInfo.moreIcon) + '" onclick="jQuery(\'.' + viewPanelClass + '\', jQuery(this).parents(\'.page\')).panel(\'toggle\');"></paper-icon-button>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
|
||||
var mapHtml = '<tr>';
|
||||
|
||||
mapHtml += '<td>';
|
||||
mapHtml += '<button class="btnDeletePath" data-index="' + index + '" data-mini="true" data-inline="true" data-icon="delete" data-iconpos="notext" type="button" style="margin:0 .5em 0 0;">Delete</button>';
|
||||
mapHtml += '</td>';
|
||||
|
||||
mapHtml += '<td style="vertical-align:middle;">';
|
||||
mapHtml += map.From;
|
||||
mapHtml += '</td>';
|
||||
|
@ -53,6 +49,10 @@
|
|||
mapHtml += map.To;
|
||||
mapHtml += '</td>';
|
||||
|
||||
mapHtml += '<td>';
|
||||
mapHtml += '<paper-icon-button data-index="' + index + '" icon="delete" class="btnDeletePath"></paper-icon-button>';
|
||||
mapHtml += '</td>';
|
||||
|
||||
mapHtml += '</tr>';
|
||||
|
||||
index++;
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
$('#selectEnableRealtimeMonitor', page).val(config.EnableLibraryMonitor);
|
||||
|
||||
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath || '');
|
||||
|
||||
$('#chkEnableAudioArchiveFiles', page).checked(config.EnableAudioArchiveFiles).checkboxradio("refresh");
|
||||
$('#chkEnableVideoArchiveFiles', page).checked(config.EnableVideoArchiveFiles).checkboxradio("refresh");
|
||||
|
||||
|
@ -27,8 +25,6 @@
|
|||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.ItemsByNamePath = $('#txtItemsByNamePath', form).val();
|
||||
|
||||
config.SeasonZeroDisplayName = $('#txtSeasonZeroName', form).val();
|
||||
|
||||
config.EnableLibraryMonitor = $('#selectEnableRealtimeMonitor', form).val();
|
||||
|
@ -59,26 +55,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('#btnSelectIBNPath', page).on("click.selectDirectory", function () {
|
||||
|
||||
var picker = new DirectoryBrowser(page);
|
||||
|
||||
picker.show({
|
||||
|
||||
callback: function (path) {
|
||||
|
||||
if (path) {
|
||||
$('#txtItemsByNamePath', page).val(path);
|
||||
}
|
||||
picker.close();
|
||||
},
|
||||
|
||||
header: Globalize.translate('HeaderSelectImagesByNamePath'),
|
||||
|
||||
instruction: Globalize.translate('HeaderSelectImagesByNamePathHelp')
|
||||
});
|
||||
});
|
||||
|
||||
$('.librarySettingsForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
});
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
html += '</td>';
|
||||
|
||||
html += '<td>';
|
||||
html += '<button data-tunerid="' + tuner.Id + '" type="button" data-inline="true" data-icon="refresh" data-mini="true" data-iconpos="notext" class="btnResetTuner organizerButton" title="' + Globalize.translate('ButtonResetTuner') + '">' + Globalize.translate('ButtonResetTuner') + '</button>';
|
||||
html += '<paper-icon-button data-tunerid="' + tuner.Id + '" icon="refresh" class="btnResetTuner" title="' + Globalize.translate('ButtonResetTuner') + '"></paper-icon-button>';
|
||||
html += '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
html += '</p><ul class="mediaFolderLocations" data-inset="true" data-role="listview" data-split-icon="minus">';
|
||||
|
||||
html += '<li data-role="list-divider" class="mediaLocationsHeader">' + Globalize.translate('HeaderMediaLocations');
|
||||
html += '<button type="button" data-icon="plus" data-mini="true" data-iconpos="notext" data-inline="true" onclick="MediaLibraryPage.addMediaLocation(' + index + ');">' + Globalize.translate('ButtonAdd') + '</button>';
|
||||
html += '<paper-fab class="mini subdued" icon="add" title="' + Globalize.translate('ButtonAdd') + '" onclick="MediaLibraryPage.addMediaLocation(' + index + ');" style="margin-left:1em;"></paper-fab>';
|
||||
html += '</li>';
|
||||
|
||||
for (var i = 0, length = virtualFolder.Locations.length; i < length; i++) {
|
||||
|
|
|
@ -43,115 +43,15 @@
|
|||
|
||||
function loadChapters(page, config, providers) {
|
||||
|
||||
if (providers.length) {
|
||||
$('.noChapterProviders', page).hide();
|
||||
$('.chapterDownloadSettings', page).show();
|
||||
} else {
|
||||
$('.noChapterProviders', page).show();
|
||||
$('.chapterDownloadSettings', page).hide();
|
||||
}
|
||||
|
||||
$('#chkChaptersMovies', page).checked(config.EnableMovieChapterImageExtraction).checkboxradio("refresh");
|
||||
$('#chkChaptersEpisodes', page).checked(config.EnableEpisodeChapterImageExtraction).checkboxradio("refresh");
|
||||
$('#chkChaptersOtherVideos', page).checked(config.EnableOtherVideoChapterImageExtraction).checkboxradio("refresh");
|
||||
|
||||
$('#chkDownloadChapterMovies', page).checked(config.DownloadMovieChapters).checkboxradio("refresh");
|
||||
$('#chkDownloadChapterEpisodes', page).checked(config.DownloadEpisodeChapters).checkboxradio("refresh");
|
||||
|
||||
$('#chkExtractChaptersDuringLibraryScan', page).checked(config.ExtractDuringLibraryScan).checkboxradio("refresh");
|
||||
|
||||
renderChapterFetchers(page, config, providers);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function renderChapterFetchers(page, config, plugins) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (!plugins.length) {
|
||||
$('.chapterFetchers', page).html(html).hide().trigger('create');
|
||||
return;
|
||||
}
|
||||
|
||||
var i, length, plugin, id;
|
||||
|
||||
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">';
|
||||
html += Globalize.translate('LabelChapterDownloaders');
|
||||
html += '</div>';
|
||||
|
||||
html += '<div style="display:inline-block;width: 75%;vertical-align:top;">';
|
||||
html += '<div data-role="controlgroup" class="chapterFetcherGroup">';
|
||||
|
||||
for (i = 0, length = plugins.length; i < length; i++) {
|
||||
|
||||
plugin = plugins[i];
|
||||
|
||||
id = 'chkChapterFetcher' + i;
|
||||
|
||||
var isChecked = config.DisabledFetchers.indexOf(plugin.Name) == -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkChapterFetcher" type="checkbox" name="' + id + '" id="' + id + '" data-pluginname="' + plugin.Name + '" data-mini="true"' + isChecked + '>';
|
||||
html += '<label for="' + id + '">' + plugin.Name + '</label>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
if (plugins.length > 1) {
|
||||
html += '<div style="display:inline-block;vertical-align:top;margin-left:5px;">';
|
||||
|
||||
for (i = 0, length = plugins.length; i < length; i++) {
|
||||
|
||||
html += '<div style="margin:6px 0;">';
|
||||
if (i == 0) {
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>';
|
||||
} else if (i == (plugins.length - 1)) {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>';
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>';
|
||||
}
|
||||
else {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '<div class="fieldDescription">' + Globalize.translate('LabelChapterDownloadersHelp') + '</div>';
|
||||
|
||||
var elem = $('.chapterFetchers', page).html(html).show().trigger('create');
|
||||
|
||||
$('.btnDown', elem).on('click', function () {
|
||||
var index = parseInt(this.getAttribute('data-pluginindex'));
|
||||
|
||||
var elemToMove = $('.chapterFetcherGroup .ui-checkbox', page)[index];
|
||||
|
||||
var insertAfter = $(elemToMove).next('.ui-checkbox')[0];
|
||||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertAfter(insertAfter);
|
||||
|
||||
$('.chapterFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
|
||||
$('.btnUp', elem).on('click', function () {
|
||||
|
||||
var index = parseInt(this.getAttribute('data-pluginindex'));
|
||||
|
||||
var elemToMove = $('.chapterFetcherGroup .ui-checkbox', page)[index];
|
||||
|
||||
var insertBefore = $(elemToMove).prev('.ui-checkbox')[0];
|
||||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertBefore(insertBefore);
|
||||
|
||||
$('.chapterFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
var form = this;
|
||||
|
||||
|
@ -311,22 +211,8 @@
|
|||
config.EnableEpisodeChapterImageExtraction = $('#chkChaptersEpisodes', form).checked();
|
||||
config.EnableOtherVideoChapterImageExtraction = $('#chkChaptersOtherVideos', form).checked();
|
||||
|
||||
config.DownloadMovieChapters = $('#chkDownloadChapterMovies', form).checked();
|
||||
config.DownloadEpisodeChapters = $('#chkDownloadChapterEpisodes', form).checked();
|
||||
config.ExtractDuringLibraryScan = $('#chkExtractChaptersDuringLibraryScan', form).checked();
|
||||
|
||||
config.DisabledFetchers = $('.chkChapterFetcher:not(:checked)', form).get().map(function (c) {
|
||||
|
||||
return c.getAttribute('data-pluginname');
|
||||
|
||||
});
|
||||
|
||||
config.FetcherOrder = $('.chkChapterFetcher', form).get().map(function (c) {
|
||||
|
||||
return c.getAttribute('data-pluginname');
|
||||
|
||||
});
|
||||
|
||||
ApiClient.updateNamedConfiguration("chapters", config);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -175,17 +175,18 @@
|
|||
|
||||
for (i = 0, length = plugins.length; i < length; i++) {
|
||||
|
||||
html += '<div style="margin:6px 0;">';
|
||||
if (i == 0) {
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
} else if (i == (plugins.length - 1)) {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
html += '<div style="margin:6px 0 0;">';
|
||||
|
||||
if (i > 0) {
|
||||
html += '<paper-icon-button class="btnUp" data-pluginindex="' + i + '" icon="keyboard-arrow-up" title="' + Globalize.translate('ButtonUp') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
} else {
|
||||
html += '<paper-icon-button disabled class="btnUp" data-pluginindex="' + i + '" icon="keyboard-arrow-up" title="' + Globalize.translate('ButtonUp') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
}
|
||||
else {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
|
||||
if (i < (plugins.length - 1)) {
|
||||
html += '<paper-icon-button class="btnDown" data-pluginindex="' + i + '" icon="keyboard-arrow-down" title="' + Globalize.translate('ButtonDown') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
} else {
|
||||
html += '<paper-icon-button disabled class="btnDown" data-pluginindex="' + i + '" icon="keyboard-arrow-down" title="' + Globalize.translate('ButtonDown') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
|
@ -298,17 +299,18 @@
|
|||
|
||||
for (i = 0, length = plugins.length; i < length; i++) {
|
||||
|
||||
html += '<div style="margin:6px 0;">';
|
||||
if (i == 0) {
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
} else if (i == (plugins.length - 1)) {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
html += '<div style="margin:6px 0 0;">';
|
||||
|
||||
if (i > 0) {
|
||||
html += '<paper-icon-button class="btnUp" data-pluginindex="' + i + '" icon="keyboard-arrow-up" title="' + Globalize.translate('ButtonUp') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
} else {
|
||||
html += '<paper-icon-button disabled class="btnUp" data-pluginindex="' + i + '" icon="keyboard-arrow-up" title="' + Globalize.translate('ButtonUp') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
}
|
||||
else {
|
||||
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
|
||||
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
|
||||
|
||||
if (i < (plugins.length - 1)) {
|
||||
html += '<paper-icon-button class="btnDown" data-pluginindex="' + i + '" icon="keyboard-arrow-down" title="' + Globalize.translate('ButtonDown') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
} else {
|
||||
html += '<paper-icon-button disabled class="btnDown" data-pluginindex="' + i + '" icon="keyboard-arrow-down" title="' + Globalize.translate('ButtonDown') + '" style="padding:3px 8px;"></paper-icon-button>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
|
|
|
@ -782,7 +782,7 @@ var Dashboard = {
|
|||
|
||||
showUserFlyout: function () {
|
||||
|
||||
require(['jqmpanel', 'jqmicons'], function () {
|
||||
require(['jqmpanel'], function () {
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="a">';
|
||||
|
||||
html += '<h3 class="userHeader">';
|
||||
|
@ -2209,7 +2209,6 @@ var AppInfo = {};
|
|||
depends = depends || [];
|
||||
|
||||
if (newHtml.indexOf('type-interior') != -1) {
|
||||
depends.push('jqmicons');
|
||||
depends.push('jqmpopup');
|
||||
depends.push('jqmlistview');
|
||||
depends.push('jqmcollapsible');
|
||||
|
@ -2281,9 +2280,31 @@ var AppInfo = {};
|
|||
|
||||
})();
|
||||
|
||||
Dashboard.jQueryMobileInit();
|
||||
function pageClassOn(eventName, className, fn) {
|
||||
|
||||
$(document).on('pagecreate', ".page", function () {
|
||||
$(document).on(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.classList.contains(className)) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function pageIdOn(eventName, id, fn) {
|
||||
|
||||
$(document).on(eventName, function (e) {
|
||||
|
||||
var target = e.target;
|
||||
|
||||
if (target.id == id) {
|
||||
fn.call(target, e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
pageClassOn('pagecreate', "page", function () {
|
||||
|
||||
var page = $(this);
|
||||
|
||||
|
@ -2306,7 +2327,9 @@ $(document).on('pagecreate', ".page", function () {
|
|||
}
|
||||
}
|
||||
|
||||
}).on('pageshow', ".page", function () {
|
||||
});
|
||||
|
||||
pageClassOn('pageshow', "page", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -2327,15 +2350,10 @@ $(document).on('pagecreate', ".page", function () {
|
|||
document.body.classList.remove('darkScrollbars');
|
||||
}
|
||||
|
||||
var isWizardPage = page.classList.contains('wizardPage');
|
||||
Dashboard.ensurePageTitle(page);
|
||||
|
||||
var apiClient = window.ApiClient;
|
||||
|
||||
if (isWizardPage) {
|
||||
require(['jqmicons']);
|
||||
}
|
||||
|
||||
if (apiClient && apiClient.accessToken() && Dashboard.getCurrentUserId()) {
|
||||
|
||||
var isSettingsPage = page.classList.contains('type-interior');
|
||||
|
@ -2365,7 +2383,7 @@ $(document).on('pagecreate', ".page", function () {
|
|||
}
|
||||
}
|
||||
|
||||
if (!isConnectMode && this.id !== "loginPage" && !page.classList.contains('forgotPasswordPage') && !isWizardPage && this.id !== 'publicSharedItemPage') {
|
||||
if (!isConnectMode && this.id !== "loginPage" && !page.classList.contains('forgotPasswordPage') && !page.classList.contains('wizardPage') && this.id !== 'publicSharedItemPage') {
|
||||
|
||||
Logger.log('Not logged into server. Redirecting to login.');
|
||||
Dashboard.logout();
|
||||
|
@ -2380,4 +2398,7 @@ $(document).on('pagecreate', ".page", function () {
|
|||
if (apiClient && !apiClient.isWebSocketOpen()) {
|
||||
Dashboard.refreshSystemInfoFromServer();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Dashboard.jQueryMobileInit();
|
|
@ -218,7 +218,7 @@
|
|||
|
||||
function showPendingUserMenu(elem) {
|
||||
|
||||
require(['jqmpopup'], function() {
|
||||
require(['jqmpopup'], function () {
|
||||
var card = $(elem).parents('.card');
|
||||
var page = $(elem).parents('.page');
|
||||
var id = card.attr('data-id');
|
||||
|
@ -281,9 +281,8 @@
|
|||
|
||||
html += '<div class="cardFooter">';
|
||||
|
||||
html += '<div class="cardText" style="text-align:right; float:right;">';
|
||||
|
||||
html += '<button class="btnUserMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 2px 0 0;"></button>';
|
||||
html += '<div class="cardText" style="text-align:right; float:right;padding:0;">';
|
||||
html += '<paper-icon-button icon="' + AppInfo.moreIcon + '" class="btnUserMenu"></paper-icon-button>';
|
||||
html += "</div>";
|
||||
|
||||
html += '<div class="cardText" style="margin-right: 30px; padding: 11px 0 10px;">';
|
||||
|
@ -470,6 +469,11 @@
|
|||
showInvitePopup(page);
|
||||
});
|
||||
|
||||
$('.btnAddUser', page).on('click', function () {
|
||||
|
||||
Dashboard.navigate('usernew.html');
|
||||
});
|
||||
|
||||
$('.addUserForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pagebeforeshow', "#userProfilesPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue