diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index a342247473..46de0d2548 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -675,7 +675,12 @@ } if (user.Policy.IsAdministrator) { + commands.push('edit'); + + if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program') { + commands.push('managesubtitles'); + } } commands.push('refresh'); @@ -692,10 +697,6 @@ commands.push('share'); } - if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program') { - commands.push('managesubtitles'); - } - return commands; }, @@ -736,7 +737,7 @@ editSubtitles: function (itemId) { - require(['subtitleeditor/edititemsubtitles'], function () { + require(['subtitleeditor/subtitleeditor'], function () { SubtitleEditor.show(itemId); }); diff --git a/dashboard-ui/subtitleeditor/edititemsubtitles.js b/dashboard-ui/subtitleeditor/subtitleeditor.js similarity index 83% rename from dashboard-ui/subtitleeditor/edititemsubtitles.js rename to dashboard-ui/subtitleeditor/subtitleeditor.js index 0ae434ca2b..8b3acd2259 100644 --- a/dashboard-ui/subtitleeditor/edititemsubtitles.js +++ b/dashboard-ui/subtitleeditor/subtitleeditor.js @@ -107,12 +107,6 @@ itemHtml += ''; - itemHtml += ''; - - itemHtml += '
'; - itemHtml += (s.Language || Globalize.translate('LabelUnknownLanaguage')); - itemHtml += '
'; - var atts = []; atts.push(s.Codec); @@ -125,7 +119,18 @@ atts.push('Forced'); } - itemHtml += '
' + atts.join(', ') + '
'; + if (atts.length == 3) { + itemHtml += ''; + } + else { + itemHtml += ''; + } + + itemHtml += '
'; + itemHtml += (s.Language || Globalize.translate('LabelUnknownLanaguage')); + itemHtml += '
'; + + itemHtml += '
' + atts.join(' - ') + '
'; if (s.Path) { itemHtml += '
' + (s.Path) + '
'; @@ -202,8 +207,6 @@ $('.noSearchResults', page).hide(); - html += ''; var elem = $('.subtitleResults', page).html(html).trigger('create'); $('.btnViewSubtitle', elem).on('click', function () { @@ -317,7 +341,7 @@ var html = ''; html += '

'; - html += ''; + html += ''; html += '
' + item.Name + '
'; html += '

'; @@ -333,7 +357,7 @@ // Has to be assigned a z-index after the call to .open() $(dlg).on('iron-overlay-closed', onDialogClosed); - //document.body.classList.add('bodyWithPopupOpen'); + document.body.classList.add('bodyWithPopupOpen'); dlg.open(); window.location.hash = getHash(itemId); @@ -350,7 +374,7 @@ fillLanguages(editorContent, languages); }); - $('paper-fab', dlg).on('click', closeDialog); + $('.btnCloseDialog', dlg).on('click', closeDialog); }); }); } @@ -384,9 +408,9 @@ currentDialog = null; window.removeEventListener('hashchange', onHashChange); - //document.body.classList.remove('bodyWithPopupOpen'); + document.body.classList.remove('bodyWithPopupOpen'); $(this).remove(); - + Dashboard.hideLoadingMsg(); if ((window.location.hash || '').length > 1) { history.back(); } diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index c69f735f30..2ef1463287 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -521,4 +521,6 @@ paper-dialog paper-radio-group paper-radio-button { font-weight: inherit !important; line-height: 1 !important; line-height: initial !important; + padding: 0 1em; + margin-top: 1em; }