mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv page
This commit is contained in:
parent
2a0c84a99d
commit
7e0be1ddca
8 changed files with 100 additions and 56 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -34,11 +34,11 @@
|
|||
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.6",
|
||||
"_release": "1.0.7",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "764d2f12406ac85aa5e66f280163cb3795c16e20"
|
||||
"tag": "v1.0.7",
|
||||
"commit": "129dc6c91e82978b38790061971cbae04f71fc9c"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||
"_target": "~1.0.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -110,15 +110,25 @@ Custom property | Description | Default
|
|||
},
|
||||
|
||||
attached: function() {
|
||||
var trimmedText = Polymer.dom(this).textContent.trim();
|
||||
if (trimmedText === '') {
|
||||
this.$.checkboxLabel.hidden = true;
|
||||
}
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (trimmedText !== '' && !this.getAttribute('aria-label')) {
|
||||
this.setAttribute('aria-label', trimmedText);
|
||||
}
|
||||
this._isReady = true;
|
||||
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (!this.getAttribute('aria-label')) {
|
||||
this.updateAriaLabel();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Update the checkbox aria-label. This is a temporary workaround not
|
||||
* being able to observe changes in <content>
|
||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
||||
*
|
||||
* Call this if you manually change the contents of the checkbox
|
||||
* and want the aria-label to match the new contents.
|
||||
*/
|
||||
updateAriaLabel: function() {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
|
|
|
@ -76,6 +76,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
MockInteractions.tap(c1);
|
||||
});
|
||||
|
||||
test('checkbox label can be updated', function() {
|
||||
Polymer.dom(c1).textContent = 'Batman';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Batman');
|
||||
|
||||
Polymer.dom(c1).textContent = 'Robin';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Robin');
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
|
|
|
@ -185,34 +185,39 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
if (devices.length) {
|
||||
html += '<div class="paperList">';
|
||||
|
||||
for (var i = 0, length = devices.length; i < length; i++) {
|
||||
for (var i = 0, length = devices.length; i < length; i++) {
|
||||
|
||||
var device = devices[i];
|
||||
var device = devices[i];
|
||||
|
||||
var href = 'livetvtunerprovider-' + device.Type + '.html?id=' + device.Id;
|
||||
var href = 'livetvtunerprovider-' + device.Type + '.html?id=' + device.Id;
|
||||
|
||||
html += '<li>';
|
||||
html += '<a href="' + href + '">';
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += '<h3>';
|
||||
html += getTunerName(device.Type);
|
||||
html += '</h3>';
|
||||
html += '<paper-fab class="listAvatar" style="background:#52B54B;" icon="live-tv" item-icon></paper-fab>';
|
||||
|
||||
html += '<p>';
|
||||
html += device.Url;
|
||||
html += '</p>';
|
||||
html += '<paper-item-body two-line>';
|
||||
html += '<a class="clearLink" href="' + href + '">';
|
||||
html += '<div>';
|
||||
html += getTunerName(device.Type);
|
||||
html += '</div>';
|
||||
|
||||
html += '</a>';
|
||||
html += '<a href="#" class="btnDeleteDevice" data-id="' + device.Id + '">';
|
||||
html += '</a>';
|
||||
html += '</li>';
|
||||
html += '<div secondary>';
|
||||
html += device.Url;
|
||||
html += '</div>';
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<paper-icon-button icon="cancel" data-id="' + device.Id + '" title="' + Globalize.translate('ButtonDelete') + '" class="btnDeleteDevice"></paper-icon-button>';
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
var elem = $('.devicesList', page).html(html).trigger('create');
|
||||
var elem = $('.devicesList', page).html(html);
|
||||
|
||||
$('.btnDeleteDevice', elem).on('click', function () {
|
||||
|
||||
|
@ -287,27 +292,34 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
if (providers.length) {
|
||||
html += '<div class="paperList">';
|
||||
|
||||
for (var i = 0, length = providers.length; i < length; i++) {
|
||||
for (var i = 0, length = providers.length; i < length; i++) {
|
||||
|
||||
var provider = providers[i];
|
||||
html += '<li>';
|
||||
html += '<a href="' + getProviderConfigurationUrl(provider.Type) + '?id=' + provider.Id + '">';
|
||||
var provider = providers[i];
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += '<h3>';
|
||||
html += getProviderName(provider.Type);
|
||||
html += '</h3>';
|
||||
html += '<paper-fab class="listAvatar" icon="dvr" item-icon></paper-fab>';
|
||||
|
||||
html += '</a>';
|
||||
html += '<a href="#" class="btnDelete" data-id="' + provider.Id + '">';
|
||||
html += '</a>';
|
||||
html += '</li>';
|
||||
html += '<paper-item-body two-line>';
|
||||
|
||||
html += '<a class="clearLink" href="' + getProviderConfigurationUrl(provider.Type) + '?id=' + provider.Id + '">';
|
||||
|
||||
html += '<div>';
|
||||
html += getProviderName(provider.Type);
|
||||
html += '</div>';
|
||||
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
html += '<paper-icon-button icon="cancel" data-id="' + provider.Id + '" title="' + Globalize.translate('ButtonDelete') + '" class="btnDelete"></paper-icon-button>';
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
var elem = $('.providerList', page).html(html).trigger('create');
|
||||
var elem = $('.providerList', page).html(html);
|
||||
|
||||
$('.btnDelete', elem).on('click', function () {
|
||||
|
||||
|
|
1
dashboard-ui/thirdparty/emby-icons.html
vendored
1
dashboard-ui/thirdparty/emby-icons.html
vendored
|
@ -127,6 +127,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
|
|||
<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z" /></g>
|
||||
<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" /></g>
|
||||
<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z" /></g>
|
||||
<g id="dvr"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 4H5v2h2v-2z" /></g>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>
|
||||
|
|
|
@ -388,7 +388,7 @@ paper-input label, paper-textarea label {
|
|||
}
|
||||
|
||||
.ui-page-theme-a paper-input label, .ui-page-theme-a paper-textarea label {
|
||||
color: #222 !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.ui-page-theme-a .label-is-highlighted label {
|
||||
|
|
|
@ -18417,15 +18417,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
attached: function() {
|
||||
var trimmedText = Polymer.dom(this).textContent.trim();
|
||||
if (trimmedText === '') {
|
||||
this.$.checkboxLabel.hidden = true;
|
||||
}
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (trimmedText !== '' && !this.getAttribute('aria-label')) {
|
||||
this.setAttribute('aria-label', trimmedText);
|
||||
}
|
||||
this._isReady = true;
|
||||
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (!this.getAttribute('aria-label')) {
|
||||
this.updateAriaLabel();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Update the checkbox aria-label. This is a temporary workaround not
|
||||
* being able to observe changes in <content>
|
||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
||||
*
|
||||
* Call this if you manually change the contents of the checkbox
|
||||
* and want the aria-label to match the new contents.
|
||||
*/
|
||||
updateAriaLabel: function() {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
|
@ -18677,6 +18687,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"></path></g>
|
||||
<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"></path></g>
|
||||
<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path></g>
|
||||
<g id="dvr"><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zm-2-9H8v2h11V8zm0 4H8v2h11v-2zM7 8H5v2h2V8zm0 4H5v2h2v-2z"></path></g>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue