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

update buttons

This commit is contained in:
Luke Pulverenti 2016-06-04 20:17:35 -04:00
parent 467ff3657f
commit 3a045a664b
33 changed files with 360 additions and 166 deletions

View file

@ -1,4 +1,4 @@
define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'scrollHelper', 'appStorage', 'connectionManager', 'loading', 'focusManager', 'emby-select', 'listViewStyle', 'paper-icon-button-light', 'css!./../formdialog', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html', 'css!./subtitleeditor'], function (dialogHelper, require, layoutManager, globalize, scrollHelper, appStorage, connectionManager, loading, focusManager) {
define(['dialogHelper', 'require', 'layoutManager', 'globalize', 'scrollHelper', 'appStorage', 'connectionManager', 'loading', 'focusManager', 'emby-select', 'listViewStyle', 'paper-icon-button-light', 'css!./../formdialog', 'html!./../icons/mediainfo.html', 'html!./../icons/nav.html', 'css!./subtitleeditor', 'emby-button'], function (dialogHelper, require, layoutManager, globalize, scrollHelper, appStorage, connectionManager, loading, focusManager) {
var currentItem;
var hasChanges;
@ -400,22 +400,6 @@
});
}
function onSubmitButtonClick(e) {
// Do a fake form submit this the button isn't a real submit button
var fakeSubmit = document.createElement('input');
fakeSubmit.setAttribute('type', 'submit');
fakeSubmit.style.display = 'none';
var form = parentWithClass(this, 'subtitleSearchForm');
form.appendChild(fakeSubmit);
fakeSubmit.click();
// Seeing issues in smart tv browsers where the form does not get submitted if the button is removed prior to the submission actually happening
setTimeout(function () {
form.removeChild(fakeSubmit);
}, 500);
}
function showEditorInternal(itemId, serverId, template) {
hasChanges = false;
@ -469,8 +453,6 @@
dialogHelper.close(dlg);
});
btnSubmit.addEventListener('click', onSubmitButtonClick);
return new Promise(function (resolve, reject) {
dlg.addEventListener('close', function () {

View file

@ -17,7 +17,7 @@
</div>
<button type="submit" is="paper-icon-button-light" title="${Search}" class="btnSearchSubtitles" style="flex-shrink: 0;"><iron-icon icon="search"></iron-icon></button>
</div>
<paper-button raised class="btnSubmit block">${Search}</paper-button>
<button is="emby-button" type="submit" class="raised btnSubmit block">${Search}</button>
</form>
<br />
<div class="subtitleResults"></div>