From ccb6ab3799a1ac870ca120aa00175e20deb5f925 Mon Sep 17 00:00:00 2001 From: softworkz Date: Sat, 21 May 2016 21:01:54 +0200 Subject: [PATCH 001/126] Fix for ImageEditor.js --- dashboard-ui/components/imageeditor/imageeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard-ui/components/imageeditor/imageeditor.js b/dashboard-ui/components/imageeditor/imageeditor.js index 4ec7a1904a..ebb2146c39 100644 --- a/dashboard-ui/components/imageeditor/imageeditor.js +++ b/dashboard-ui/components/imageeditor/imageeditor.js @@ -184,7 +184,7 @@ if (images.length) { $('#screenshotsContainer', page).show(); - renderImages(page, item, images, imageProviders, $('#screenshots', page)); + renderImages(page, item, images, imageProviders, page.querySelector('#screenshots')); } else { $('#screenshotsContainer', page).hide(); } From 6f2b1c2ef8eb64cba998fea4c9b7e821bdf6895f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 21 May 2016 22:28:47 -0400 Subject: [PATCH 002/126] use shared collectioneditor --- .../collectioneditor/collectioneditor.js | 264 ++++++++++++++++++ .../emby-select/emby-select.css | 44 +++ .../emby-select/emby-select.js | 112 ++++++++ .../collectioneditor/collectioneditor.js | 239 ---------------- dashboard-ui/scripts/librarybrowser.js | 7 +- dashboard-ui/scripts/librarylist.js | 13 +- dashboard-ui/scripts/moviecollections.js | 8 +- dashboard-ui/scripts/site.js | 3 +- .../thirdparty/paper-button-style.css | 6 +- 9 files changed, 447 insertions(+), 249 deletions(-) create mode 100644 dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js create mode 100644 dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css create mode 100644 dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js delete mode 100644 dashboard-ui/components/collectioneditor/collectioneditor.js diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js new file mode 100644 index 0000000000..d16a5b0fa9 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js @@ -0,0 +1,264 @@ +define(['dialogHelper', 'loading', 'connectionManager', 'embyRouter', 'globalize', 'paper-checkbox', 'paper-input', 'paper-icon-button-light', 'emby-select'], function (dialogHelper, loading, connectionManager, embyRouter, globalize) { + + var currentServerId; + + function parentWithClass(elem, className) { + + while (!elem.classList || !elem.classList.contains(className)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function onSubmit(e) { + loading.show(); + + var panel = parentWithClass(this, 'dialog'); + + var collectionId = panel.querySelector('#selectCollectionToAddTo').value; + + var apiClient = connectionManager.getApiClient(currentServerId); + + if (collectionId) { + addToCollection(apiClient, panel, collectionId); + } else { + createCollection(apiClient, panel); + } + + e.preventDefault(); + return false; + } + + function createCollection(apiClient, dlg) { + + var url = apiClient.getUrl("Collections", { + + Name: dlg.querySelector('#txtNewCollectionName').value, + IsLocked: !dlg.querySelector('#chkEnableInternetMetadata').checked, + Ids: dlg.querySelector('.fldSelectedItemIds').value || '' + + //ParentId: getParameterByName('parentId') || LibraryMenu.getTopParentId() + + }); + + apiClient.ajax({ + type: "POST", + url: url, + dataType: "json" + + }).then(function (result) { + + loading.hide(); + + var id = result.Id; + + dialogHelper.close(dlg); + redirectToCollection(apiClient, id); + + }); + } + + function redirectToCollection(apiClient, id) { + + apiClient.getItem(apiClient.getCurrentUserId(), id).then(function (item) { + + embyRouter.showItem(item); + }); + } + + function addToCollection(apiClient, dlg, id) { + + var url = apiClient.getUrl("Collections/" + id + "/Items", { + + Ids: dlg.querySelector('.fldSelectedItemIds').value || '' + }); + + apiClient.ajax({ + type: "POST", + url: url + + }).then(function () { + + loading.hide(); + + dialogHelper.close(dlg); + + require(['toast'], function (toast) { + toast(globalize.translate('MessageItemsAdded')); + }); + }); + } + + function onDialogClosed() { + + loading.hide(); + } + + function triggerChange(select) { + select.dispatchEvent(new CustomEvent('change', {})); + } + + function populateCollections(panel) { + + loading.show(); + + var select = panel.querySelector('#selectCollectionToAddTo'); + + panel.querySelector('.newCollectionInfo').classList.add('hide'); + + var options = { + + Recursive: true, + IncludeItemTypes: "BoxSet", + SortBy: "SortName" + }; + + var apiClient = connectionManager.getApiClient(currentServerId); + apiClient.getItems(apiClient.getCurrentUserId(), options).then(function (result) { + + var html = ''; + + html += ''; + + html += result.Items.map(function (i) { + + return ''; + }); + + select.innerHTML = html; + select.value = ''; + triggerChange(select); + + loading.hide(); + }); + } + + function getEditorHtml() { + + var html = ''; + + html += '
'; + + html += '
'; + html += globalize.translate('CreateCollectionHelp'); + html += '
'; + + html += '
'; + html += '
'; + html += '
'; + html += ''; + html += '
'; + + html += '
'; + + html += '
'; + html += ''; + html += '
' + globalize.translate('NewCollectionNameExample') + '
'; + html += '
'; + + html += '
'; + html += '
'; + + html += '
'; + html += '' + globalize.translate('OptionSearchForInternetMetadata') + ''; + html += '
'; + + // newCollectionInfo + html += '
'; + + html += '
'; + html += '
'; + html += ''; + html += '
'; + + html += ''; + + html += '
'; + + return html; + } + + function initEditor(content, items) { + + content.querySelector('#selectCollectionToAddTo').addEventListener('change', function () { + if (this.value) { + content.querySelector('.newCollectionInfo').classList.add('hide'); + content.querySelector('#txtNewCollectionName').removeAttribute('required'); + } else { + content.querySelector('.newCollectionInfo').classList.remove('hide'); + content.querySelector('#txtNewCollectionName').setAttribute('required', 'required'); + } + }); + + content.querySelector('.newCollectionForm').addEventListener('submit', onSubmit); + + content.querySelector('.fldSelectedItemIds', content).value = items.join(','); + + if (items.length) { + content.querySelector('.fldSelectCollection').classList.remove('hide'); + populateCollections(content); + } else { + content.querySelector('.fldSelectCollection').classList.add('hide'); + + var selectCollectionToAddTo = content.querySelector('#selectCollectionToAddTo'); + selectCollectionToAddTo.innerHTML = ''; + selectCollectionToAddTo.value = ''; + triggerChange(selectCollectionToAddTo); + } + } + + function collectioneditor() { + + var self = this; + + self.show = function (options) { + + var items = options.items || {}; + currentServerId = options.serverId; + + var dlg = dialogHelper.createDialog({ + size: 'small', + removeOnClose: true + }); + + dlg.classList.add('ui-body-b'); + dlg.classList.add('background-theme-b'); + + var html = ''; + var title = items.length ? globalize.translate('HeaderAddToCollection') : globalize.translate('HeaderNewCollection'); + + html += '
'; + html += ''; + html += '
'; + html += title; + html += '
'; + + html += '' + globalize.translate('ButtonHelp') + ''; + + html += '
'; + + html += getEditorHtml(); + + dlg.innerHTML = html; + document.body.appendChild(dlg); + + initEditor(dlg, items); + + dlg.addEventListener('close', onDialogClosed); + + dialogHelper.open(dlg); + + dlg.querySelector('.btnCancel').addEventListener('click', function () { + + dialogHelper.close(dlg); + }); + }; + } + + return collectioneditor; +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css new file mode 100644 index 0000000000..2b1993d4f0 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css @@ -0,0 +1,44 @@ +[is="emby-select"] { + display: block; + margin: 0; + margin-bottom: 0 !important; + background: none; + border: 1px solid rgb(221, 221, 221); + border-width: 0 0 1px 0; + /* Prefixed box-sizing rules necessary for older browsers */ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + /* Remove select styling */ + /* Font size must the 16px or larger to prevent iOS page zoom on focus */ + font-size: inherit; + /* General select styles: change as needed */ + font-family: inherit; + font-weight: bold; + color: inherit; + padding: .6em .8em .3em 0; + cursor: pointer; + outline: none !important; +} + +.selectLabel { + display: block; +} + +.selectLabelFocus { + color: #52B54B; +} + +.emby-select-selectionbar { + height: 2px; + transform: scale(.01); + transition: transform .2s ease-out; + position: relative; + top: -1px; + margin-bottom: .5em; +} + +[is="emby-select"]:focus + .emby-select-selectionbar { + background-color: #52B54B; + transform: none; +} diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js new file mode 100644 index 0000000000..4f41cb6e1d --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js @@ -0,0 +1,112 @@ +define(['layoutManager', 'browser', 'actionsheet', 'css!./emby-select'], function (layoutManager, browser, actionsheet) { + + var EmbySelectPrototype = Object.create(HTMLSelectElement.prototype); + + function enableNativeMenu() { + + // Take advantage of the native input methods + if (browser.tv) { + return true; + } + + if (layoutManager.tv) { + return false; + } + + return true; + } + + function showActionSheeet(select) { + + actionsheet.show({ + items: select.options, + positionTo: select + + }).then(function (value) { + select.value = value; + }); + } + + function getLabel(select) { + var elem = select.previousSibling; + while (elem && elem.tagName != 'LABEL') { + elem = elem.previousSibling; + } + return elem; + } + + function onFocus(e) { + var label = getLabel(this); + if (label) { + label.classList.add('selectLabelFocus'); + } + } + + function onBlur(e) { + var label = getLabel(this); + if (label) { + label.classList.remove('selectLabelFocus'); + } + } + + function onMouseDown(e) { + + if (!enableNativeMenu()) { + e.preventDefault(); + showActionSheeet(this); + } + } + + function onKeyDown(e) { + + switch (e.keyCode) { + + case 13: + if (!enableNativeMenu()) { + e.preventDefault(); + showActionSheeet(this); + } + return; + case 37: + case 38: + case 39: + case 40: + if (layoutManager.tv) { + e.preventDefault(); + } + return; + default: + break; + } + } + + EmbySelectPrototype.createdCallback = function () { + + if (!this.id) { + this.id = 'select' + new Date().getTime(); + } + this.addEventListener('mousedown', onMouseDown); + this.addEventListener('keydown', onKeyDown); + this.addEventListener('focus', onFocus); + this.addEventListener('keydown', onBlur); + }; + + EmbySelectPrototype.attachedCallback = function () { + + var label = this.ownerDocument.createElement('label'); + label.innerHTML = this.getAttribute('label') || ''; + label.classList.add('selectLabel'); + label.htmlFor = this.id; + this.parentNode.insertBefore(label, this); + + var div = document.createElement('div'); + div.classList.add('emby-select-selectionbar'); + div.innerHTML = '
'; + this.parentNode.insertBefore(div, this.nextSibling); + }; + + document.registerElement('emby-select', { + prototype: EmbySelectPrototype, + extends: 'select' + }); +}); \ No newline at end of file diff --git a/dashboard-ui/components/collectioneditor/collectioneditor.js b/dashboard-ui/components/collectioneditor/collectioneditor.js deleted file mode 100644 index d82b2d984e..0000000000 --- a/dashboard-ui/components/collectioneditor/collectioneditor.js +++ /dev/null @@ -1,239 +0,0 @@ -define(['dialogHelper', 'jQuery', 'paper-checkbox', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $) { - - function onSubmit() { - Dashboard.showLoadingMsg(); - - var panel = $(this).parents('.dialog')[0]; - - var collectionId = $('#selectCollectionToAddTo', panel).val(); - - if (collectionId) { - addToCollection(panel, collectionId); - } else { - createCollection(panel); - } - - return false; - } - - function createCollection(dlg) { - - var url = ApiClient.getUrl("Collections", { - - Name: $('#txtNewCollectionName', dlg).val(), - IsLocked: !$('#chkEnableInternetMetadata', dlg).checked(), - Ids: $('.fldSelectedItemIds', dlg).val() || '' - - //ParentId: getParameterByName('parentId') || LibraryMenu.getTopParentId() - - }); - - ApiClient.ajax({ - type: "POST", - url: url, - dataType: "json" - - }).then(function (result) { - - Dashboard.hideLoadingMsg(); - - var id = result.Id; - - dialogHelper.close(dlg); - redirectToCollection(id); - - }); - } - - function redirectToCollection(id) { - - var context = getParameterByName('context'); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).then(function (item) { - - Dashboard.navigate(LibraryBrowser.getHref(item, context)); - - }); - } - - function addToCollection(dlg, id) { - - var url = ApiClient.getUrl("Collections/" + id + "/Items", { - - Ids: $('.fldSelectedItemIds', dlg).val() || '' - }); - - ApiClient.ajax({ - type: "POST", - url: url - - }).then(function () { - - Dashboard.hideLoadingMsg(); - - dialogHelper.close(dlg); - - require(['toast'], function (toast) { - toast(Globalize.translate('MessageItemsAdded')); - }); - }); - } - - function onDialogClosed() { - - $(this).remove(); - Dashboard.hideLoadingMsg(); - } - - function populateCollections(panel) { - - Dashboard.showLoadingMsg(); - - var select = $('#selectCollectionToAddTo', panel); - - $('.newCollectionInfo', panel).hide(); - - var options = { - - Recursive: true, - IncludeItemTypes: "BoxSet", - SortBy: "SortName" - }; - - ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) { - - var html = ''; - - html += ''; - - html += result.Items.map(function (i) { - - return ''; - }); - - select.html(html).val('').trigger('change'); - - Dashboard.hideLoadingMsg(); - }); - } - - function getEditorHtml() { - - var html = ''; - - html += '
'; - - html += '
'; - html += Globalize.translate('CreateCollectionHelp'); - html += '
'; - - html += '
'; - html += '
'; - html += '
'; - html += ''; - html += ''; - html += '
'; - - html += '
'; - - html += '
'; - html += ''; - html += '
' + Globalize.translate('NewCollectionNameExample') + '
'; - html += '
'; - - html += '
'; - html += '
'; - - html += '
'; - html += '' + Globalize.translate('OptionSearchForInternetMetadata') + ''; - html += '
'; - - // newCollectionInfo - html += '
'; - - html += '
'; - html += '
'; - html += ''; - html += '
'; - - html += ''; - - html += '
'; - - return html; - } - - function initEditor(content, items) { - - $('#selectCollectionToAddTo', content).on('change', function () { - - if (this.value) { - $('.newCollectionInfo', content).hide(); - $('#txtNewCollectionName', content).removeAttr('required'); - } else { - $('.newCollectionInfo', content).show(); - $('#txtNewCollectionName', content).attr('required', 'required'); - } - }); - - $('.newCollectionForm', content).off('submit', onSubmit).on('submit', onSubmit); - - $('.fldSelectedItemIds', content).val(items.join(',')); - - if (items.length) { - $('.fldSelectCollection', content).show(); - populateCollections(content); - } else { - $('.fldSelectCollection', content).hide(); - $('#selectCollectionToAddTo', content).html('').val('').trigger('change'); - } - } - - function collectioneditor() { - - var self = this; - - self.show = function (items) { - - items = items || []; - - var dlg = dialogHelper.createDialog({ - size: 'small' - }); - - dlg.classList.add('ui-body-b'); - dlg.classList.add('background-theme-b'); - - var html = ''; - var title = items.length ? Globalize.translate('HeaderAddToCollection') : Globalize.translate('HeaderNewCollection'); - - html += '
'; - html += ''; - html += '
'; - html += title; - html += '
'; - - html += '' + Globalize.translate('ButtonHelp') + ''; - - html += '
'; - - html += getEditorHtml(); - - dlg.innerHTML = html; - document.body.appendChild(dlg); - - initEditor(dlg, items); - - $(dlg).on('close', onDialogClosed); - - dialogHelper.open(dlg); - - $('.btnCancel', dlg).on('click', function () { - - dialogHelper.close(dlg); - }); - }; - } - - return collectioneditor; -}); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 2a5616e31a..21fffed159 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -929,9 +929,12 @@ }); break; case 'addtocollection': - require(['collectioneditor'], function (collectioneditor) { + require(['collectionEditor'], function (collectionEditor) { - new collectioneditor().show([itemId]); + new collectionEditor().show({ + items: [itemId], + serverId: serverId + }); }); break; case 'playlist': diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 76b192d412..88d6865d52 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -494,9 +494,12 @@ switch (id) { case 'addtocollection': - require(['collectioneditor'], function (collectioneditor) { + require(['collectionEditor'], function (collectionEditor) { - new collectioneditor().show([itemId]); + new collectionEditor().show({ + items: [itemId], + serverId: serverId + }); }); break; case 'playlist': @@ -1232,9 +1235,11 @@ switch (id) { case 'addtocollection': - require(['collectioneditor'], function (collectioneditor) { + require(['collectionEditor'], function (collectionEditor) { - new collectioneditor().show(items); + new collectionEditor().show({ + items: items + }); }); hideSelections(); break; diff --git a/dashboard-ui/scripts/moviecollections.js b/dashboard-ui/scripts/moviecollections.js index 28c154314b..6d5a284daf 100644 --- a/dashboard-ui/scripts/moviecollections.js +++ b/dashboard-ui/scripts/moviecollections.js @@ -189,9 +189,13 @@ // The button is created dynamically $('.btnNewCollection', tabContent).on('click', function () { - require(['collectioneditor'], function (collectioneditor) { + require(['collectionEditor'], function (collectionEditor) { - new collectioneditor().show(); + var serverId = ApiClient.serverInfo().Id; + new collectionEditor().show({ + items: [], + serverId: serverId + }); }); }); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index e00bdadf14..9c6463b672 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1709,7 +1709,6 @@ var AppInfo = {}; ironCardList: 'components/ironcardlist/ironcardlist', scrollThreshold: 'components/scrollthreshold', directorybrowser: 'components/directorybrowser/directorybrowser', - collectioneditor: 'components/collectioneditor/collectioneditor', playlisteditor: 'components/playlisteditor/playlisteditor', medialibrarycreator: 'components/medialibrarycreator/medialibrarycreator', medialibraryeditor: 'components/medialibraryeditor/medialibraryeditor', @@ -1768,11 +1767,13 @@ var AppInfo = {}; define("libjass", [bowerPath + "/libjass/libjass", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency); + define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency); define("recordingCreator", [embyWebComponentsBowerPath + "/recordingcreator/recordingcreator"], returnFirstDependency); define("recordingEditor", [embyWebComponentsBowerPath + "/recordingcreator/recordingeditor"], returnFirstDependency); define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency); define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency); define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency); + define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency); define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency); diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 5c4609ba06..25d9978ebc 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -432,7 +432,11 @@ paper-input label, paper-textarea label { margin-bottom: .5em; } -.ui-body-b .paper-input-container-0 .input-content.paper-input-container label, .ui-body-b .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-b paper-textarea label, .ui-body-b .selectLabel, .ui-body-b .paperListLabel, .ui-body-b .fieldDescription { +.ui-body-b .paper-input-container-0 .input-content.paper-input-container label, .ui-body-b .paper-input-container-0 .input-content.paper-input-container .paper-input-label, .ui-body-b paper-textarea label, .ui-body-b .paperListLabel, .ui-body-b .fieldDescription { + color: #ccc; +} + +.ui-body-b .selectLabel:not(.selectLabelFocus) { color: #ccc; } From 69fad5e57d78285e7c5a15ab2630f5593bb21dbe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 21 May 2016 22:29:03 -0400 Subject: [PATCH 003/126] update components --- .../emby-apiclient/.bower.json | 8 +- .../emby-apiclient/connectionmanager.js | 2 +- .../emby-webcomponents/.bower.json | 8 +- .../actionsheet/actionsheet.js | 27 +- .../fingerprintjs2/.bower.json | 8 +- .../fingerprintjs2/CONTRIBUTING.md | 2 +- .../fingerprintjs2/dist/fingerprint2.min.js | 4 +- .../fingerprintjs2/fingerprint2.js | 230 +++++++++++------- .../fingerprintjs2/package.json | 2 +- 9 files changed, 179 insertions(+), 112 deletions(-) diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json index afe0e821ca..df50e8475d 100644 --- a/dashboard-ui/bower_components/emby-apiclient/.bower.json +++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.55", - "_release": "1.1.55", + "version": "1.1.56", + "_release": "1.1.56", "_resolution": { "type": "version", - "tag": "1.1.55", - "commit": "c985db6d4a2c6013dcb3bcb200532144a909732c" + "tag": "1.1.56", + "commit": "f0c16b99c8523abcbd5f514d938e520448d6349d" }, "_source": "https://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_target": "^1.1.51", diff --git a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js index 45eed983de..f53991454e 100644 --- a/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js +++ b/dashboard-ui/bower_components/emby-apiclient/connectionmanager.js @@ -215,7 +215,7 @@ return connectUser; }; - var minServerVersion = '3.0.5818'; + var minServerVersion = '3.0.5821'; self.minServerVersion = function (val) { if (val) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 20ce51b85c..c11a054e60 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.52", - "_release": "1.3.52", + "version": "1.3.54", + "_release": "1.3.54", "_resolution": { "type": "version", - "tag": "1.3.52", - "commit": "c00f1f1e92a8572cd01145ad02137e3eb74442fd" + "tag": "1.3.54", + "commit": "5b18c68f85be83718bb5c653da5baeed956bb2bb" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index e3f7349f53..d9e6ece16b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -132,17 +132,20 @@ html += '
'; - options.items.forEach(function (o) { - o.ironIcon = o.selected ? 'nav:check' : null; - }); + var i, length, option; + var renderIcon = false; + for (i = 0, length = options.items.length; i < length; i++) { - var itemsWithIcons = options.items.filter(function (o) { - return o.ironIcon; - }); + option = options.items[i]; + option.ironIcon = option.selected ? 'nav:check' : null; + + if (option.ironIcon) { + renderIcon = true; + } + } // If any items have an icon, give them all an icon just to make sure they're all lined up evenly - var renderIcon = itemsWithIcons.length; - var center = options.title && (!itemsWithIcons.length /*|| itemsWithIcons.length != options.items.length*/); + var center = options.title && (!renderIcon /*|| itemsWithIcons.length != options.items.length*/); if (center) { dlg.classList.add('centered'); @@ -150,12 +153,12 @@ var itemTagName = 'paper-button'; - for (var i = 0, length = options.items.length; i < length; i++) { + for (i = 0, length = options.items.length; i < length; i++) { - var option = options.items[i]; + option = options.items[i]; var autoFocus = option.selected ? ' autoFocus' : ''; - html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + option.id + '">'; + html += '<' + itemTagName + autoFocus + ' class="actionSheetMenuItem" data-id="' + (option.id || option.value) + '">'; if (option.ironIcon) { html += ''; @@ -163,7 +166,7 @@ else if (renderIcon && !center) { html += ''; } - html += '
' + option.name + '
'; + html += '
' + (option.name || option.textContent || option.innerText) + '
'; html += ''; } diff --git a/dashboard-ui/bower_components/fingerprintjs2/.bower.json b/dashboard-ui/bower_components/fingerprintjs2/.bower.json index f88ebae8e7..7dbbb9c2c3 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/.bower.json +++ b/dashboard-ui/bower_components/fingerprintjs2/.bower.json @@ -23,12 +23,12 @@ "spec" ], "homepage": "https://github.com/Valve/fingerprintjs2", - "version": "1.1.4", - "_release": "1.1.4", + "version": "1.2.0", + "_release": "1.2.0", "_resolution": { "type": "version", - "tag": "1.1.4", - "commit": "ae5719db3d942a1a84ab43b707d4d1c34138934e" + "tag": "1.2.0", + "commit": "d5821a481d5c4d4ca348902e3a95b09de2a8702a" }, "_source": "https://github.com/Valve/fingerprintjs2.git", "_target": "^1.1.3", diff --git a/dashboard-ui/bower_components/fingerprintjs2/CONTRIBUTING.md b/dashboard-ui/bower_components/fingerprintjs2/CONTRIBUTING.md index 33049a1650..7b48355048 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/CONTRIBUTING.md +++ b/dashboard-ui/bower_components/fingerprintjs2/CONTRIBUTING.md @@ -13,7 +13,7 @@ Include in the issue: * Include library call code (I need all options you used when calling the library function) ## Want to add a feature / contribute? - +* Make sure the issue/suggestion does not exist by searching existing issues * Fork the project and make the required changes in it (don't forget to add specs) * PRs w/out specs will not be accepted * Run `gulp` to catch stylistic errors and produce the minified version. diff --git a/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js b/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js index c2a5d2c020..39b5c1e12f 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js +++ b/dashboard-ui/bower_components/fingerprintjs2/dist/fingerprint2.min.js @@ -1,2 +1,2 @@ -!function(e,t,i){"use strict";"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define(i):t[e]=i()}("Fingerprint2",this,function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError("'this' is null or undefined");var a=Object(this),r=a.length>>>0;if(0===r)return-1;var n=+t||0;if(Math.abs(n)===1/0&&(n=0),n>=r)return-1;for(i=Math.max(n>=0?n:r-Math.abs(n),0);r>i;){if(i in a&&a[i]===e)return i;i++}return-1});var e=function(e){var t={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i]};this.options=this.extend(e,t),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},log:function(e){window.console&&console.log(e)},get:function(e){var t=[];t=this.userAgentKey(t),t=this.languageKey(t),t=this.colorDepthKey(t),t=this.screenResolutionKey(t),t=this.availableScreenResolutionKey(t),t=this.timezoneOffsetKey(t),t=this.sessionStorageKey(t),t=this.localStorageKey(t),t=this.indexedDbKey(t),t=this.addBehaviorKey(t),t=this.openDatabaseKey(t),t=this.cpuClassKey(t),t=this.platformKey(t),t=this.doNotTrackKey(t),t=this.pluginsKey(t),t=this.canvasKey(t),t=this.webglKey(t),t=this.adBlockKey(t),t=this.hasLiedLanguagesKey(t),t=this.hasLiedResolutionKey(t),t=this.hasLiedOsKey(t),t=this.hasLiedBrowserKey(t),t=this.touchSupportKey(t);var i=this;this.fontsKey(t,function(t){var a=[];i.each(t,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=i.x64hash128(a.join("~~~"),31);return e(r,t)})},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth}),e},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e},openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r="mmmmmmmmmmlli",n="72px",o=document.getElementsByTagName("body")[0],s=document.createElement("span");s.style.position="absolute",s.style.left="-9999px",s.style.fontSize=n,s.innerHTML=r;for(var l={},h={},u=0,d=a.length;d>u;u++)s.style.fontFamily=a[u],o.appendChild(s),l[a[u]]=s.offsetWidth,h[a[u]]=s.offsetHeight,o.removeChild(s);var c=function(e){for(var t=!1,i=0,r=a.length;r>i;i++){s.style.fontFamily=e+","+a[i],o.appendChild(s);var n=s.offsetWidth!==l[a[i]]||s.offsetHeight!==h[a[i]];o.removeChild(s),t=t||n}return t},g=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],p=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];i.options.extendedJsFonts&&(g=g.concat(p));for(var f=[],m=0,S=g.length;S>m;m++)c(g[m])&&f.push(g[m]);e.push({key:"js_fonts",value:f}),t(e)},1)},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?this.options.excludeIEPlugins||e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;i>t;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.namet;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){return!!window.indexedDB},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.7)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION)),e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.setAttribute("id","ads");try{return document.body.appendChild(e),!document.getElementById("ads")}catch(t){return!1}},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e?!0:(a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e?!0:(a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e?!0:0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e?!0:"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName?!0:!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;r>a;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:32>t?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:32>t?[e[0]<>>32-t,e[1]<>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;a>u;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48));case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h), -s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.1.4",e}); \ No newline at end of file +!function(e,t,i){"use strict";"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define(i):t[e]=i()}("Fingerprint2",this,function(){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var i;if(null==this)throw new TypeError("'this' is null or undefined");var a=Object(this),r=a.length>>>0;if(0===r)return-1;var n=+t||0;if(Math.abs(n)===1/0&&(n=0),n>=r)return-1;for(i=Math.max(n>=0?n:r-Math.abs(n),0);r>i;){if(i in a&&a[i]===e)return i;i++}return-1});var e=function(e){var t={swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",detectScreenOrientation:!0,sortPluginsFor:[/palemoon/i]};this.options=this.extend(e,t),this.nativeForEach=Array.prototype.forEach,this.nativeMap=Array.prototype.map};return e.prototype={extend:function(e,t){if(null==e)return t;for(var i in e)null!=e[i]&&t[i]!==e[i]&&(t[i]=e[i]);return t},log:function(e){window.console&&console.log(e)},get:function(e){var t=[];t=this.userAgentKey(t),t=this.languageKey(t),t=this.colorDepthKey(t),t=this.screenResolutionKey(t),t=this.availableScreenResolutionKey(t),t=this.timezoneOffsetKey(t),t=this.sessionStorageKey(t),t=this.localStorageKey(t),t=this.indexedDbKey(t),t=this.addBehaviorKey(t),t=this.openDatabaseKey(t),t=this.cpuClassKey(t),t=this.platformKey(t),t=this.doNotTrackKey(t),t=this.pluginsKey(t),t=this.canvasKey(t),t=this.webglKey(t),t=this.adBlockKey(t),t=this.hasLiedLanguagesKey(t),t=this.hasLiedResolutionKey(t),t=this.hasLiedOsKey(t),t=this.hasLiedBrowserKey(t),t=this.touchSupportKey(t);var i=this;this.fontsKey(t,function(t){var a=[];i.each(t,function(e){var t=e.value;"undefined"!=typeof e.value.join&&(t=e.value.join(";")),a.push(t)});var r=i.x64hash128(a.join("~~~"),31);return e(r,t)})},userAgentKey:function(e){return this.options.excludeUserAgent||e.push({key:"user_agent",value:this.getUserAgent()}),e},getUserAgent:function(){return navigator.userAgent},languageKey:function(e){return this.options.excludeLanguage||e.push({key:"language",value:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||""}),e},colorDepthKey:function(e){return this.options.excludeColorDepth||e.push({key:"color_depth",value:screen.colorDepth}),e},screenResolutionKey:function(e){return this.options.excludeScreenResolution?e:this.getScreenResolution(e)},getScreenResolution:function(e){var t;return t=this.options.detectScreenOrientation&&screen.height>screen.width?[screen.height,screen.width]:[screen.width,screen.height],"undefined"!=typeof t&&e.push({key:"resolution",value:t}),e},availableScreenResolutionKey:function(e){return this.options.excludeAvailableScreenResolution?e:this.getAvailableScreenResolution(e)},getAvailableScreenResolution:function(e){var t;return screen.availWidth&&screen.availHeight&&(t=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]),"undefined"!=typeof t&&e.push({key:"available_resolution",value:t}),e},timezoneOffsetKey:function(e){return this.options.excludeTimezoneOffset||e.push({key:"timezone_offset",value:(new Date).getTimezoneOffset()}),e},sessionStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasSessionStorage()&&e.push({key:"session_storage",value:1}),e},localStorageKey:function(e){return!this.options.excludeSessionStorage&&this.hasLocalStorage()&&e.push({key:"local_storage",value:1}),e},indexedDbKey:function(e){return!this.options.excludeIndexedDB&&this.hasIndexedDB()&&e.push({key:"indexed_db",value:1}),e},addBehaviorKey:function(e){return document.body&&!this.options.excludeAddBehavior&&document.body.addBehavior&&e.push({key:"add_behavior",value:1}),e},openDatabaseKey:function(e){return!this.options.excludeOpenDatabase&&window.openDatabase&&e.push({key:"open_database",value:1}),e},cpuClassKey:function(e){return this.options.excludeCpuClass||e.push({key:"cpu_class",value:this.getNavigatorCpuClass()}),e},platformKey:function(e){return this.options.excludePlatform||e.push({key:"navigator_platform",value:this.getNavigatorPlatform()}),e},doNotTrackKey:function(e){return this.options.excludeDoNotTrack||e.push({key:"do_not_track",value:this.getDoNotTrack()}),e},canvasKey:function(e){return!this.options.excludeCanvas&&this.isCanvasSupported()&&e.push({key:"canvas",value:this.getCanvasFp()}),e},webglKey:function(e){return this.options.excludeWebGL?e:this.isWebGlSupported()?(e.push({key:"webgl",value:this.getWebglFp()}),e):e},adBlockKey:function(e){return this.options.excludeAdBlock||e.push({key:"adblock",value:this.getAdBlock()}),e},hasLiedLanguagesKey:function(e){return this.options.excludeHasLiedLanguages||e.push({key:"has_lied_languages",value:this.getHasLiedLanguages()}),e},hasLiedResolutionKey:function(e){return this.options.excludeHasLiedResolution||e.push({key:"has_lied_resolution",value:this.getHasLiedResolution()}),e},hasLiedOsKey:function(e){return this.options.excludeHasLiedOs||e.push({key:"has_lied_os",value:this.getHasLiedOs()}),e},hasLiedBrowserKey:function(e){return this.options.excludeHasLiedBrowser||e.push({key:"has_lied_browser",value:this.getHasLiedBrowser()}),e},fontsKey:function(e,t){return this.options.excludeJsFonts?this.flashFontsKey(e,t):this.jsFontsKey(e,t)},flashFontsKey:function(e,t){return this.options.excludeFlashFonts?t(e):this.hasSwfObjectLoaded()&&this.hasMinFlashInstalled()?"undefined"==typeof this.options.swfPath?t(e):void this.loadSwfAndDetectFonts(function(i){e.push({key:"swf_fonts",value:i.join(";")}),t(e)}):t(e)},jsFontsKey:function(e,t){var i=this;return setTimeout(function(){var a=["monospace","sans-serif","serif"],r=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Garamond","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"],n=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];i.options.extendedJsFonts&&(r=r.concat(n));var o="mmmmmmmmmmlli",s="72px",l=document.getElementsByTagName("body")[0],h=document.createElement("div"),u=document.createElement("div"),d={},c={},g=function(){var e=document.createElement("span");return e.style.position="absolute",e.style.left="-9999px",e.style.fontSize=s,e.innerHTML=o,e},p=function(e,t){var i=g();return i.style.fontFamily=e+","+t,i},f=function(){for(var e=[],t=0,i=a.length;i>t;t++){var r=g();r.style.fontFamily=a[t],h.appendChild(r),e.push(r)}return e},m=function(){for(var e={},t=0,i=r.length;i>t;t++){for(var n=[],o=0,s=a.length;s>o;o++){var l=p(r[t],a[o]);u.appendChild(l),n.push(l)}e[r[t]]=n}return e},S=function(e){for(var t=!1,i=0;ix;x++)d[a[x]]=T[x].offsetWidth,c[a[x]]=T[x].offsetHeight;var v=m();l.appendChild(u);for(var A=[],E=0,C=r.length;C>E;E++)S(v[r[E]])&&A.push(r[E]);l.removeChild(u),l.removeChild(h),e.push({key:"js_fonts",value:A}),t(e)},1)},pluginsKey:function(e){return this.options.excludePlugins||(this.isIE()?this.options.excludeIEPlugins||e.push({key:"ie_plugins",value:this.getIEPlugins()}):e.push({key:"regular_plugins",value:this.getRegularPlugins()})),e},getRegularPlugins:function(){for(var e=[],t=0,i=navigator.plugins.length;i>t;t++)e.push(navigator.plugins[t]);return this.pluginsShouldBeSorted()&&(e=e.sort(function(e,t){return e.name>t.name?1:e.namet;t++){var a=this.options.sortPluginsFor[t];if(navigator.userAgent.match(a)){e=!0;break}}return e},touchSupportKey:function(e){return this.options.excludeTouchSupport||e.push({key:"touch_support",value:this.getTouchSupport()}),e},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(e){return!0}},hasIndexedDB:function(){return!!window.indexedDB},getNavigatorCpuClass:function(){return navigator.cpuClass?navigator.cpuClass:"unknown"},getNavigatorPlatform:function(){return navigator.platform?navigator.platform:"unknown"},getDoNotTrack:function(){return navigator.doNotTrack?navigator.doNotTrack:"unknown"},getTouchSupport:function(){var e=0,t=!1;"undefined"!=typeof navigator.maxTouchPoints?e=navigator.maxTouchPoints:"undefined"!=typeof navigator.msMaxTouchPoints&&(e=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),t=!0}catch(i){}var a="ontouchstart"in window;return[e,t,a]},getCanvasFp:function(){var e=[],t=document.createElement("canvas");t.width=2e3,t.height=200,t.style.display="inline";var i=t.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(i.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",this.options.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.7)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),e.push("canvas fp:"+t.toDataURL()),e.join("~")},getWebglFp:function(){var e,t=function(t){return e.clearColor(0,0,0,1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"},i=function(e){var t,i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic");return i?(t=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT),0===t&&(t=2),t):null};if(e=this.getWebglCanvas(),!e)return null;var a=[],r="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",n="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",o=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,o);var s=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o.itemSize=3,o.numItems=3;var l=e.createProgram(),h=e.createShader(e.VERTEX_SHADER);e.shaderSource(h,r),e.compileShader(h);var u=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(u,n),e.compileShader(u),e.attachShader(l,h),e.attachShader(l,u),e.linkProgram(l),e.useProgram(l),l.vertexPosAttrib=e.getAttribLocation(l,"attrVertex"),l.offsetUniform=e.getUniformLocation(l,"uniformOffset"),e.enableVertexAttribArray(l.vertexPosArray),e.vertexAttribPointer(l.vertexPosAttrib,o.itemSize,e.FLOAT,!1,0,0),e.uniform2f(l.offsetUniform,1,1),e.drawArrays(e.TRIANGLE_STRIP,0,o.numItems),null!=e.canvas&&a.push(e.canvas.toDataURL()),a.push("extensions:"+e.getSupportedExtensions().join(";")),a.push("webgl aliased line width range:"+t(e.getParameter(e.ALIASED_LINE_WIDTH_RANGE))),a.push("webgl aliased point size range:"+t(e.getParameter(e.ALIASED_POINT_SIZE_RANGE))),a.push("webgl alpha bits:"+e.getParameter(e.ALPHA_BITS)),a.push("webgl antialiasing:"+(e.getContextAttributes().antialias?"yes":"no")),a.push("webgl blue bits:"+e.getParameter(e.BLUE_BITS)),a.push("webgl depth bits:"+e.getParameter(e.DEPTH_BITS)),a.push("webgl green bits:"+e.getParameter(e.GREEN_BITS)),a.push("webgl max anisotropy:"+i(e)),a.push("webgl max combined texture image units:"+e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),a.push("webgl max cube map texture size:"+e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE)),a.push("webgl max fragment uniform vectors:"+e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS)),a.push("webgl max render buffer size:"+e.getParameter(e.MAX_RENDERBUFFER_SIZE)),a.push("webgl max texture image units:"+e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),a.push("webgl max texture size:"+e.getParameter(e.MAX_TEXTURE_SIZE)),a.push("webgl max varying vectors:"+e.getParameter(e.MAX_VARYING_VECTORS)),a.push("webgl max vertex attribs:"+e.getParameter(e.MAX_VERTEX_ATTRIBS)),a.push("webgl max vertex texture image units:"+e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),a.push("webgl max vertex uniform vectors:"+e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS)),a.push("webgl max viewport dims:"+t(e.getParameter(e.MAX_VIEWPORT_DIMS))),a.push("webgl red bits:"+e.getParameter(e.RED_BITS)),a.push("webgl renderer:"+e.getParameter(e.RENDERER)),a.push("webgl shading language version:"+e.getParameter(e.SHADING_LANGUAGE_VERSION)),a.push("webgl stencil bits:"+e.getParameter(e.STENCIL_BITS)),a.push("webgl vendor:"+e.getParameter(e.VENDOR)),a.push("webgl version:"+e.getParameter(e.VERSION)),e.getShaderPrecisionFormat?(a.push("webgl vertex shader high float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision),a.push("webgl vertex shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl vertex shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl vertex shader medium float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl vertex shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl vertex shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl vertex shader low float precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).precision),a.push("webgl vertex shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl vertex shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl fragment shader high float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision),a.push("webgl fragment shader high float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMin),a.push("webgl fragment shader high float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).rangeMax),a.push("webgl fragment shader medium float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision),a.push("webgl fragment shader medium float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMin),a.push("webgl fragment shader medium float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).rangeMax),a.push("webgl fragment shader low float precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).precision),a.push("webgl fragment shader low float precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMin),a.push("webgl fragment shader low float precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_FLOAT).rangeMax),a.push("webgl vertex shader high int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).precision),a.push("webgl vertex shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMin),a.push("webgl vertex shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_INT).rangeMax),a.push("webgl vertex shader medium int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).precision),a.push("webgl vertex shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl vertex shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl vertex shader low int precision:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).precision),a.push("webgl vertex shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMin),a.push("webgl vertex shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.LOW_INT).rangeMax),a.push("webgl fragment shader high int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).precision),a.push("webgl fragment shader high int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMin),a.push("webgl fragment shader high int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_INT).rangeMax),a.push("webgl fragment shader medium int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).precision),a.push("webgl fragment shader medium int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMin),a.push("webgl fragment shader medium int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_INT).rangeMax),a.push("webgl fragment shader low int precision:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).precision),a.push("webgl fragment shader low int precision rangeMin:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMin),a.push("webgl fragment shader low int precision rangeMax:"+e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.LOW_INT).rangeMax),a.join("~")):a.join("~")},getAdBlock:function(){var e=document.createElement("div");e.innerHTML=" ",e.className="adsbox";try{return document.body.appendChild(e),0===document.getElementsByClassName("adsbox")[0].offsetHeight}catch(t){return!1}},getHasLiedLanguages:function(){if("undefined"!=typeof navigator.languages)try{var e=navigator.languages[0].substr(0,2);if(e!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},getHasLiedResolution:function(){return screen.width=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other";var r;if(r="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,r&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if("undefined"!=typeof i){if(i=i.toLowerCase(),i.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(i.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(i.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if(0===i.indexOf("win")&&0===i.indexOf("linux")&&i.indexOf("mac")>=0&&"other"!==e)return!0}return a.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e?!0:(a.indexOf("linux")>=0||a.indexOf("android")>=0||a.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e?!0:(a.indexOf("mac")>=0||a.indexOf("ipad")>=0||a.indexOf("ipod")>=0||a.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e?!0:0===a.indexOf("win")&&0===a.indexOf("linux")&&a.indexOf("mac")>=0&&"other"!==e?!0:"undefined"==typeof navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e},getHasLiedBrowser:function(){var e,t=navigator.userAgent.toLowerCase(),i=navigator.productSub;if(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other",("Chrome"===e||"Safari"===e||"Opera"===e)&&"20030107"!==i)return!0;var a=eval.toString().length;if(37===a&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===a&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===a&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;var r;try{throw"a"}catch(n){try{n.toSource(),r=!0}catch(o){r=!1}}return!(!r||"Firefox"===e||"Other"===e)},isCanvasSupported:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},isWebGlSupported:function(){if(!this.isCanvasSupported())return!1;var e,t=document.createElement("canvas");try{e=t.getContext&&(t.getContext("webgl")||t.getContext("experimental-webgl"))}catch(i){e=!1}return!!window.WebGLRenderingContext&&!!e},isIE:function(){return"Microsoft Internet Explorer"===navigator.appName?!0:!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},hasSwfObjectLoaded:function(){return"undefined"!=typeof window.swfobject},hasMinFlashInstalled:function(){return swfobject.hasFlashPlayerVersion("9.0.0")},addFlashDivNode:function(){var e=document.createElement("div");e.setAttribute("id",this.options.swfContainerId),document.body.appendChild(e)},loadSwfAndDetectFonts:function(e){var t="___fp_swf_loaded";window[t]=function(t){e(t)};var i=this.options.swfContainerId;this.addFlashDivNode();var a={onReady:t},r={allowScriptAccess:"always",menu:"false"};swfobject.embedSWF(this.options.swfPath,i,"1","1","9.0.0",!1,a,r,{})},getWebglCanvas:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(i){}return t||(t=null),t},each:function(e,t,i){if(null!==e)if(this.nativeForEach&&e.forEach===this.nativeForEach)e.forEach(t,i);else if(e.length===+e.length){for(var a=0,r=e.length;r>a;a++)if(t.call(i,e[a],a,e)==={})return}else for(var n in e)if(e.hasOwnProperty(n)&&t.call(i,e[n],n,e)==={})return},map:function(e,t,i){var a=[];return null==e?a:this.nativeMap&&e.map===this.nativeMap?e.map(t,i):(this.each(e,function(e,r,n){a[a.length]=t.call(i,e,r,n)}),a)},x64Add:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]+t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]+t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]+t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]+t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Multiply:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var i=[0,0,0,0];return i[3]+=e[3]*t[3],i[2]+=i[3]>>>16,i[3]&=65535,i[2]+=e[2]*t[3],i[1]+=i[2]>>>16,i[2]&=65535,i[2]+=e[3]*t[2],i[1]+=i[2]>>>16,i[2]&=65535,i[1]+=e[1]*t[3],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[2]*t[2],i[0]+=i[1]>>>16,i[1]&=65535,i[1]+=e[3]*t[1],i[0]+=i[1]>>>16,i[1]&=65535,i[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],i[0]&=65535,[i[0]<<16|i[1],i[2]<<16|i[3]]},x64Rotl:function(e,t){return t%=64,32===t?[e[1],e[0]]:32>t?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])},x64LeftShift:function(e,t){return t%=64,0===t?e:32>t?[e[0]<>>32-t,e[1]<>>1]),e=this.x64Multiply(e,[4283543511,3981806797]),e=this.x64Xor(e,[0,e[0]>>>1]),e=this.x64Multiply(e,[3301882366,444984403]),e=this.x64Xor(e,[0,e[0]>>>1])},x64hash128:function(e,t){e=e||"",t=t||0;for(var i=e.length%16,a=e.length-i,r=[0,t],n=[0,t],o=[0,0],s=[0,0],l=[2277735313,289559509],h=[1291169091,658871167],u=0;a>u;u+=16)o=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],s=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o),r=this.x64Rotl(r,27),r=this.x64Add(r,n),r=this.x64Add(this.x64Multiply(r,[0,5]),[0,1390208809]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s),n=this.x64Rotl(n,31),n=this.x64Add(n,r),n=this.x64Add(this.x64Multiply(n,[0,5]),[0,944331445]);switch(o=[0,0],s=[0,0],i){case 15:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+14)],48)); +case 14:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+13)],40));case 13:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+12)],32));case 12:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+11)],24));case 11:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+10)],16));case 10:s=this.x64Xor(s,this.x64LeftShift([0,e.charCodeAt(u+9)],8));case 9:s=this.x64Xor(s,[0,e.charCodeAt(u+8)]),s=this.x64Multiply(s,h),s=this.x64Rotl(s,33),s=this.x64Multiply(s,l),n=this.x64Xor(n,s);case 8:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+7)],56));case 7:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+6)],48));case 6:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+5)],40));case 5:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+4)],32));case 4:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+3)],24));case 3:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+2)],16));case 2:o=this.x64Xor(o,this.x64LeftShift([0,e.charCodeAt(u+1)],8));case 1:o=this.x64Xor(o,[0,e.charCodeAt(u)]),o=this.x64Multiply(o,l),o=this.x64Rotl(o,31),o=this.x64Multiply(o,h),r=this.x64Xor(r,o)}return r=this.x64Xor(r,[0,e.length]),n=this.x64Xor(n,[0,e.length]),r=this.x64Add(r,n),n=this.x64Add(n,r),r=this.x64Fmix(r),n=this.x64Fmix(n),r=this.x64Add(r,n),n=this.x64Add(n,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8)}},e.VERSION="1.2.0",e}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js b/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js index e622ba930e..165924b502 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js +++ b/dashboard-ui/bower_components/fingerprintjs2/fingerprint2.js @@ -1,5 +1,5 @@ /* -* Fingerprintjs2 1.1.4 - Modern & flexible browser fingerprint library v2 +* Fingerprintjs2 1.2.0 - Modern & flexible browser fingerprint library v2 * https://github.com/Valve/fingerprintjs2 * Copyright (c) 2015 Valentin Vasilyev (valentin.vasilyev@outlook.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. @@ -334,6 +334,57 @@ // and if it doesn't match all 3 then that font is not available. var baseFonts = ["monospace", "sans-serif", "serif"]; + var fontList = [ + "Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS", + "Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style", + "Calibri", "Cambria", "Cambria Math", "Century", "Century Gothic", "Century Schoolbook", "Comic Sans", "Comic Sans MS", "Consolas", "Courier", "Courier New", + "Garamond", "Geneva", "Georgia", + "Helvetica", "Helvetica Neue", + "Impact", + "Lucida Bright", "Lucida Calligraphy", "Lucida Console", "Lucida Fax", "LUCIDA GRANDE", "Lucida Handwriting", "Lucida Sans", "Lucida Sans Typewriter", "Lucida Sans Unicode", + "Microsoft Sans Serif", "Monaco", "Monotype Corsiva", "MS Gothic", "MS Outlook", "MS PGothic", "MS Reference Sans Serif", "MS Sans Serif", "MS Serif", "MYRIAD", "MYRIAD PRO", + "Palatino", "Palatino Linotype", + "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Light", "Segoe UI Semibold", "Segoe UI Symbol", + "Tahoma", "Times", "Times New Roman", "Times New Roman PS", "Trebuchet MS", + "Verdana", "Wingdings", "Wingdings 2", "Wingdings 3" + ]; + var extendedFontList = [ + "Abadi MT Condensed Light", "Academy Engraved LET", "ADOBE CASLON PRO", "Adobe Garamond", "ADOBE GARAMOND PRO", "Agency FB", "Aharoni", "Albertus Extra Bold", "Albertus Medium", "Algerian", "Amazone BT", "American Typewriter", + "American Typewriter Condensed", "AmerType Md BT", "Andalus", "Angsana New", "AngsanaUPC", "Antique Olive", "Aparajita", "Apple Chancery", "Apple Color Emoji", "Apple SD Gothic Neo", "Arabic Typesetting", "ARCHER", + "ARNO PRO", "Arrus BT", "Aurora Cn BT", "AvantGarde Bk BT", "AvantGarde Md BT", "AVENIR", "Ayuthaya", "Bandy", "Bangla Sangam MN", "Bank Gothic", "BankGothic Md BT", "Baskerville", + "Baskerville Old Face", "Batang", "BatangChe", "Bauer Bodoni", "Bauhaus 93", "Bazooka", "Bell MT", "Bembo", "Benguiat Bk BT", "Berlin Sans FB", "Berlin Sans FB Demi", "Bernard MT Condensed", "BernhardFashion BT", "BernhardMod BT", "Big Caslon", "BinnerD", + "Blackadder ITC", "BlairMdITC TT", "Bodoni 72", "Bodoni 72 Oldstyle", "Bodoni 72 Smallcaps", "Bodoni MT", "Bodoni MT Black", "Bodoni MT Condensed", "Bodoni MT Poster Compressed", + "Bookshelf Symbol 7", "Boulder", "Bradley Hand", "Bradley Hand ITC", "Bremen Bd BT", "Britannic Bold", "Broadway", "Browallia New", "BrowalliaUPC", "Brush Script MT", "Californian FB", "Calisto MT", "Calligrapher", "Candara", + "CaslonOpnface BT", "Castellar", "Centaur", "Cezanne", "CG Omega", "CG Times", "Chalkboard", "Chalkboard SE", "Chalkduster", "Charlesworth", "Charter Bd BT", "Charter BT", "Chaucer", + "ChelthmITC Bk BT", "Chiller", "Clarendon", "Clarendon Condensed", "CloisterBlack BT", "Cochin", "Colonna MT", "Constantia", "Cooper Black", "Copperplate", "Copperplate Gothic", "Copperplate Gothic Bold", + "Copperplate Gothic Light", "CopperplGoth Bd BT", "Corbel", "Cordia New", "CordiaUPC", "Cornerstone", "Coronet", "Cuckoo", "Curlz MT", "DaunPenh", "Dauphin", "David", "DB LCD Temp", "DELICIOUS", "Denmark", + "DFKai-SB", "Didot", "DilleniaUPC", "DIN", "DokChampa", "Dotum", "DotumChe", "Ebrima", "Edwardian Script ITC", "Elephant", "English 111 Vivace BT", "Engravers MT", "EngraversGothic BT", "Eras Bold ITC", "Eras Demi ITC", "Eras Light ITC", "Eras Medium ITC", + "EucrosiaUPC", "Euphemia", "Euphemia UCAS", "EUROSTILE", "Exotc350 Bd BT", "FangSong", "Felix Titling", "Fixedsys", "FONTIN", "Footlight MT Light", "Forte", + "FrankRuehl", "Fransiscan", "Freefrm721 Blk BT", "FreesiaUPC", "Freestyle Script", "French Script MT", "FrnkGothITC Bk BT", "Fruitger", "FRUTIGER", + "Futura", "Futura Bk BT", "Futura Lt BT", "Futura Md BT", "Futura ZBlk BT", "FuturaBlack BT", "Gabriola", "Galliard BT", "Gautami", "Geeza Pro", "Geometr231 BT", "Geometr231 Hv BT", "Geometr231 Lt BT", "GeoSlab 703 Lt BT", + "GeoSlab 703 XBd BT", "Gigi", "Gill Sans", "Gill Sans MT", "Gill Sans MT Condensed", "Gill Sans MT Ext Condensed Bold", "Gill Sans Ultra Bold", "Gill Sans Ultra Bold Condensed", "Gisha", "Gloucester MT Extra Condensed", "GOTHAM", "GOTHAM BOLD", + "Goudy Old Style", "Goudy Stout", "GoudyHandtooled BT", "GoudyOLSt BT", "Gujarati Sangam MN", "Gulim", "GulimChe", "Gungsuh", "GungsuhChe", "Gurmukhi MN", "Haettenschweiler", "Harlow Solid Italic", "Harrington", "Heather", "Heiti SC", "Heiti TC", "HELV", + "Herald", "High Tower Text", "Hiragino Kaku Gothic ProN", "Hiragino Mincho ProN", "Hoefler Text", "Humanst 521 Cn BT", "Humanst521 BT", "Humanst521 Lt BT", "Imprint MT Shadow", "Incised901 Bd BT", "Incised901 BT", + "Incised901 Lt BT", "INCONSOLATA", "Informal Roman", "Informal011 BT", "INTERSTATE", "IrisUPC", "Iskoola Pota", "JasmineUPC", "Jazz LET", "Jenson", "Jester", "Jokerman", "Juice ITC", "Kabel Bk BT", "Kabel Ult BT", "Kailasa", "KaiTi", "Kalinga", "Kannada Sangam MN", + "Kartika", "Kaufmann Bd BT", "Kaufmann BT", "Khmer UI", "KodchiangUPC", "Kokila", "Korinna BT", "Kristen ITC", "Krungthep", "Kunstler Script", "Lao UI", "Latha", "Leelawadee", "Letter Gothic", "Levenim MT", "LilyUPC", "Lithograph", "Lithograph Light", "Long Island", + "Lydian BT", "Magneto", "Maiandra GD", "Malayalam Sangam MN", "Malgun Gothic", + "Mangal", "Marigold", "Marion", "Marker Felt", "Market", "Marlett", "Matisse ITC", "Matura MT Script Capitals", "Meiryo", "Meiryo UI", "Microsoft Himalaya", "Microsoft JhengHei", "Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Tai Le", + "Microsoft Uighur", "Microsoft YaHei", "Microsoft Yi Baiti", "MingLiU", "MingLiU_HKSCS", "MingLiU_HKSCS-ExtB", "MingLiU-ExtB", "Minion", "Minion Pro", "Miriam", "Miriam Fixed", "Mistral", "Modern", "Modern No. 20", "Mona Lisa Solid ITC TT", "Mongolian Baiti", + "MONO", "MoolBoran", "Mrs Eaves", "MS LineDraw", "MS Mincho", "MS PMincho", "MS Reference Specialty", "MS UI Gothic", "MT Extra", "MUSEO", "MV Boli", + "Nadeem", "Narkisim", "NEVIS", "News Gothic", "News GothicMT", "NewsGoth BT", "Niagara Engraved", "Niagara Solid", "Noteworthy", "NSimSun", "Nyala", "OCR A Extended", "Old Century", "Old English Text MT", "Onyx", "Onyx BT", "OPTIMA", "Oriya Sangam MN", + "OSAKA", "OzHandicraft BT", "Palace Script MT", "Papyrus", "Parchment", "Party LET", "Pegasus", "Perpetua", "Perpetua Titling MT", "PetitaBold", "Pickwick", "Plantagenet Cherokee", "Playbill", "PMingLiU", "PMingLiU-ExtB", + "Poor Richard", "Poster", "PosterBodoni BT", "PRINCETOWN LET", "Pristina", "PTBarnum BT", "Pythagoras", "Raavi", "Rage Italic", "Ravie", "Ribbon131 Bd BT", "Rockwell", "Rockwell Condensed", "Rockwell Extra Bold", "Rod", "Roman", "Sakkal Majalla", + "Santa Fe LET", "Savoye LET", "Sceptre", "Script", "Script MT Bold", "SCRIPTINA", "Serifa", "Serifa BT", "Serifa Th BT", "ShelleyVolante BT", "Sherwood", + "Shonar Bangla", "Showcard Gothic", "Shruti", "Signboard", "SILKSCREEN", "SimHei", "Simplified Arabic", "Simplified Arabic Fixed", "SimSun", "SimSun-ExtB", "Sinhala Sangam MN", "Sketch Rockwell", "Skia", "Small Fonts", "Snap ITC", "Snell Roundhand", "Socket", + "Souvenir Lt BT", "Staccato222 BT", "Steamer", "Stencil", "Storybook", "Styllo", "Subway", "Swis721 BlkEx BT", "Swiss911 XCm BT", "Sylfaen", "Synchro LET", "System", "Tamil Sangam MN", "Technical", "Teletype", "Telugu Sangam MN", "Tempus Sans ITC", + "Terminal", "Thonburi", "Traditional Arabic", "Trajan", "TRAJAN PRO", "Tristan", "Tubular", "Tunga", "Tw Cen MT", "Tw Cen MT Condensed", "Tw Cen MT Condensed Extra Bold", + "TypoUpright BT", "Unicorn", "Univers", "Univers CE 55 Medium", "Univers Condensed", "Utsaah", "Vagabond", "Vani", "Vijaya", "Viner Hand ITC", "VisualUI", "Vivaldi", "Vladimir Script", "Vrinda", "Westminster", "WHITNEY", "Wide Latin", + "ZapfEllipt BT", "ZapfHumnst BT", "ZapfHumnst Dm BT", "Zapfino", "Zurich BlkEx BT", "Zurich Ex BT", "ZWAdobeF"]; + + if(that.options.extendedJsFonts) { + fontList = fontList.concat(extendedFontList); + } + //we use m or w because these two characters take up the maximum width. // And we use a LLi so that the same matching fonts can get separated var testString = "mmmmmmmmmmlli"; @@ -343,94 +394,106 @@ var h = document.getElementsByTagName("body")[0]; - // create a SPAN in the document to get the width of the text we use to test - var s = document.createElement("span"); - /* - * We need this css as in some weird browser this - * span elements shows up for a microSec which creates a - * bad user experience - */ - s.style.position = "absolute"; - s.style.left = "-9999px"; - s.style.fontSize = testSize; - s.innerHTML = testString; + // div to load spans for the base fonts + var baseFontsDiv = document.createElement("div"); + + // div to load spans for the fonts to detect + var fontsDiv = document.createElement("div"); + var defaultWidth = {}; var defaultHeight = {}; - for (var index = 0, length = baseFonts.length; index < length; index++) { - //get the default width for the three base fonts - s.style.fontFamily = baseFonts[index]; - h.appendChild(s); - defaultWidth[baseFonts[index]] = s.offsetWidth; //width for the default font - defaultHeight[baseFonts[index]] = s.offsetHeight; //height for the defualt font - h.removeChild(s); - } - var detect = function (font) { + + // creates a span where the fonts will be loaded + var createSpan = function() { + var s = document.createElement("span"); + /* + * We need this css as in some weird browser this + * span elements shows up for a microSec which creates a + * bad user experience + */ + s.style.position = "absolute"; + s.style.left = "-9999px"; + s.style.fontSize = testSize; + s.innerHTML = testString; + return s; + }; + + // creates a span and load the font to detect and a base font for fallback + var createSpanWithFonts = function(fontToDetect, baseFont) { + var s = createSpan(); + s.style.fontFamily = fontToDetect + "," + baseFont; + return s; + }; + + // creates spans for the base fonts and adds them to baseFontsDiv + var initializeBaseFontsSpans = function() { + var spans = []; + for (var index = 0, length = baseFonts.length; index < length; index++) { + var s = createSpan(); + s.style.fontFamily = baseFonts[index]; + baseFontsDiv.appendChild(s); + spans.push(s); + } + return spans; + }; + + // creates spans for the fonts to detect and adds them to fontsDiv + var initializeFontsSpans = function() { + var spans = {}; + for(var i = 0, l = fontList.length; i < l; i++) { + var fontSpans = []; + for(var j = 0, numDefaultFonts = baseFonts.length; j < numDefaultFonts; j++) { + var s = createSpanWithFonts(fontList[i], baseFonts[j]); + fontsDiv.appendChild(s); + fontSpans.push(s); + } + spans[fontList[i]] = fontSpans; // Stores {fontName : [spans for that font]} + } + return spans; + }; + + // checks if a font is available + var isFontAvailable = function(fontSpans) { var detected = false; - for (var index = 0, l = baseFonts.length; index < l; index++) { - s.style.fontFamily = font + "," + baseFonts[index]; // name of the font along with the base font for fallback. - h.appendChild(s); - var matched = (s.offsetWidth !== defaultWidth[baseFonts[index]] || s.offsetHeight !== defaultHeight[baseFonts[index]]); - h.removeChild(s); - detected = detected || matched; + for(var i = 0; i < baseFonts.length; i++) { + detected = (fontSpans[i].offsetWidth !== defaultWidth[baseFonts[i]] || fontSpans[i].offsetHeight !== defaultHeight[baseFonts[i]]); + if(detected) { + return detected; + } } return detected; }; - var fontList = [ - "Andale Mono", "Arial", "Arial Black", "Arial Hebrew", "Arial MT", "Arial Narrow", "Arial Rounded MT Bold", "Arial Unicode MS", - "Bitstream Vera Sans Mono", "Book Antiqua", "Bookman Old Style", - "Calibri", "Cambria", "Cambria Math", "Century", "Century Gothic", "Century Schoolbook", "Comic Sans", "Comic Sans MS", "Consolas", "Courier", "Courier New", - "Garamond", "Geneva", "Georgia", - "Helvetica", "Helvetica Neue", - "Impact", - "Lucida Bright", "Lucida Calligraphy", "Lucida Console", "Lucida Fax", "LUCIDA GRANDE", "Lucida Handwriting", "Lucida Sans", "Lucida Sans Typewriter", "Lucida Sans Unicode", - "Microsoft Sans Serif", "Monaco", "Monotype Corsiva", "MS Gothic", "MS Outlook", "MS PGothic", "MS Reference Sans Serif", "MS Sans Serif", "MS Serif", "MYRIAD", "MYRIAD PRO", - "Palatino", "Palatino Linotype", - "Segoe Print", "Segoe Script", "Segoe UI", "Segoe UI Light", "Segoe UI Semibold", "Segoe UI Symbol", - "Tahoma", "Times", "Times New Roman", "Times New Roman PS", "Trebuchet MS", - "Verdana", "Wingdings", "Wingdings 2", "Wingdings 3" - ]; - var extendedFontList = [ - "Abadi MT Condensed Light", "Academy Engraved LET", "ADOBE CASLON PRO", "Adobe Garamond", "ADOBE GARAMOND PRO", "Agency FB", "Aharoni", "Albertus Extra Bold", "Albertus Medium", "Algerian", "Amazone BT", "American Typewriter", - "American Typewriter Condensed", "AmerType Md BT", "Andalus", "Angsana New", "AngsanaUPC", "Antique Olive", "Aparajita", "Apple Chancery", "Apple Color Emoji", "Apple SD Gothic Neo", "Arabic Typesetting", "ARCHER", - "ARNO PRO", "Arrus BT", "Aurora Cn BT", "AvantGarde Bk BT", "AvantGarde Md BT", "AVENIR", "Ayuthaya", "Bandy", "Bangla Sangam MN", "Bank Gothic", "BankGothic Md BT", "Baskerville", - "Baskerville Old Face", "Batang", "BatangChe", "Bauer Bodoni", "Bauhaus 93", "Bazooka", "Bell MT", "Bembo", "Benguiat Bk BT", "Berlin Sans FB", "Berlin Sans FB Demi", "Bernard MT Condensed", "BernhardFashion BT", "BernhardMod BT", "Big Caslon", "BinnerD", - "Blackadder ITC", "BlairMdITC TT", "Bodoni 72", "Bodoni 72 Oldstyle", "Bodoni 72 Smallcaps", "Bodoni MT", "Bodoni MT Black", "Bodoni MT Condensed", "Bodoni MT Poster Compressed", - "Bookshelf Symbol 7", "Boulder", "Bradley Hand", "Bradley Hand ITC", "Bremen Bd BT", "Britannic Bold", "Broadway", "Browallia New", "BrowalliaUPC", "Brush Script MT", "Californian FB", "Calisto MT", "Calligrapher", "Candara", - "CaslonOpnface BT", "Castellar", "Centaur", "Cezanne", "CG Omega", "CG Times", "Chalkboard", "Chalkboard SE", "Chalkduster", "Charlesworth", "Charter Bd BT", "Charter BT", "Chaucer", - "ChelthmITC Bk BT", "Chiller", "Clarendon", "Clarendon Condensed", "CloisterBlack BT", "Cochin", "Colonna MT", "Constantia", "Cooper Black", "Copperplate", "Copperplate Gothic", "Copperplate Gothic Bold", - "Copperplate Gothic Light", "CopperplGoth Bd BT", "Corbel", "Cordia New", "CordiaUPC", "Cornerstone", "Coronet", "Cuckoo", "Curlz MT", "DaunPenh", "Dauphin", "David", "DB LCD Temp", "DELICIOUS", "Denmark", - "DFKai-SB", "Didot", "DilleniaUPC", "DIN", "DokChampa", "Dotum", "DotumChe", "Ebrima", "Edwardian Script ITC", "Elephant", "English 111 Vivace BT", "Engravers MT", "EngraversGothic BT", "Eras Bold ITC", "Eras Demi ITC", "Eras Light ITC", "Eras Medium ITC", - "EucrosiaUPC", "Euphemia", "Euphemia UCAS", "EUROSTILE", "Exotc350 Bd BT", "FangSong", "Felix Titling", "Fixedsys", "FONTIN", "Footlight MT Light", "Forte", - "FrankRuehl", "Fransiscan", "Freefrm721 Blk BT", "FreesiaUPC", "Freestyle Script", "French Script MT", "FrnkGothITC Bk BT", "Fruitger", "FRUTIGER", - "Futura", "Futura Bk BT", "Futura Lt BT", "Futura Md BT", "Futura ZBlk BT", "FuturaBlack BT", "Gabriola", "Galliard BT", "Gautami", "Geeza Pro", "Geometr231 BT", "Geometr231 Hv BT", "Geometr231 Lt BT", "GeoSlab 703 Lt BT", - "GeoSlab 703 XBd BT", "Gigi", "Gill Sans", "Gill Sans MT", "Gill Sans MT Condensed", "Gill Sans MT Ext Condensed Bold", "Gill Sans Ultra Bold", "Gill Sans Ultra Bold Condensed", "Gisha", "Gloucester MT Extra Condensed", "GOTHAM", "GOTHAM BOLD", - "Goudy Old Style", "Goudy Stout", "GoudyHandtooled BT", "GoudyOLSt BT", "Gujarati Sangam MN", "Gulim", "GulimChe", "Gungsuh", "GungsuhChe", "Gurmukhi MN", "Haettenschweiler", "Harlow Solid Italic", "Harrington", "Heather", "Heiti SC", "Heiti TC", "HELV", - "Herald", "High Tower Text", "Hiragino Kaku Gothic ProN", "Hiragino Mincho ProN", "Hoefler Text", "Humanst 521 Cn BT", "Humanst521 BT", "Humanst521 Lt BT", "Imprint MT Shadow", "Incised901 Bd BT", "Incised901 BT", - "Incised901 Lt BT", "INCONSOLATA", "Informal Roman", "Informal011 BT", "INTERSTATE", "IrisUPC", "Iskoola Pota", "JasmineUPC", "Jazz LET", "Jenson", "Jester", "Jokerman", "Juice ITC", "Kabel Bk BT", "Kabel Ult BT", "Kailasa", "KaiTi", "Kalinga", "Kannada Sangam MN", - "Kartika", "Kaufmann Bd BT", "Kaufmann BT", "Khmer UI", "KodchiangUPC", "Kokila", "Korinna BT", "Kristen ITC", "Krungthep", "Kunstler Script", "Lao UI", "Latha", "Leelawadee", "Letter Gothic", "Levenim MT", "LilyUPC", "Lithograph", "Lithograph Light", "Long Island", - "Lydian BT", "Magneto", "Maiandra GD", "Malayalam Sangam MN", "Malgun Gothic", - "Mangal", "Marigold", "Marion", "Marker Felt", "Market", "Marlett", "Matisse ITC", "Matura MT Script Capitals", "Meiryo", "Meiryo UI", "Microsoft Himalaya", "Microsoft JhengHei", "Microsoft New Tai Lue", "Microsoft PhagsPa", "Microsoft Tai Le", - "Microsoft Uighur", "Microsoft YaHei", "Microsoft Yi Baiti", "MingLiU", "MingLiU_HKSCS", "MingLiU_HKSCS-ExtB", "MingLiU-ExtB", "Minion", "Minion Pro", "Miriam", "Miriam Fixed", "Mistral", "Modern", "Modern No. 20", "Mona Lisa Solid ITC TT", "Mongolian Baiti", - "MONO", "MoolBoran", "Mrs Eaves", "MS LineDraw", "MS Mincho", "MS PMincho", "MS Reference Specialty", "MS UI Gothic", "MT Extra", "MUSEO", "MV Boli", - "Nadeem", "Narkisim", "NEVIS", "News Gothic", "News GothicMT", "NewsGoth BT", "Niagara Engraved", "Niagara Solid", "Noteworthy", "NSimSun", "Nyala", "OCR A Extended", "Old Century", "Old English Text MT", "Onyx", "Onyx BT", "OPTIMA", "Oriya Sangam MN", - "OSAKA", "OzHandicraft BT", "Palace Script MT", "Papyrus", "Parchment", "Party LET", "Pegasus", "Perpetua", "Perpetua Titling MT", "PetitaBold", "Pickwick", "Plantagenet Cherokee", "Playbill", "PMingLiU", "PMingLiU-ExtB", - "Poor Richard", "Poster", "PosterBodoni BT", "PRINCETOWN LET", "Pristina", "PTBarnum BT", "Pythagoras", "Raavi", "Rage Italic", "Ravie", "Ribbon131 Bd BT", "Rockwell", "Rockwell Condensed", "Rockwell Extra Bold", "Rod", "Roman", "Sakkal Majalla", - "Santa Fe LET", "Savoye LET", "Sceptre", "Script", "Script MT Bold", "SCRIPTINA", "Serifa", "Serifa BT", "Serifa Th BT", "ShelleyVolante BT", "Sherwood", - "Shonar Bangla", "Showcard Gothic", "Shruti", "Signboard", "SILKSCREEN", "SimHei", "Simplified Arabic", "Simplified Arabic Fixed", "SimSun", "SimSun-ExtB", "Sinhala Sangam MN", "Sketch Rockwell", "Skia", "Small Fonts", "Snap ITC", "Snell Roundhand", "Socket", - "Souvenir Lt BT", "Staccato222 BT", "Steamer", "Stencil", "Storybook", "Styllo", "Subway", "Swis721 BlkEx BT", "Swiss911 XCm BT", "Sylfaen", "Synchro LET", "System", "Tamil Sangam MN", "Technical", "Teletype", "Telugu Sangam MN", "Tempus Sans ITC", - "Terminal", "Thonburi", "Traditional Arabic", "Trajan", "TRAJAN PRO", "Tristan", "Tubular", "Tunga", "Tw Cen MT", "Tw Cen MT Condensed", "Tw Cen MT Condensed Extra Bold", - "TypoUpright BT", "Unicorn", "Univers", "Univers CE 55 Medium", "Univers Condensed", "Utsaah", "Vagabond", "Vani", "Vijaya", "Viner Hand ITC", "VisualUI", "Vivaldi", "Vladimir Script", "Vrinda", "Westminster", "WHITNEY", "Wide Latin", - "ZapfEllipt BT", "ZapfHumnst BT", "ZapfHumnst Dm BT", "Zapfino", "Zurich BlkEx BT", "Zurich Ex BT", "ZWAdobeF"]; - if(that.options.extendedJsFonts) { - fontList = fontList.concat(extendedFontList); + // create spans for base fonts + var baseFontsSpans = initializeBaseFontsSpans(); + + // add the spans to the DOM + h.appendChild(baseFontsDiv); + + // get the default width for the three base fonts + for (var index = 0, length = baseFonts.length; index < length; index++) { + defaultWidth[baseFonts[index]] = baseFontsSpans[index].offsetWidth; // width for the default font + defaultHeight[baseFonts[index]] = baseFontsSpans[index].offsetHeight; // height for the default font } + + // create spans for fonts to detect + var fontsSpans = initializeFontsSpans(); + + // add all the spans to the DOM + h.appendChild(fontsDiv); + + // check available fonts var available = []; - for (var i = 0, l = fontList.length; i < l; i++) { - if(detect(fontList[i])) { - available.push(fontList[i]); - } + for(var i = 0, l = fontList.length; i < l; i++) { + if(isFontAvailable(fontsSpans[fontList[i]])) { + available.push(fontList[i]); + } } + + // remove spans from DOM + h.removeChild(fontsDiv); + h.removeChild(baseFontsDiv); + keys.push({key: "js_fonts", value: available}); done(keys); }, 1); @@ -770,11 +833,12 @@ }, getAdBlock: function(){ var ads = document.createElement("div"); - ads.setAttribute("id", "ads"); + ads.innerHTML = " "; + ads.className = "adsbox"; try { // body may not exist, that's why we need try/catch document.body.appendChild(ads); - return document.getElementById("ads") ? false : true; + return document.getElementsByClassName("adsbox")[0].offsetHeight === 0; } catch (e) { return false; } @@ -787,7 +851,7 @@ if(firstLanguages !== navigator.language.substr(0, 2)){ return true; } - } catch(err){ + } catch(err) { return true; } } @@ -1206,6 +1270,6 @@ return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8); } }; - Fingerprint2.VERSION = "1.1.4"; + Fingerprint2.VERSION = "1.2.0"; return Fingerprint2; }); diff --git a/dashboard-ui/bower_components/fingerprintjs2/package.json b/dashboard-ui/bower_components/fingerprintjs2/package.json index b7d16a8b49..7fe158c855 100644 --- a/dashboard-ui/bower_components/fingerprintjs2/package.json +++ b/dashboard-ui/bower_components/fingerprintjs2/package.json @@ -1,6 +1,6 @@ { "name": "fingerprintjs2", - "version": "1.1.4", + "version": "1.2.0", "description": "Modern & flexible browser fingerprinting library", "main": "dist/fingerprint2.min.js", "devDependencies": { From dcb6b103ec8172fbb0cf6f455c6fb9c9201c5e17 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 May 2016 00:17:28 -0400 Subject: [PATCH 004/126] update shared collection editor --- .../emby-webcomponents/.bower.json | 8 +- .../collectioneditor/collectioneditor.js | 86 +++++++++++++------ .../dialoghelper/dialoghelper.js | 16 +++- .../emby-select/emby-select.css | 11 ++- .../emby-select/emby-select.js | 22 ++++- .../emby-webcomponents/icons/nav.html | 1 + .../emby-webcomponents/itemcontextmenu.js | 17 ++++ .../emby-webcomponents/strings/en-US.json | 10 ++- dashboard-ui/scripts/site.js | 2 +- .../thirdparty/paper-button-style.css | 4 +- 10 files changed, 133 insertions(+), 44 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index c11a054e60..b18bf2bd01 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.54", - "_release": "1.3.54", + "version": "1.3.65", + "_release": "1.3.65", "_resolution": { "type": "version", - "tag": "1.3.54", - "commit": "5b18c68f85be83718bb5c653da5baeed956bb2bb" + "tag": "1.3.65", + "commit": "8a512f0acee81e973007eb43566b7d3aebb7a613" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js index d16a5b0fa9..fa63a886f1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js @@ -1,4 +1,4 @@ -define(['dialogHelper', 'loading', 'connectionManager', 'embyRouter', 'globalize', 'paper-checkbox', 'paper-input', 'paper-icon-button-light', 'emby-select'], function (dialogHelper, loading, connectionManager, embyRouter, globalize) { +define(['shell', 'dialogHelper', 'loading', 'layoutManager', 'connectionManager', 'scrollHelper', 'embyRouter', 'globalize', 'paper-checkbox', 'paper-input', 'paper-icon-button-light', 'emby-select', 'html!./../icons/nav.html', 'css!./../formdialog'], function (shell, dialogHelper, loading, layoutManager, connectionManager, scrollHelper, embyRouter, globalize) { var currentServerId; @@ -94,11 +94,6 @@ }); } - function onDialogClosed() { - - loading.hide(); - } - function triggerChange(select) { select.dispatchEvent(new CustomEvent('change', {})); } @@ -123,7 +118,7 @@ var html = ''; - html += ''; + html += ''; html += result.Items.map(function (i) { @@ -142,47 +137,58 @@ var html = ''; + html += '
'; + html += '
'; html += '
'; html += '
'; - html += globalize.translate('CreateCollectionHelp'); + html += globalize.translate('sharedcomponents#NewCollectionHelp'); html += '
'; html += '
'; html += '
'; html += '
'; - html += ''; + html += ''; html += '
'; html += '
'; html += '
'; - html += ''; - html += '
' + globalize.translate('NewCollectionNameExample') + '
'; + html += ''; + html += '
' + globalize.translate('sharedcomponents#NewCollectionNameExample') + '
'; html += '
'; - html += '
'; html += '
'; html += '
'; - html += '' + globalize.translate('OptionSearchForInternetMetadata') + ''; + html += '' + globalize.translate('sharedcomponents#SearchForCollectionInternetMetadata') + ''; html += '
'; // newCollectionInfo html += '
'; + html += '
'; html += '
'; html += '
'; - html += ''; + html += '' + globalize.translate('sharedcomponents#ButtonOk') + ''; html += '
'; html += ''; html += '
'; + html += '
'; + html += '
'; return html; } + function onHelpClick(e) { + + shell.openUrl(this.href); + e.preventDefault(); + return false; + } + function initEditor(content, items) { content.querySelector('#selectCollectionToAddTo').addEventListener('change', function () { @@ -195,6 +201,21 @@ } }); + content.querySelector('.btnSubmit').addEventListener('submit', function () { + // 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 = content.querySelector('form'); + 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); + }); + content.querySelector('.newCollectionForm').addEventListener('submit', onSubmit); content.querySelector('.fldSelectedItemIds', content).value = items.join(','); @@ -221,16 +242,23 @@ var items = options.items || {}; currentServerId = options.serverId; - var dlg = dialogHelper.createDialog({ - size: 'small', - removeOnClose: true - }); + var dialogOptions = { + removeOnClose: true, + scrollY: false + }; - dlg.classList.add('ui-body-b'); - dlg.classList.add('background-theme-b'); + if (layoutManager.tv) { + dialogOptions.size = 'fullscreen'; + } else { + dialogOptions.size = 'small'; + } + + var dlg = dialogHelper.createDialog(dialogOptions); + + dlg.classList.add('formDialog'); var html = ''; - var title = items.length ? globalize.translate('HeaderAddToCollection') : globalize.translate('HeaderNewCollection'); + var title = items.length ? globalize.translate('sharedcomponents#AddToCollection') : globalize.translate('sharedcomponents#NewCollection'); html += '
'; html += ''; @@ -238,7 +266,7 @@ html += title; html += '
'; - html += '' + globalize.translate('ButtonHelp') + ''; + html += '' + globalize.translate('sharedcomponents#Help') + ''; html += '
'; @@ -249,14 +277,20 @@ initEditor(dlg, items); - dlg.addEventListener('close', onDialogClosed); - - dialogHelper.open(dlg); - dlg.querySelector('.btnCancel').addEventListener('click', function () { dialogHelper.close(dlg); }); + + if (layoutManager.tv) { + scrollHelper.centerFocus.on(dlg.querySelector('.dialogContent'), false); + } + + return new Promise(function (resolve, reject) { + + dlg.addEventListener('close', resolve); + dialogHelper.open(dlg); + }); }; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js index 3a3e8b638d..06270feae6 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js @@ -2,6 +2,18 @@ var globalOnOpenCallback; + function enableAnimation() { + if (browser.animate) { + return true; + } + + if (browser.mobile || browser.tv) { + return false; + } + + return true; + } + function dialogHashHandler(dlg, hash, resolve) { var self = this; @@ -150,7 +162,7 @@ // Without this, seeing some script errors in Firefox // Also for some reason it won't auto-focus without a delay here, still investigating that - var delay = browser.animate ? 0 : 300; + var delay = enableAnimation() ? 300 : 0; setTimeout(function () { focusManager.autoFocus(dlg); @@ -409,7 +421,7 @@ }; // too buggy in IE, not even worth it - if (!browser.animate) { + if (!enableAnimation()) { dlg.animationConfig = null; dlg.entryAnimation = null; dlg.exitAnimation = null; diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css index 2b1993d4f0..483579441a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css @@ -14,28 +14,31 @@ font-size: inherit; /* General select styles: change as needed */ font-family: inherit; - font-weight: bold; + font-weight: inherit; color: inherit; padding: .6em .8em .3em 0; cursor: pointer; outline: none !important; + width: 100%; } .selectLabel { display: block; } -.selectLabelFocus { +.selectLabelFocused { color: #52B54B; } .emby-select-selectionbar { height: 2px; - transform: scale(.01); - transition: transform .2s ease-out; + transform: scale(.01, 1); + transition: transform .25s ease-out; position: relative; top: -1px; margin-bottom: .5em; + -webkit-transform-origin: center center; + transform-origin: center center; } [is="emby-select"]:focus + .emby-select-selectionbar { diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js index 4f41cb6e1d..304b29d5e1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js @@ -16,14 +16,25 @@ return true; } + function triggerChange(select) { + var evt = document.createEvent("HTMLEvents"); + evt.initEvent("change", false, true); + select.dispatchEvent(evt); + } + function showActionSheeet(select) { + var labelElem = getLabel(select); + var title = labelElem ? (labelElem.textContent || labelElem.innerText) : null; + actionsheet.show({ items: select.options, - positionTo: select + positionTo: select, + title: title }).then(function (value) { select.value = value; + triggerChange(select); }); } @@ -38,20 +49,23 @@ function onFocus(e) { var label = getLabel(this); if (label) { - label.classList.add('selectLabelFocus'); + label.classList.add('selectLabelFocused'); + label.classList.remove('selectLabelUnfocused'); } } function onBlur(e) { var label = getLabel(this); if (label) { - label.classList.remove('selectLabelFocus'); + label.classList.add('selectLabelUnfocused'); + label.classList.remove('selectLabelFocused'); } } function onMouseDown(e) { - if (!enableNativeMenu()) { + // e.button=0 for primary (left) mouse button click + if (!e.button && !enableNativeMenu()) { e.preventDefault(); showActionSheeet(this); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html b/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html index 85ea900784..2787865209 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html +++ b/dashboard-ui/bower_components/emby-webcomponents/icons/nav.html @@ -36,6 +36,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for + diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index ead7a4a4ae..7913209747 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -11,6 +11,11 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali var commands = []; + commands.push({ + name: globalize.translate('sharedcomponents#AddToCollection'), + id: 'addtocollection' + }); + if (item.CanDelete) { commands.push({ name: globalize.translate('sharedcomponents#Delete'), @@ -54,6 +59,18 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali switch (id) { + case 'addtocollection': + { + require(['collectionEditor'], function (collectionEditor) { + + new collectionEditor().show({ + items: [itemId], + serverId: serverId + + }).then(reject, reject); + }); + break; + } case 'download': { require(['fileDownloader'], function (fileDownloader) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json index a4cbd770d8..5f8d5214ed 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json @@ -54,5 +54,13 @@ "HeaderDeleteItem": "Delete Item", "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "Refresh": "Refresh", - "RefreshQueued": "Refresh queued." + "RefreshQueued": "Refresh queued.", + "AddToCollection": "Add to Collection", + "NewCollection": "New Collection", + "LabelCollection": "Collection:", + "Help": "Help", + "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", + "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", + "LabelName": "Name:", + "NewCollectionNameExample": "Example: Star Wars Collection" } \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 9c6463b672..364098912e 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1767,13 +1767,13 @@ var AppInfo = {}; define("libjass", [bowerPath + "/libjass/libjass", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency); + define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency); define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency); define("recordingCreator", [embyWebComponentsBowerPath + "/recordingcreator/recordingcreator"], returnFirstDependency); define("recordingEditor", [embyWebComponentsBowerPath + "/recordingcreator/recordingeditor"], returnFirstDependency); define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency); define("backdrop", [embyWebComponentsBowerPath + "/backdrop/backdrop"], returnFirstDependency); define("fetchHelper", [embyWebComponentsBowerPath + "/fetchhelper"], returnFirstDependency); - define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency); define("tvguide", [embyWebComponentsBowerPath + "/guide/guide", 'embyRouter'], returnFirstDependency); diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 25d9978ebc..f3b0aa3de8 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -436,7 +436,7 @@ paper-input label, paper-textarea label { color: #ccc; } -.ui-body-b .selectLabel:not(.selectLabelFocus) { +.ui-body-b .selectLabelUnfocused { color: #ccc; } @@ -586,5 +586,5 @@ paper-progress.mini #progressContainer { } .formDialog.background-theme-b { - background-color: #202020; + background-color: #181818; } From 6a539b8f3a6d94fb9ad8b2740a7e39cba2b3442f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 May 2016 02:08:44 -0400 Subject: [PATCH 005/126] use shared playlist editor --- .../emby-webcomponents/.bower.json | 8 +- .../collectioneditor/collectioneditor.js | 8 +- .../dialoghelper/dialoghelper.js | 7 +- .../emby-select/emby-select.css | 2 +- .../emby-webcomponents/itemcontextmenu.js | 31 +- .../emby-webcomponents/itemhelper.js | 20 +- .../playlisteditor/playlisteditor.js | 279 ++++++++++++++++++ .../emby-webcomponents/strings/en-US.json | 6 +- .../playlisteditor/playlisteditor.js | 236 --------------- dashboard-ui/scripts/librarybrowser.js | 25 +- dashboard-ui/scripts/librarylist.js | 18 +- dashboard-ui/scripts/playlistmanager.js | 23 -- dashboard-ui/scripts/site.js | 2 +- 13 files changed, 362 insertions(+), 303 deletions(-) create mode 100644 dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js delete mode 100644 dashboard-ui/components/playlisteditor/playlisteditor.js delete mode 100644 dashboard-ui/scripts/playlistmanager.js diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index b18bf2bd01..53ae8b770c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.65", - "_release": "1.3.65", + "version": "1.3.70", + "_release": "1.3.70", "_resolution": { "type": "version", - "tag": "1.3.65", - "commit": "8a512f0acee81e973007eb43566b7d3aebb7a613" + "tag": "1.3.70", + "commit": "5430fc4c71fcc8e5929ee2e12120e2dc7e8c9011" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js index fa63a886f1..5a939d6712 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js @@ -89,7 +89,7 @@ dialogHelper.close(dlg); require(['toast'], function (toast) { - toast(globalize.translate('MessageItemsAdded')); + toast(globalize.translate('sharedcomponents#MessageItemsAdded')); }); }); } @@ -118,7 +118,7 @@ var html = ''; - html += ''; + html += ''; html += result.Items.map(function (i) { @@ -201,7 +201,7 @@ } }); - content.querySelector('.btnSubmit').addEventListener('submit', function () { + content.querySelector('.btnSubmit').addEventListener('click', function () { // Do a fake form submit this the button isn't a real submit button var fakeSubmit = document.createElement('input'); fakeSubmit.setAttribute('type', 'submit'); @@ -216,7 +216,7 @@ }, 500); }); - content.querySelector('.newCollectionForm').addEventListener('submit', onSubmit); + content.querySelector('form').addEventListener('submit', onSubmit); content.querySelector('.fldSelectedItemIds', content).value = items.join(','); diff --git a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js index 06270feae6..e03b51d86d 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js @@ -3,15 +3,12 @@ var globalOnOpenCallback; function enableAnimation() { + if (browser.animate) { return true; } - if (browser.mobile || browser.tv) { - return false; - } - - return true; + return false; } function dialogHashHandler(dlg, hash, resolve) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css index 483579441a..867b08e8a2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css @@ -16,7 +16,7 @@ font-family: inherit; font-weight: inherit; color: inherit; - padding: .6em .8em .3em 0; + padding: .35em .8em .3em 0; cursor: pointer; outline: none !important; width: 100%; diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js index 7913209747..911078e397 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemcontextmenu.js @@ -1,4 +1,4 @@ -define(['apphost', 'globalize', 'connectionManager'], function (appHost, globalize, connectionManager) { +define(['apphost', 'globalize', 'connectionManager', 'itemHelper'], function (appHost, globalize, connectionManager, itemHelper) { function getCommands(options) { @@ -11,10 +11,19 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali var commands = []; - commands.push({ - name: globalize.translate('sharedcomponents#AddToCollection'), - id: 'addtocollection' - }); + if (itemHelper.supportsAddingToCollection(item)) { + commands.push({ + name: globalize.translate('sharedcomponents#AddToCollection'), + id: 'addtocollection' + }); + } + + if (itemHelper.supportsAddingToPlaylist(item)) { + commands.push({ + name: globalize.translate('sharedcomponents#AddToPlaylist'), + id: 'addtoplaylist' + }); + } if (item.CanDelete) { commands.push({ @@ -71,6 +80,18 @@ define(['apphost', 'globalize', 'connectionManager'], function (appHost, globali }); break; } + case 'addtoplaylist': + { + require(['playlistEditor'], function (playlistEditor) { + + new playlistEditor().show({ + items: [itemId], + serverId: serverId + + }).then(reject, reject); + }); + break; + } case 'download': { require(['fileDownloader'], function (fileDownloader) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js index 6bb706adbd..b7f0a6448a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js @@ -48,7 +48,25 @@ define([], function () { return name; } + function supportsAddingToCollection(item) { + var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'Episode', 'TvChannel', 'Program', 'MusicAlbum', 'Timer']; + + return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo'; + } + + function supportsAddingToPlaylist(item) { + if (item.Type == 'Program') { + return false; + } + if (item.Type == 'Timer') { + return false; + } + return item.RunTimeTicks || item.IsFolder || item.Type == "Genre" || item.Type == "MusicGenre" || item.Type == "MusicArtist"; + } + return { - getDisplayName: getDisplayName + getDisplayName: getDisplayName, + supportsAddingToCollection: supportsAddingToCollection, + supportsAddingToPlaylist: supportsAddingToPlaylist }; }); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js new file mode 100644 index 0000000000..a423a07ce9 --- /dev/null +++ b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js @@ -0,0 +1,279 @@ +define(['shell', 'dialogHelper', 'loading', 'layoutManager', 'connectionManager', 'scrollHelper', 'embyRouter', 'globalize', 'paper-checkbox', 'paper-input', 'paper-icon-button-light', 'emby-select', 'html!./../icons/nav.html', 'css!./../formdialog'], function (shell, dialogHelper, loading, layoutManager, connectionManager, scrollHelper, embyRouter, globalize) { + + var lastPlaylistId = ''; + var currentServerId; + + function parentWithClass(elem, className) { + + while (!elem.classList || !elem.classList.contains(className)) { + elem = elem.parentNode; + + if (!elem) { + return null; + } + } + + return elem; + } + + function onSubmit(e) { + + loading.show(); + + var panel = parentWithClass(this, 'dialog'); + + var playlistId = panel.querySelector('#selectPlaylistToAddTo').value; + var apiClient = connectionManager.getApiClient(currentServerId); + + if (playlistId) { + lastPlaylistId = playlistId; + addToPlaylist(apiClient, panel, playlistId); + } else { + createPlaylist(apiClient, panel); + } + + e.preventDefault(); + return false; + } + + function createPlaylist(apiClient, dlg) { + + var url = apiClient.getUrl("Playlists", { + + Name: dlg.querySelector('#txtNewPlaylistName').value, + Ids: dlg.querySelector('.fldSelectedItemIds').value || '', + userId: apiClient.getCurrentUserId() + + }); + + apiClient.ajax({ + type: "POST", + url: url, + dataType: "json" + + }).then(function (result) { + + loading.hide(); + + var id = result.Id; + + dialogHelper.close(dlg); + redirectToPlaylist(apiClient, id); + }); + } + + function redirectToPlaylist(apiClient, id) { + + apiClient.getItem(apiClient.getCurrentUserId(), id).then(function (item) { + + embyRouter.showItem(item); + }); + } + + function addToPlaylist(apiClient, dlg, id) { + + var url = apiClient.getUrl("Playlists/" + id + "/Items", { + + Ids: dlg.querySelector('.fldSelectedItemIds').value || '', + userId: apiClient.getCurrentUserId() + }); + + apiClient.ajax({ + type: "POST", + url: url + + }).then(function () { + + loading.hide(); + + dialogHelper.close(dlg); + + require(['toast'], function (toast) { + toast(globalize.translate('sharedcomponents#MessageItemsAdded')); + }); + }); + } + + function triggerChange(select) { + select.dispatchEvent(new CustomEvent('change', {})); + } + + function populatePlaylists(panel) { + + var select = panel.querySelector('#selectPlaylistToAddTo'); + + loading.hide(); + + panel.querySelector('.newPlaylistInfo').classList.add('hide'); + + var options = { + + Recursive: true, + IncludeItemTypes: "Playlist", + SortBy: 'SortName' + }; + + var apiClient = connectionManager.getApiClient(currentServerId); + apiClient.getItems(apiClient.getCurrentUserId(), options).then(function (result) { + + var html = ''; + + html += ''; + + html += result.Items.map(function (i) { + + return ''; + }); + + select.innerHTML = html; + select.value = lastPlaylistId || ''; + triggerChange(select); + + loading.hide(); + }); + } + + function getEditorHtml() { + + var html = ''; + + html += '
'; + html += '
'; + html += '
'; + + html += '
'; + html += ''; + html += '
'; + + html += '
'; + + html += '
'; + html += ''; + html += '
'; + + html += '
'; + + // newPlaylistInfo + html += '
'; + + html += '
'; + html += '
'; + html += '' + globalize.translate('sharedcomponents#ButtonOk') + ''; + html += '
'; + + html += ''; + + html += '
'; + html += '
'; + html += '
'; + + return html; + } + + function initEditor(content, items) { + + content.querySelector('#selectPlaylistToAddTo').addEventListener('change', function () { + if (this.value) { + content.querySelector('.newPlaylistInfo').classList.add('hide'); + content.querySelector('#txtNewPlaylistName').removeAttribute('required'); + } else { + content.querySelector('.newPlaylistInfo').classList.remove('hide'); + content.querySelector('#txtNewPlaylistName').setAttribute('required', 'required'); + } + }); + + populatePlaylists(content); + + content.querySelector('.btnSubmit').addEventListener('click', function () { + // 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 = content.querySelector('form'); + 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); + }); + + content.querySelector('form').addEventListener('submit', onSubmit); + + content.querySelector('.fldSelectedItemIds', content).value = items.join(','); + + if (items.length) { + content.querySelector('.fldSelectPlaylist').classList.remove('hide'); + populatePlaylists(content); + } else { + content.querySelector('.fldSelectPlaylist').classList.add('hide'); + + var selectPlaylistToAddTo = content.querySelector('#selectPlaylistToAddTo'); + selectPlaylistToAddTo.innerHTML = ''; + selectPlaylistToAddTo.value = ''; + triggerChange(selectPlaylistToAddTo); + } + } + + function playlisteditor() { + + var self = this; + + self.show = function (options) { + + var items = options.items || {}; + currentServerId = options.serverId; + + var dialogOptions = { + removeOnClose: true, + scrollY: false + }; + + if (layoutManager.tv) { + dialogOptions.size = 'fullscreen'; + } else { + dialogOptions.size = 'small'; + } + + var dlg = dialogHelper.createDialog(dialogOptions); + + dlg.classList.add('formDialog'); + + var html = ''; + var title = globalize.translate('sharedcomponents#AddToPlaylist'); + + html += '
'; + html += ''; + html += '
'; + html += title; + html += '
'; + + html += '
'; + + html += getEditorHtml(); + + dlg.innerHTML = html; + document.body.appendChild(dlg); + + initEditor(dlg, items); + + dlg.querySelector('.btnCancel').addEventListener('click', function () { + + dialogHelper.close(dlg); + }); + + if (layoutManager.tv) { + scrollHelper.centerFocus.on(dlg.querySelector('.dialogContent'), false); + } + + return new Promise(function (resolve, reject) { + + dlg.addEventListener('close', resolve); + dialogHelper.open(dlg); + }); + }; + } + + return playlisteditor; +}); \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json index 5f8d5214ed..df48e73a80 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/en-US.json @@ -62,5 +62,9 @@ "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", "LabelName": "Name:", - "NewCollectionNameExample": "Example: Star Wars Collection" + "NewCollectionNameExample": "Example: Star Wars Collection", + "MessageItemsAdded": "Items added.", + "OptionNew": "New...", + "LabelPlaylist": "Playlist:", + "AddToPlaylist": "Add to Playlist" } \ No newline at end of file diff --git a/dashboard-ui/components/playlisteditor/playlisteditor.js b/dashboard-ui/components/playlisteditor/playlisteditor.js deleted file mode 100644 index 8f90e9a03e..0000000000 --- a/dashboard-ui/components/playlisteditor/playlisteditor.js +++ /dev/null @@ -1,236 +0,0 @@ -define(['dialogHelper', 'jQuery', 'paper-input', 'paper-icon-button-light'], function (dialogHelper, $) { - - var lastPlaylistId = ''; - - function redirectToPlaylist(id) { - - var context = getParameterByName('context'); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).then(function (item) { - - Dashboard.navigate(LibraryBrowser.getHref(item, context)); - - }); - } - - function onAddToPlaylistFormSubmit() { - - Dashboard.showLoadingMsg(); - - var panel = $(this).parents('.dialog')[0]; - - var playlistId = $('#selectPlaylistToAddTo', panel).val(); - - if (playlistId) { - lastPlaylistId = playlistId; - addToPlaylist(panel, playlistId); - } else { - createPlaylist(panel); - } - - return false; - } - - function createPlaylist(dlg) { - - var url = ApiClient.getUrl("Playlists", { - - Name: $('#txtNewPlaylistName', dlg).val(), - Ids: $('.fldSelectedItemIds', dlg).val() || '', - userId: Dashboard.getCurrentUserId() - - }); - - ApiClient.ajax({ - type: "POST", - url: url, - dataType: "json" - - }).then(function (result) { - - Dashboard.hideLoadingMsg(); - - var id = result.Id; - - dialogHelper.close(dlg); - redirectToPlaylist(id); - }); - } - - function addToPlaylist(dlg, id) { - - var url = ApiClient.getUrl("Playlists/" + id + "/Items", { - - Ids: $('.fldSelectedItemIds', dlg).val() || '', - userId: Dashboard.getCurrentUserId() - }); - - ApiClient.ajax({ - type: "POST", - url: url - - }).then(function () { - - Dashboard.hideLoadingMsg(); - - dialogHelper.close(dlg); - require(['toast'], function (toast) { - toast(Globalize.translate('MessageAddedToPlaylistSuccess')); - }); - - }); - } - - function onDialogClosed() { - - $(this).remove(); - Dashboard.hideLoadingMsg(); - } - - function populatePlaylists(panel) { - - var select = $('#selectPlaylistToAddTo', panel); - - if (!select.length) { - - $('#txtNewPlaylistName', panel).val('').focus(); - return; - } - - Dashboard.showLoadingMsg(); - - $('.newPlaylistInfo', panel).hide(); - - var options = { - - Recursive: true, - IncludeItemTypes: "Playlist", - SortBy: 'SortName' - }; - - ApiClient.getItems(Dashboard.getCurrentUserId(), options).then(function (result) { - - var html = ''; - - html += ''; - - html += result.Items.map(function (i) { - - return ''; - }); - - select.html(html).val(lastPlaylistId || '').trigger('change'); - - Dashboard.hideLoadingMsg(); - }); - } - - function getEditorHtml() { - - var html = ''; - - html += '
'; - - html += '
'; - html += ''; - html += ''; - html += '
'; - - html += '
'; - - html += '
'; - html += ''; - html += '
'; - - html += '
'; - - // newPlaylistInfo - html += '
'; - - html += '
'; - html += '
'; - html += ''; - html += '
'; - - html += ''; - - html += '
'; - - return html; - } - - function initEditor(content, items) { - - $('#selectPlaylistToAddTo', content).on('change', function () { - - if (this.value) { - $('.newPlaylistInfo', content).hide(); - $('input', content).removeAttr('required'); - } else { - $('.newPlaylistInfo', content).show(); - $('input', content).attr('required', 'required'); - } - - }).trigger('change'); - - populatePlaylists(content); - - $('form', content).on('submit', onAddToPlaylistFormSubmit); - - $('.fldSelectedItemIds', content).val(items.join(',')); - - if (items.length) { - $('.fldSelectPlaylist', content).show(); - populatePlaylists(content); - } else { - $('.fldSelectPlaylist', content).hide(); - $('#selectPlaylistToAddTo', content).html('').val('').trigger('change'); - } - } - - function playlisteditor() { - - var self = this; - - self.show = function (items) { - - items = items || []; - - var dlg = dialogHelper.createDialog({ - size: 'small' - }); - - dlg.classList.add('ui-body-b'); - dlg.classList.add('background-theme-b'); - - var html = ''; - - var title = Globalize.translate('HeaderAddToPlaylist'); - - html += '
'; - html += ''; - html += '
'; - html += title; - html += '
'; - html += '
'; - - html += getEditorHtml(); - - dlg.innerHTML = html; - document.body.appendChild(dlg); - - initEditor(dlg, items); - - $(dlg).on('close', onDialogClosed); - - dialogHelper.open(dlg); - - $('.btnCancel', dlg).on('click', function () { - - dialogHelper.close(dlg); - }); - }; - } - - return playlisteditor; -}); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 21fffed159..b359ead742 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1,4 +1,4 @@ -define(['playlistManager', 'scrollHelper', 'appSettings', 'appStorage', 'apphost', 'datetime', 'jQuery', 'itemHelper', 'mediaInfo', 'scrollStyles'], function (playlistManager, scrollHelper, appSettings, appStorage, appHost, datetime, $, itemHelper, mediaInfo) { +define(['scrollHelper', 'appSettings', 'appStorage', 'apphost', 'datetime', 'jQuery', 'itemHelper', 'mediaInfo', 'scrollStyles'], function (scrollHelper, appSettings, appStorage, appHost, datetime, $, itemHelper, mediaInfo) { function parentWithClass(elem, className) { @@ -670,11 +670,11 @@ var commands = []; - if (LibraryBrowser.supportsAddingToCollection(item)) { + if (itemHelper.supportsAddingToCollection(item)) { commands.push('addtocollection'); } - if (playlistManager.supportsPlaylists(item)) { + if (itemHelper.supportsAddingToPlaylist(item)) { commands.push('playlist'); } @@ -938,9 +938,11 @@ }); break; case 'playlist': - require(['playlistManager'], function (playlistManager) { - - playlistManager.showPanel([itemId]); + require(['playlistEditor'], function (playlistEditor) { + new playlistEditor().show({ + items: items, + serverId: serverId + }); }); break; case 'delete': @@ -1561,13 +1563,6 @@ return html; }, - supportsAddingToCollection: function (item) { - - var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'Episode', 'TvChannel', 'Program', 'MusicAlbum', 'Timer']; - - return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo'; - }, - enableSync: function (item, user) { if (AppInfo.isNativeApp && !Dashboard.capabilities().SupportsSync) { return false; @@ -1604,7 +1599,7 @@ itemCommands.push('shuffle'); } - if (playlistManager.supportsPlaylists(item)) { + if (itemHelper.supportsAddingToPlaylist(item)) { if (options.showRemoveFromPlaylist) { itemCommands.push('removefromplaylist'); @@ -1614,7 +1609,7 @@ } if (options.showAddToCollection !== false) { - if (LibraryBrowser.supportsAddingToCollection(item)) { + if (itemHelper.supportsAddingToCollection(item)) { itemCommands.push('addtocollection'); } } diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 88d6865d52..12a6441fa6 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -503,9 +503,11 @@ }); break; case 'playlist': - require(['playlistManager'], function (playlistManager) { - - playlistManager.showPanel([itemId]); + require(['playlistEditor'], function (playlistEditor) { + new playlistEditor().show({ + items: [itemId], + serverId: serverId + }); }); break; case 'delete': @@ -1244,11 +1246,13 @@ hideSelections(); break; case 'playlist': - require(['playlistManager'], function (playlistManager) { - - playlistManager.showPanel(items); - hideSelections(); + require(['playlistEditor'], function (playlistEditor) { + new playlistEditor().show({ + items: items, + serverId: serverId + }); }); + hideSelections(); break; case 'delete': LibraryBrowser.deleteItems(items).then(function () { diff --git a/dashboard-ui/scripts/playlistmanager.js b/dashboard-ui/scripts/playlistmanager.js deleted file mode 100644 index a97624832e..0000000000 --- a/dashboard-ui/scripts/playlistmanager.js +++ /dev/null @@ -1,23 +0,0 @@ -define([], function () { - - return { - - showPanel: function (items) { - - require(['playlisteditor'], function (playlisteditor) { - new playlisteditor().show(items); - }); - }, - - supportsPlaylists: function (item) { - - if (item.Type == 'Program') { - return false; - } - if (item.Type == 'Timer') { - return false; - } - return item.RunTimeTicks || item.IsFolder || item.Type == "Genre" || item.Type == "MusicGenre" || item.Type == "MusicArtist"; - } - }; -}); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 364098912e..7e140ea28d 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1769,6 +1769,7 @@ var AppInfo = {}; define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency); define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency); + define("playlistEditor", [embyWebComponentsBowerPath + "/playlisteditor/playlisteditor"], returnFirstDependency); define("recordingCreator", [embyWebComponentsBowerPath + "/recordingcreator/recordingcreator"], returnFirstDependency); define("recordingEditor", [embyWebComponentsBowerPath + "/recordingcreator/recordingeditor"], returnFirstDependency); define("mediaInfo", [embyWebComponentsBowerPath + "/mediainfo/mediainfo"], returnFirstDependency); @@ -1804,7 +1805,6 @@ var AppInfo = {}; paths.appStorage = apiClientBowerPath + "/appstorage"; } - paths.playlistManager = "scripts/playlistmanager"; paths.syncDialog = "scripts/sync"; var sha1Path = bowerPath + "/cryptojslib/components/sha1-min"; From e73b3a16039e6ba277d412a890632b1cba5f5cd8 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 May 2016 12:47:14 -0400 Subject: [PATCH 006/126] update dialogs --- .../emby-webcomponents/.bower.json | 8 ++-- .../actionsheet/actionsheet.js | 38 +++++++++---------- .../emby-webcomponents/itemhelper.js | 2 +- .../playlisteditor/playlisteditor.js | 2 +- 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 53ae8b770c..17ce203658 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.70", - "_release": "1.3.70", + "version": "1.3.71", + "_release": "1.3.71", "_resolution": { "type": "version", - "tag": "1.3.70", - "commit": "5430fc4c71fcc8e5929ee2e12120e2dc7e8c9011" + "tag": "1.3.71", + "commit": "05594c6dee06ea554f3f76a2efc9f50a1e19573a" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index d9e6ece16b..9711dd7e26 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -193,32 +193,30 @@ // Seeing an issue in some non-chrome browsers where this is requiring a double click //var eventName = browser.firefox ? 'mousedown' : 'click'; - var eventName = 'click'; + var selectedId; + + dlg.addEventListener('click', function (e) { + + var actionSheetMenuItem = parentWithClass(e.target, 'actionSheetMenuItem'); + + if (actionSheetMenuItem) { + selectedId = actionSheetMenuItem.getAttribute('data-id'); + dialogHelper.close(dlg); + } + + }); return new Promise(function (resolve, reject) { - dlg.addEventListener(eventName, function (e) { + dlg.addEventListener('close', function () { - var actionSheetMenuItem = parentWithClass(e.target, 'actionSheetMenuItem'); + if (selectedId) { + if (options.callback) { + options.callback(selectedId); + } - if (actionSheetMenuItem) { - - var selectedId = actionSheetMenuItem.getAttribute('data-id'); - - dialogHelper.close(dlg); - - // Add a delay here to allow the click animation to finish, for nice effect - setTimeout(function () { - - if (options.callback) { - options.callback(selectedId); - } - - resolve(selectedId); - - }, 100); + resolve(selectedId); } - }); dialogHelper.open(dlg); diff --git a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js index b7f0a6448a..1056f685f2 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/itemhelper.js @@ -49,7 +49,7 @@ define([], function () { } function supportsAddingToCollection(item) { - var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'Episode', 'TvChannel', 'Program', 'MusicAlbum', 'Timer']; + var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'TvChannel', 'Program', 'MusicAlbum', 'Timer']; return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo'; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js index a423a07ce9..0e0f446ec7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js +++ b/dashboard-ui/bower_components/emby-webcomponents/playlisteditor/playlisteditor.js @@ -142,7 +142,7 @@ html += '
'; html += '
'; - html += ''; + html += ''; html += '
'; html += '
'; From 464dca5b925906e10aea14cff8cb6b8dc42bae5d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 May 2016 14:09:09 -0400 Subject: [PATCH 007/126] update tv view --- dashboard-ui/scripts/moviesrecommended.js | 4 +- dashboard-ui/scripts/tvlatest.js | 81 ------------- dashboard-ui/scripts/tvrecommended.js | 109 ++++++++++++++---- .../thirdparty/paper-button-style.css | 2 +- dashboard-ui/tv.html | 27 ++--- 5 files changed, 104 insertions(+), 119 deletions(-) delete mode 100644 dashboard-ui/scripts/tvlatest.js diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index 6d1ccab082..404987fd7f 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -75,7 +75,7 @@ function loadResume(page, userId, parentId) { - var screenWidth = $(window).width(); + var screenWidth = window.innerWidth; var options = { @@ -83,7 +83,7 @@ SortOrder: "Descending", IncludeItemTypes: "Movie", Filters: "IsResumable", - Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1600 ? 4 : 3), + Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1600 ? 4 : 3), Recursive: true, Fields: "PrimaryImageAspectRatio,MediaSourceCount,SyncInfo", CollapseBoxSetItems: false, diff --git a/dashboard-ui/scripts/tvlatest.js b/dashboard-ui/scripts/tvlatest.js deleted file mode 100644 index 3d958ca089..0000000000 --- a/dashboard-ui/scripts/tvlatest.js +++ /dev/null @@ -1,81 +0,0 @@ -define([], function () { - - function getView() { - - return 'Thumb'; - } - - function loadLatest(context, params) { - - Dashboard.showLoadingMsg(); - - var userId = Dashboard.getCurrentUserId(); - - var parentId = params.topParentId; - - var options = { - - IncludeItemTypes: "Episode", - Limit: 30, - Fields: "PrimaryImageAspectRatio,SyncInfo", - ParentId: parentId, - ImageTypeLimit: 1, - EnableImageTypes: "Primary,Backdrop,Banner,Thumb" - }; - - ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) { - - var view = getView(); - var html = ''; - - if (view == 'ThumbCard') { - - html += LibraryBrowser.getPosterViewHtml({ - items: items, - shape: "backdrop", - preferThumb: true, - inheritThumb: false, - showUnplayedIndicator: false, - showChildCountIndicator: true, - overlayText: false, - showParentTitle: true, - lazy: true, - showTitle: true, - cardLayout: true - }); - - } else if (view == 'Thumb') { - - html += LibraryBrowser.getPosterViewHtml({ - items: items, - shape: "backdrop", - preferThumb: true, - inheritThumb: false, - showParentTitle: false, - showUnplayedIndicator: false, - showChildCountIndicator: true, - overlayText: false, - centerText: true, - lazy: true, - showTitle: false, - overlayPlayButton: AppInfo.enableAppLayouts - }); - } - - var elem = context.querySelector('#latestEpisodes'); - elem.innerHTML = html; - ImageLoader.lazyChildren(elem); - - Dashboard.hideLoadingMsg(); - }); - } - return function (view, params, tabContent) { - - var self = this; - - self.renderTab = function() { - - loadLatest(tabContent, params); - }; - }; -}); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 92f424c1f3..3c51a15825 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -20,13 +20,79 @@ loadResume(); loadNextUp(); + loadLatest(); + } + + function loadLatest() { + + Dashboard.showLoadingMsg(); + + var userId = Dashboard.getCurrentUserId(); + + var parentId = params.topParentId; + + var options = { + + IncludeItemTypes: "Episode", + Limit: 30, + Fields: "PrimaryImageAspectRatio,SyncInfo", + ParentId: parentId, + ImageTypeLimit: 1, + EnableImageTypes: "Primary,Backdrop,Banner,Thumb" + }; + + ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) { + + var viewStyle = getView(); + var html = ''; + + if (viewStyle == 'ThumbCard') { + + html += LibraryBrowser.getPosterViewHtml({ + items: items, + shape: getThumbShape(), + preferThumb: true, + inheritThumb: false, + showUnplayedIndicator: false, + showChildCountIndicator: true, + overlayText: false, + showParentTitle: true, + lazy: true, + showTitle: true, + cardLayout: true + }); + + } else if (viewStyle == 'Thumb') { + + html += LibraryBrowser.getPosterViewHtml({ + items: items, + shape: getThumbShape(), + preferThumb: true, + inheritThumb: false, + showParentTitle: false, + showUnplayedIndicator: false, + showChildCountIndicator: true, + overlayText: false, + centerText: true, + lazy: true, + showTitle: false, + overlayPlayButton: AppInfo.enableAppLayouts + }); + } + + var elem = view.querySelector('#latestEpisodes'); + elem.innerHTML = html; + ImageLoader.lazyChildren(elem); + + Dashboard.hideLoadingMsg(); + }); } function loadNextUp() { var query = { - Limit: 24, + Limit: enableScrollX() ? 24 : 15, Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo", UserId: Dashboard.getCurrentUserId(), ImageTypeLimit: 1, @@ -50,7 +116,7 @@ html += libraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "backdrop", + shape: getThumbShape(), showTitle: true, preferThumb: true, showParentTitle: true, @@ -63,7 +129,7 @@ html += libraryBrowser.getPosterViewHtml({ items: result.Items, - shape: "backdrop", + shape: getThumbShape(), showTitle: true, showParentTitle: true, overlayText: false, @@ -94,7 +160,7 @@ var parentId = LibraryMenu.getTopParentId(); - var limit = 6; + var screenWidth = window.innerWidth; var options = { @@ -102,7 +168,7 @@ SortOrder: "Descending", IncludeItemTypes: "Episode", Filters: "IsResumable", - Limit: limit, + Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1600 ? 4 : 3), Recursive: true, Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData,SyncInfo", ExcludeLocationTypes: "Virtual", @@ -160,12 +226,23 @@ self.initTab = function () { var tabContent = self.tabContent; + + var resumableItems = tabContent.querySelector('#resumableItems'); + var nextUpItems = tabContent.querySelector('#nextUpItems'); + var latestEpisodes = tabContent.querySelector('#latestEpisodes'); + if (enableScrollX()) { - tabContent.querySelector('#resumableItems').classList.add('hiddenScrollX'); + resumableItems.classList.add('hiddenScrollX'); + nextUpItems.classList.add('hiddenScrollX'); + latestEpisodes.classList.add('hiddenScrollX'); } else { - tabContent.querySelector('#resumableItems').classList.remove('hiddenScrollX'); + resumableItems.classList.remove('hiddenScrollX'); + nextUpItems.classList.remove('hiddenScrollX'); + latestEpisodes.classList.remove('hiddenScrollX'); } - libraryBrowser.createCardMenus(tabContent.querySelector('#resumableItems')); + libraryBrowser.createCardMenus(resumableItems); + libraryBrowser.createCardMenus(nextUpItems); + libraryBrowser.createCardMenus(latestEpisodes); }; self.renderTab = function () { @@ -185,21 +262,18 @@ case 0: break; case 1: - depends.push('scripts/tvlatest'); - break; - case 2: depends.push('scripts/tvupcoming'); break; - case 3: + case 2: depends.push('scripts/tvshows'); break; - case 4: + case 3: depends.push('scripts/episodes'); break; - case 5: + case 4: depends.push('scripts/tvgenres'); break; - case 6: + case 5: depends.push('scripts/tvstudios'); break; default: @@ -248,11 +322,6 @@ baseUrl += '?topParentId=' + topParentId; } - if (enableScrollX()) { - view.querySelector('#resumableItems').classList.add('hiddenScrollX'); - } else { - view.querySelector('#resumableItems').classList.remove('hiddenScrollX'); - } libraryBrowser.createCardMenus(view.querySelector('#resumableItems')); libraryBrowser.configurePaperLibraryTabs(view, mdlTabs, view.querySelectorAll('.pageTabContent'), [0, 1, 2, 4, 5, 6]); diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index f3b0aa3de8..de4d8cccd1 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -39,7 +39,7 @@ color: #52B54B; } - paper-button[raised].submit { + paper-button[raised].submit, paper-button[raised] { background: #52B54B; color: #fff; } diff --git a/dashboard-ui/tv.html b/dashboard-ui/tv.html index 35581be1fc..eb2af7a7a2 100644 --- a/dashboard-ui/tv.html +++ b/dashboard-ui/tv.html @@ -2,12 +2,11 @@
- - - - - - + + + + +
@@ -25,22 +24,20 @@

${HeaderNextUp}

${ButtonSync}
-
+
-
-

${HeaderLatestEpisodes}

${ButtonSync}
-
+
-
+
-
+
@@ -69,7 +66,7 @@
-
+
@@ -82,13 +79,13 @@
-
+
-
+
From d3f8229d049a82582a67a51f99f4b6a9a3326c84 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 22 May 2016 18:37:50 -0400 Subject: [PATCH 008/126] handle flat tv folders --- dashboard-ui/scripts/tvlatest.js | 81 +++++++++++++++++++ dashboard-ui/scripts/tvrecommended.js | 109 +++++--------------------- dashboard-ui/tv.html | 27 ++++--- 3 files changed, 116 insertions(+), 101 deletions(-) create mode 100644 dashboard-ui/scripts/tvlatest.js diff --git a/dashboard-ui/scripts/tvlatest.js b/dashboard-ui/scripts/tvlatest.js new file mode 100644 index 0000000000..3d958ca089 --- /dev/null +++ b/dashboard-ui/scripts/tvlatest.js @@ -0,0 +1,81 @@ +define([], function () { + + function getView() { + + return 'Thumb'; + } + + function loadLatest(context, params) { + + Dashboard.showLoadingMsg(); + + var userId = Dashboard.getCurrentUserId(); + + var parentId = params.topParentId; + + var options = { + + IncludeItemTypes: "Episode", + Limit: 30, + Fields: "PrimaryImageAspectRatio,SyncInfo", + ParentId: parentId, + ImageTypeLimit: 1, + EnableImageTypes: "Primary,Backdrop,Banner,Thumb" + }; + + ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) { + + var view = getView(); + var html = ''; + + if (view == 'ThumbCard') { + + html += LibraryBrowser.getPosterViewHtml({ + items: items, + shape: "backdrop", + preferThumb: true, + inheritThumb: false, + showUnplayedIndicator: false, + showChildCountIndicator: true, + overlayText: false, + showParentTitle: true, + lazy: true, + showTitle: true, + cardLayout: true + }); + + } else if (view == 'Thumb') { + + html += LibraryBrowser.getPosterViewHtml({ + items: items, + shape: "backdrop", + preferThumb: true, + inheritThumb: false, + showParentTitle: false, + showUnplayedIndicator: false, + showChildCountIndicator: true, + overlayText: false, + centerText: true, + lazy: true, + showTitle: false, + overlayPlayButton: AppInfo.enableAppLayouts + }); + } + + var elem = context.querySelector('#latestEpisodes'); + elem.innerHTML = html; + ImageLoader.lazyChildren(elem); + + Dashboard.hideLoadingMsg(); + }); + } + return function (view, params, tabContent) { + + var self = this; + + self.renderTab = function() { + + loadLatest(tabContent, params); + }; + }; +}); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvrecommended.js b/dashboard-ui/scripts/tvrecommended.js index 3c51a15825..92f424c1f3 100644 --- a/dashboard-ui/scripts/tvrecommended.js +++ b/dashboard-ui/scripts/tvrecommended.js @@ -20,79 +20,13 @@ loadResume(); loadNextUp(); - loadLatest(); - } - - function loadLatest() { - - Dashboard.showLoadingMsg(); - - var userId = Dashboard.getCurrentUserId(); - - var parentId = params.topParentId; - - var options = { - - IncludeItemTypes: "Episode", - Limit: 30, - Fields: "PrimaryImageAspectRatio,SyncInfo", - ParentId: parentId, - ImageTypeLimit: 1, - EnableImageTypes: "Primary,Backdrop,Banner,Thumb" - }; - - ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) { - - var viewStyle = getView(); - var html = ''; - - if (viewStyle == 'ThumbCard') { - - html += LibraryBrowser.getPosterViewHtml({ - items: items, - shape: getThumbShape(), - preferThumb: true, - inheritThumb: false, - showUnplayedIndicator: false, - showChildCountIndicator: true, - overlayText: false, - showParentTitle: true, - lazy: true, - showTitle: true, - cardLayout: true - }); - - } else if (viewStyle == 'Thumb') { - - html += LibraryBrowser.getPosterViewHtml({ - items: items, - shape: getThumbShape(), - preferThumb: true, - inheritThumb: false, - showParentTitle: false, - showUnplayedIndicator: false, - showChildCountIndicator: true, - overlayText: false, - centerText: true, - lazy: true, - showTitle: false, - overlayPlayButton: AppInfo.enableAppLayouts - }); - } - - var elem = view.querySelector('#latestEpisodes'); - elem.innerHTML = html; - ImageLoader.lazyChildren(elem); - - Dashboard.hideLoadingMsg(); - }); } function loadNextUp() { var query = { - Limit: enableScrollX() ? 24 : 15, + Limit: 24, Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo", UserId: Dashboard.getCurrentUserId(), ImageTypeLimit: 1, @@ -116,7 +50,7 @@ html += libraryBrowser.getPosterViewHtml({ items: result.Items, - shape: getThumbShape(), + shape: "backdrop", showTitle: true, preferThumb: true, showParentTitle: true, @@ -129,7 +63,7 @@ html += libraryBrowser.getPosterViewHtml({ items: result.Items, - shape: getThumbShape(), + shape: "backdrop", showTitle: true, showParentTitle: true, overlayText: false, @@ -160,7 +94,7 @@ var parentId = LibraryMenu.getTopParentId(); - var screenWidth = window.innerWidth; + var limit = 6; var options = { @@ -168,7 +102,7 @@ SortOrder: "Descending", IncludeItemTypes: "Episode", Filters: "IsResumable", - Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1600 ? 4 : 3), + Limit: limit, Recursive: true, Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData,SyncInfo", ExcludeLocationTypes: "Virtual", @@ -226,23 +160,12 @@ self.initTab = function () { var tabContent = self.tabContent; - - var resumableItems = tabContent.querySelector('#resumableItems'); - var nextUpItems = tabContent.querySelector('#nextUpItems'); - var latestEpisodes = tabContent.querySelector('#latestEpisodes'); - if (enableScrollX()) { - resumableItems.classList.add('hiddenScrollX'); - nextUpItems.classList.add('hiddenScrollX'); - latestEpisodes.classList.add('hiddenScrollX'); + tabContent.querySelector('#resumableItems').classList.add('hiddenScrollX'); } else { - resumableItems.classList.remove('hiddenScrollX'); - nextUpItems.classList.remove('hiddenScrollX'); - latestEpisodes.classList.remove('hiddenScrollX'); + tabContent.querySelector('#resumableItems').classList.remove('hiddenScrollX'); } - libraryBrowser.createCardMenus(resumableItems); - libraryBrowser.createCardMenus(nextUpItems); - libraryBrowser.createCardMenus(latestEpisodes); + libraryBrowser.createCardMenus(tabContent.querySelector('#resumableItems')); }; self.renderTab = function () { @@ -262,18 +185,21 @@ case 0: break; case 1: - depends.push('scripts/tvupcoming'); + depends.push('scripts/tvlatest'); break; case 2: - depends.push('scripts/tvshows'); + depends.push('scripts/tvupcoming'); break; case 3: - depends.push('scripts/episodes'); + depends.push('scripts/tvshows'); break; case 4: - depends.push('scripts/tvgenres'); + depends.push('scripts/episodes'); break; case 5: + depends.push('scripts/tvgenres'); + break; + case 6: depends.push('scripts/tvstudios'); break; default: @@ -322,6 +248,11 @@ baseUrl += '?topParentId=' + topParentId; } + if (enableScrollX()) { + view.querySelector('#resumableItems').classList.add('hiddenScrollX'); + } else { + view.querySelector('#resumableItems').classList.remove('hiddenScrollX'); + } libraryBrowser.createCardMenus(view.querySelector('#resumableItems')); libraryBrowser.configurePaperLibraryTabs(view, mdlTabs, view.querySelectorAll('.pageTabContent'), [0, 1, 2, 4, 5, 6]); diff --git a/dashboard-ui/tv.html b/dashboard-ui/tv.html index eb2af7a7a2..35581be1fc 100644 --- a/dashboard-ui/tv.html +++ b/dashboard-ui/tv.html @@ -2,11 +2,12 @@
- - - - - + + + + + +
@@ -24,20 +25,22 @@

${HeaderNextUp}

${ButtonSync}
-
+
+
+

${HeaderLatestEpisodes}

${ButtonSync}
-
+
-
+
-
+
@@ -66,7 +69,7 @@
-
+
@@ -79,13 +82,13 @@
-
+
-
+
From 8d79586417190d81664f7317e02e3f6231934908 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 23 May 2016 00:11:37 -0400 Subject: [PATCH 009/126] save series name separately --- dashboard-ui/css/site.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 180caadea3..07900c4745 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -309,6 +309,15 @@ iron-icon { min-height: 24px; } +.mainAnimatedPage { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + will-change: transform; +} + /* Without this, no content will be displayed in mobile safari */ .pageContainer { overflow-x: visible !important; From 3f3a76cc54cda6052c4225326148b150c46ad9b1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 23 May 2016 13:51:33 -0400 Subject: [PATCH 010/126] restore live tv settings --- dashboard-ui/livetvsettings.html | 5 +++++ dashboard-ui/scripts/livetvsettings.js | 2 ++ 2 files changed, 7 insertions(+) diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index 90df07c12d..72c108b2a0 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -28,7 +28,12 @@
${LabelNumberOfGuideDaysHelp}
+
+ + ${OptionTVMovies} +
+
${LabelRecordingPathHelp}
diff --git a/dashboard-ui/scripts/livetvsettings.js b/dashboard-ui/scripts/livetvsettings.js index cdf7a7de0b..f6792fd715 100644 --- a/dashboard-ui/scripts/livetvsettings.js +++ b/dashboard-ui/scripts/livetvsettings.js @@ -7,6 +7,7 @@ $('#selectGuideDays', page).val(config.GuideDays || ''); + $('#chkMovies', page).checked(config.EnableMovieProviders); $('#chkOrganize', page).checked(config.EnableAutoOrganize); $('#chkConvertRecordings', page).checked(config.EnableRecordingEncoding); $('#chkPreserveAudio', page).checked(config.EnableOriginalAudioWithEncodedRecordings || false); @@ -32,6 +33,7 @@ ApiClient.getNamedConfiguration("livetv").then(function (config) { config.GuideDays = $('#selectGuideDays', form).val() || null; + config.EnableMovieProviders = $('#chkMovies', form).checked(); config.EnableAutoOrganize = $('#chkOrganize', form).checked(); config.EnableRecordingEncoding = $('#chkConvertRecordings', form).checked(); config.EnableOriginalAudioWithEncodedRecordings = $('#chkPreserveAudio', form).checked(); From 75ef43aeb929375ea5360b1006d08a663f40cb3d Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 23 May 2016 13:54:38 -0400 Subject: [PATCH 011/126] update components --- .../emby-webcomponents/.bower.json | 8 ++--- .../actionsheet/actionsheet.js | 2 +- .../emby-select/emby-select.css | 4 +++ .../emby-select/emby-select.js | 7 ++++- .../emby-webcomponents/strings/da.json | 20 ++++++++++--- .../emby-webcomponents/strings/es-MX.json | 20 ++++++++++--- .../emby-webcomponents/strings/kk.json | 20 ++++++++++--- .../emby-webcomponents/strings/nb.json | 20 ++++++++++--- .../emby-webcomponents/strings/nl.json | 20 ++++++++++--- .../emby-webcomponents/strings/ru.json | 20 ++++++++++--- dashboard-ui/movies.html | 4 +-- dashboard-ui/mypreferencesdisplay.html | 17 +++++------ dashboard-ui/myprofile.html | 29 +++++++++---------- dashboard-ui/mysyncjob.html | 2 +- dashboard-ui/scripts/moviesrecommended.js | 28 +++++++++--------- .../thirdparty/paper-button-style.css | 2 +- dashboard-ui/useredit.html | 2 +- dashboard-ui/userparentalcontrol.html | 2 +- 18 files changed, 152 insertions(+), 75 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 17ce203658..43d7a133b0 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.71", - "_release": "1.3.71", + "version": "1.3.73", + "_release": "1.3.73", "_resolution": { "type": "version", - "tag": "1.3.71", - "commit": "05594c6dee06ea554f3f76a2efc9f50a1e19573a" + "tag": "1.3.73", + "commit": "0727aaabe8c649aa53cd732507f11a295a581ac3" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js index 9711dd7e26..c77e412b45 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js +++ b/dashboard-ui/bower_components/emby-webcomponents/actionsheet/actionsheet.js @@ -210,7 +210,7 @@ dlg.addEventListener('close', function () { - if (selectedId) { + if (selectedId != null) { if (options.callback) { options.callback(selectedId); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css index 867b08e8a2..a5a6d6684c 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css @@ -22,6 +22,10 @@ width: 100%; } +.selectContainer { + margin-bottom: 1.5em; +} + .selectLabel { display: block; } diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js index 304b29d5e1..1353e3579a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js +++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js @@ -22,6 +22,11 @@ select.dispatchEvent(evt); } + function setValue(select, value) { + + select.value = value; + } + function showActionSheeet(select) { var labelElem = getLabel(select); @@ -33,7 +38,7 @@ title: title }).then(function (value) { - select.value = value; + setValue(select, value); triggerChange(select); }); } diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json index 768c4960e1..0a0c46756e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/da.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/da.json @@ -1,7 +1,4 @@ { - "Delete": "Delete", - "HeaderDeleteItem": "Delete Item", - "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "ValueSpecialEpisodeName": "Special - {0}", "Share": "Del", "ServerUpdateNeeded": "Denne Emby server b\u00f8r opdateres. For at downloade den nyeste version bes\u00f8g venligst {0}", @@ -53,6 +50,21 @@ "Edit": "Rediger", "Download": "Hent", "Advanced": "Avanceret", + "Delete": "Delete", + "HeaderDeleteItem": "Delete Item", + "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "Refresh": "Opdater", - "RefreshQueued": "Opdatering sat i k\u00f8" + "RefreshQueued": "Opdatering sat i k\u00f8", + "AddToCollection": "Add to Collection", + "NewCollection": "New Collection", + "LabelCollection": "Collection:", + "Help": "Help", + "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", + "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", + "LabelName": "Name:", + "NewCollectionNameExample": "Example: Star Wars Collection", + "MessageItemsAdded": "Items added.", + "OptionNew": "New...", + "LabelPlaylist": "Playlist:", + "AddToPlaylist": "Add to Playlist" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json index 5a3a80b2e6..f76a1f1d5b 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/es-MX.json @@ -1,7 +1,4 @@ { - "Delete": "Delete", - "HeaderDeleteItem": "Delete Item", - "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "ValueSpecialEpisodeName": "Especial - {0}", "Share": "Compartir", "ServerUpdateNeeded": "Este Servidor Emby necesita ser actualizado. Para descargar la ultima versi\u00f3n, por favor visite {0}", @@ -53,6 +50,21 @@ "Edit": "Editar", "Download": "Descargar", "Advanced": "Avanzado", + "Delete": "Delete", + "HeaderDeleteItem": "Delete Item", + "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "Refresh": "Actualizar", - "RefreshQueued": "Actualizaci\u00f3n programada" + "RefreshQueued": "Actualizaci\u00f3n programada", + "AddToCollection": "Add to Collection", + "NewCollection": "New Collection", + "LabelCollection": "Collection:", + "Help": "Help", + "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", + "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", + "LabelName": "Name:", + "NewCollectionNameExample": "Example: Star Wars Collection", + "MessageItemsAdded": "Items added.", + "OptionNew": "New...", + "LabelPlaylist": "Playlist:", + "AddToPlaylist": "Add to Playlist" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json index f6ff796571..97c7f455ed 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/kk.json @@ -1,7 +1,4 @@ { - "Delete": "Delete", - "HeaderDeleteItem": "Delete Item", - "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "ValueSpecialEpisodeName": "\u0410\u0440\u043d\u0430\u0439\u044b - {0}", "Share": "\u041e\u0440\u0442\u0430\u049b\u0442\u0430\u0441\u0443", "ServerUpdateNeeded": "\u041e\u0441\u044b Emby Server \u0436\u0430\u04a3\u0430\u0440\u0442\u044b\u043b\u0443\u044b \u049b\u0430\u0436\u0435\u0442. \u0421\u043e\u04a3\u0493\u044b \u043d\u04b1\u0441\u049b\u0430\u0441\u044b\u043d \u0436\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443 \u04af\u0448\u0456\u043d, {0} \u043a\u0456\u0440\u0456\u04a3\u0456\u0437", @@ -53,6 +50,21 @@ "Edit": "\u04e8\u04a3\u0434\u0435\u0443", "Download": "\u0416\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443", "Advanced": "\u041a\u0435\u04a3\u0435\u0439\u0442\u0456\u043b\u0433\u0435\u043d", + "Delete": "\u0416\u043e\u044e", + "HeaderDeleteItem": "\u0422\u0430\u0440\u043c\u0430\u049b\u0442\u044b \u0436\u043e\u044e", + "ConfirmDeleteItem": "\u041e\u0441\u044b \u0442\u0430\u0440\u043c\u0430\u049b\u0442\u044b \u0436\u043e\u0439\u0493\u0430\u043d\u0434\u0430, \u043e\u043b \u0444\u0430\u0439\u043b \u0436\u04af\u0439\u0435\u0441\u0456\u043d\u0435\u043d \u0434\u0435, \u0442\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430\u04a3\u044b\u0437\u0434\u0430\u043d \u0434\u0430 \u0436\u043e\u0439\u044b\u043b\u0430\u0434\u044b. \u0428\u044b\u043d\u044b\u043c\u0435\u043d \u0436\u0430\u043b\u0493\u0430\u0441\u0442\u044b\u0440\u0443 \u049b\u0430\u0436\u0435\u0442 \u043f\u0435?", "Refresh": "\u0416\u0430\u04a3\u0493\u044b\u0440\u0442\u0443", - "RefreshQueued": "\u0416\u0430\u04a3\u0493\u044b\u0440\u0442\u0443 \u043a\u0435\u0437\u0435\u043a\u0442\u0435." + "RefreshQueued": "\u0416\u0430\u04a3\u0493\u044b\u0440\u0442\u0443 \u043a\u0435\u0437\u0435\u043a\u0442\u0435.", + "AddToCollection": "\u0416\u0438\u044b\u043d\u0442\u044b\u049b\u049b\u0430 \u04af\u0441\u0442\u0435\u0443", + "NewCollection": "\u0416\u0430\u04a3\u0430 \u0436\u0438\u044b\u043d\u0442\u044b\u049b", + "LabelCollection": "\u0416\u0438\u044b\u043d\u0442\u044b\u049b:", + "Help": "\u0410\u043d\u044b\u049b\u0442\u0430\u043c\u0430", + "NewCollectionHelp": "\u0416\u0438\u044b\u043d\u0442\u044b\u049b\u0442\u0430\u0440 \u0441\u0456\u0437\u0433\u0435 \u0424\u0438\u043b\u044c\u043c\u0434\u0435\u0440\u0434\u0456\u04a3 \u0436\u04d9\u043d\u0435 \u0442\u0430\u0493\u044b \u0431\u0430\u0441\u049b\u0430 \u0442\u0430\u0441\u044b\u0493\u044b\u0448\u0445\u0430\u043d\u0430\u043d\u044b\u04a3 \u043c\u0430\u0437\u043c\u04b1\u043d\u044b\u043d \u0434\u0435\u0440\u0431\u0435\u0441\u0442\u0435\u043d\u0434\u0456\u0440\u0456\u043b\u0433\u0435\u043d \u0442\u043e\u043f\u0442\u0430\u0443\u043b\u0430\u0440\u044b\u043c\u0435\u043d \u0442\u0430\u043c\u0430\u0448\u0430\u043b\u0430\u043d\u0443 \u04af\u0448\u0456\u043d \u0440\u04b1\u049b\u0441\u0430\u0442 \u0435\u0442\u0435\u0434\u0456.", + "SearchForCollectionInternetMetadata": "\u0421\u0443\u0440\u0435\u0442\u0442\u0435\u043c\u0435\u043b\u0435\u0440 \u0431\u0435\u043d \u043c\u0435\u0442\u0430\u0434\u0435\u0440\u0435\u043a\u0442\u0435\u0440\u0434\u0456 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0442\u0435\u043d \u0456\u0437\u0434\u0435\u0443", + "LabelName": "\u0410\u0442\u044b:", + "NewCollectionNameExample": "\u041c\u044b\u0441\u0430\u043b: \u0416\u04b1\u043b\u0434\u044b\u0437 \u0441\u043e\u0493\u044b\u0441\u0442\u0430\u0440\u044b (\u0436\u0438\u044b\u043d\u0442\u044b\u049b)", + "MessageItemsAdded": "\u0422\u0430\u0440\u043c\u0430\u049b\u0442\u0430\u0440 \u04af\u0441\u0442\u0435\u043b\u0433\u0435\u043d.", + "OptionNew": "\u0416\u0430\u04a3\u0430...", + "LabelPlaylist": "\u041e\u0439\u043d\u0430\u0442\u0443 \u0442\u0456\u0437\u0456\u043c\u0456:", + "AddToPlaylist": "\u041e\u0439\u043d\u0430\u0442\u0443 \u0442\u0456\u0437\u0456\u043c\u0456\u043d\u0435 \u04af\u0441\u0442\u0435\u0443" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json index 6621a6d5e6..6d85a899a1 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nb.json @@ -1,7 +1,4 @@ { - "Delete": "Slett", - "HeaderDeleteItem": "Slett element", - "ConfirmDeleteItem": "Ved \u00e5 slette dette element vil du b\u00e5de slette det fra statement og mediebiblioteket. Er du sikker p\u00e5 at du vil forsette?", "ValueSpecialEpisodeName": "Spesial - {0}", "Share": "Del", "ServerUpdateNeeded": "Denne Emby serveren trenger en oppdatering. For \u00e5 laste ned nyeste versjon, vennligst bes\u00f8k: {0}", @@ -53,6 +50,21 @@ "Edit": "Endre", "Download": "Last ned", "Advanced": "Avansert", + "Delete": "Slett", + "HeaderDeleteItem": "Slett element", + "ConfirmDeleteItem": "Ved \u00e5 slette dette element vil du b\u00e5de slette det fra statement og mediebiblioteket. Er du sikker p\u00e5 at du vil forsette?", "Refresh": "Oppdater", - "RefreshQueued": "Oppdatering k\u00f8" + "RefreshQueued": "Oppdatering k\u00f8", + "AddToCollection": "Add to Collection", + "NewCollection": "New Collection", + "LabelCollection": "Collection:", + "Help": "Help", + "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", + "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", + "LabelName": "Name:", + "NewCollectionNameExample": "Example: Star Wars Collection", + "MessageItemsAdded": "Items added.", + "OptionNew": "New...", + "LabelPlaylist": "Playlist:", + "AddToPlaylist": "Add to Playlist" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json index 7e0d9eddd6..893b5a148f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/nl.json @@ -1,7 +1,4 @@ { - "Delete": "Verwijder", - "HeaderDeleteItem": "Item verwijderen", - "ConfirmDeleteItem": "Verwijderen van dit item zal het verwijderen uit zowel het bestandssysteem als de Media Bibliotheek. Weet u zeker dat u wilt doorgaan?", "ValueSpecialEpisodeName": "Speciaal - {0}", "Share": "Delen", "ServerUpdateNeeded": "Deze Emby Server moet worden bijgewerkt. Om de laatste versie te downloaden, gaat u naar {0}", @@ -53,6 +50,21 @@ "Edit": "Bewerken", "Download": "Downloaden", "Advanced": "Geavanceerd", + "Delete": "Verwijder", + "HeaderDeleteItem": "Item verwijderen", + "ConfirmDeleteItem": "Verwijderen van dit item zal het verwijderen uit zowel het bestandssysteem als de Media Bibliotheek. Weet u zeker dat u wilt doorgaan?", "Refresh": "Vernieuwen", - "RefreshQueued": "Vernieuwen wachtrij" + "RefreshQueued": "Vernieuwen wachtrij", + "AddToCollection": "Add to Collection", + "NewCollection": "New Collection", + "LabelCollection": "Collection:", + "Help": "Help", + "NewCollectionHelp": "Collections allow you to create personalized groupings of movies and other library content.", + "SearchForCollectionInternetMetadata": "Search the internet for artwork and metadata", + "LabelName": "Name:", + "NewCollectionNameExample": "Example: Star Wars Collection", + "MessageItemsAdded": "Items added.", + "OptionNew": "New...", + "LabelPlaylist": "Playlist:", + "AddToPlaylist": "Add to Playlist" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json index 60f933ae43..66e817eafb 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json +++ b/dashboard-ui/bower_components/emby-webcomponents/strings/ru.json @@ -1,7 +1,4 @@ { - "Delete": "Delete", - "HeaderDeleteItem": "Delete Item", - "ConfirmDeleteItem": "Deleting this item will delete it from both the file system and your media library. Are you sure you wish to continue?", "ValueSpecialEpisodeName": "\u0421\u043f\u0435\u0446\u044d\u043f\u0438\u0437\u043e\u0434 - {0}", "Share": "\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f", "ServerUpdateNeeded": "\u0414\u0430\u043d\u043d\u044b\u0439 Emby \u0421\u0435\u0440\u0432\u0435\u0440 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 {0}", @@ -53,6 +50,21 @@ "Edit": "\u041f\u0440\u0430\u0432\u0438\u0442\u044c", "Download": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c", "Advanced": "\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0435", + "Delete": "\u0423\u0434\u0430\u043b\u0438\u0442\u044c", + "HeaderDeleteItem": "\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430", + "ConfirmDeleteItem": "\u041f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043e\u043d \u0443\u0434\u0430\u043b\u0438\u0442\u0441\u044f \u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0438 \u0438\u0437 \u043c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0438. \u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c?", "Refresh": "\u041f\u043e\u0434\u043d\u043e\u0432\u0438\u0442\u044c", - "RefreshQueued": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438." + "RefreshQueued": "\u041f\u043e\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438.", + "AddToCollection": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e", + "NewCollection": "\u041d\u043e\u0432\u0430\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f", + "LabelCollection": "\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f:", + "Help": "\u0421\u043f\u0440\u0430\u0432\u043a\u0430", + "NewCollectionHelp": "\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u0438\u044f \u0444\u0438\u043b\u044c\u043c\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043c\u0435\u0434\u0438\u0430\u0442\u0435\u043a\u0438.", + "SearchForCollectionInternetMetadata": "\u0418\u0441\u043a\u0430\u0442\u044c \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435", + "LabelName": "\u0418\u043c\u044f (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435):", + "NewCollectionNameExample": "\u041f\u0440\u0438\u043c\u0435\u0440: \u0417\u0432\u0451\u0437\u0434\u043d\u044b\u0435 \u0432\u043e\u0439\u043d\u044b (\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f)", + "MessageItemsAdded": "\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b.", + "OptionNew": "\u041d\u043e\u0432\u043e\u0435...", + "LabelPlaylist": "\u041f\u043b\u0435\u0439-\u043b\u0438\u0441\u0442:", + "AddToPlaylist": "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u043b\u0435\u0439-\u043b\u0438\u0441\u0442" } \ No newline at end of file diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index b69b344b31..ee2607ae03 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -9,7 +9,7 @@
-