mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
stub out channel mapping
This commit is contained in:
parent
36a0eb43e4
commit
a2dbad16f4
21 changed files with 160 additions and 105 deletions
|
@ -316,7 +316,7 @@
|
|||
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnDelete" data-id="' + provider.Id + '" title="' + Globalize.translate('ButtonDelete') + '"><iron-icon icon="delete"></iron-icon></button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" class="btnOptions" data-id="' + provider.Id + '"><iron-icon icon="more-vert"></iron-icon></button>';
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
|
@ -325,11 +325,49 @@
|
|||
|
||||
var elem = $('.providerList', page).html(html);
|
||||
|
||||
$('.btnDelete', elem).on('click', function () {
|
||||
$('.btnOptions', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-id');
|
||||
|
||||
deleteProvider(page, id);
|
||||
showProviderOptions(page, id, this);
|
||||
});
|
||||
}
|
||||
|
||||
function showProviderOptions(page, id, button) {
|
||||
|
||||
var items = [];
|
||||
|
||||
items.push({
|
||||
name: Globalize.translate('ButtonDelete'),
|
||||
id: 'delete'
|
||||
});
|
||||
|
||||
items.push({
|
||||
name: Globalize.translate('MapChannels'),
|
||||
id: 'map'
|
||||
});
|
||||
|
||||
require(['actionsheet'], function (actionsheet) {
|
||||
|
||||
actionsheet.show({
|
||||
items: items,
|
||||
positionTo: button
|
||||
|
||||
}).then(function (id) {
|
||||
|
||||
switch (id) {
|
||||
|
||||
case 'delete':
|
||||
deleteProvider(page, id);
|
||||
break;
|
||||
case 'map':
|
||||
alert('coming soon');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue