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

rework subtitle editor

This commit is contained in:
Luke Pulverenti 2015-09-16 21:33:46 -04:00
parent fc775f9dd8
commit 0fca25c780
50 changed files with 302 additions and 120 deletions

View file

@ -692,6 +692,10 @@
commands.push('share');
}
if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program') {
commands.push('managesubtitles');
}
return commands;
},
@ -730,6 +734,14 @@
}, 250);
},
editSubtitles: function (itemId) {
require(['subtitleeditor/edititemsubtitles'], function () {
SubtitleEditor.show(itemId);
});
},
showMoreCommands: function (positionTo, itemId, commands) {
var items = [];
@ -774,6 +786,14 @@
});
}
if (commands.indexOf('managesubtitles') != -1) {
items.push({
name: Globalize.translate('ButtonManageSubtitles'),
id: 'managesubtitles',
ironIcon: 'closed-caption'
});
}
if (commands.indexOf('refresh') != -1) {
items.push({
name: Globalize.translate('ButtonRefresh'),
@ -825,6 +845,9 @@
case 'edit':
Dashboard.navigate('edititemmetadata.html?id=' + itemId);
break;
case 'managesubtitles':
LibraryBrowser.editSubtitles(itemId);
break;
case 'refresh':
ApiClient.refreshItem(itemId, {
@ -1407,6 +1430,10 @@
itemCommands.push('record');
}
if (item.MediaType == 'Video' && item.Type != 'TvChannel' && item.Type != 'Program') {
itemCommands.push('managesubtitles');
}
return itemCommands;
},
@ -2583,7 +2610,7 @@
if (options.addLayoutButton) {
html += '<paper-icon-button class="btnChangeLayout" data-layouts="' + (options.layouts || '') + '" onclick="LibraryBrowser.showLayoutMenu(this, \'' + (options.currentLayout || '') + '\');" icon="view-comfy"></paper-icon-button>';
html += '<paper-icon-button title="' + Globalize.translate('ButtonSelectView') + '" class="btnChangeLayout" data-layouts="' + (options.layouts || '') + '" onclick="LibraryBrowser.showLayoutMenu(this, \'' + (options.currentLayout || '') + '\');" icon="view-comfy"></paper-icon-button>';
}
if (options.sortButton) {