diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index db08f2170c..17f68b3351 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -29,14 +29,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/PolymerElements/iron-behaviors", + "homepage": "https://github.com/polymerelements/iron-behaviors", "_release": "1.0.12", "_resolution": { "type": "version", "tag": "v1.0.12", "commit": "657f526a2382a659cdf4e13be87ecc89261588a3" }, - "_source": "git://github.com/PolymerElements/iron-behaviors.git", + "_source": "git://github.com/polymerelements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-behaviors" + "_originalSource": "polymerelements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index 22433e6267..77b8d27811 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -33,14 +33,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/PolymerElements/iron-overlay-behavior", + "homepage": "https://github.com/polymerelements/iron-overlay-behavior", "_release": "1.1.2", "_resolution": { "type": "version", "tag": "v1.1.2", "commit": "40e39a971474f48f5c2c8ee7b8568a0ad5426bd8" }, - "_source": "git://github.com/PolymerElements/iron-overlay-behavior.git", + "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-overlay-behavior" + "_originalSource": "polymerelements/iron-overlay-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/neon-animation/.bower.json b/dashboard-ui/bower_components/neon-animation/.bower.json index fa31ad184d..67f935cf9f 100644 --- a/dashboard-ui/bower_components/neon-animation/.bower.json +++ b/dashboard-ui/bower_components/neon-animation/.bower.json @@ -54,7 +54,7 @@ "tag": "v1.0.8", "commit": "36656916b75a4715b025a03473620002c2650ee8" }, - "_source": "git://github.com/PolymerElements/neon-animation.git", + "_source": "git://github.com/polymerelements/neon-animation.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/neon-animation" + "_originalSource": "polymerelements/neon-animation" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-behaviors/.bower.json b/dashboard-ui/bower_components/paper-behaviors/.bower.json index a76af97568..713d584e4f 100644 --- a/dashboard-ui/bower_components/paper-behaviors/.bower.json +++ b/dashboard-ui/bower_components/paper-behaviors/.bower.json @@ -45,7 +45,7 @@ "tag": "v1.0.10", "commit": "4b244a542af2c6c271498dfb98b00ed284df1d6a" }, - "_source": "git://github.com/polymerelements/paper-behaviors.git", + "_source": "git://github.com/PolymerElements/paper-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-behaviors" + "_originalSource": "PolymerElements/paper-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index b59e0b67c3..8d106232c1 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -52,7 +52,7 @@ "tag": "v1.1.3", "commit": "f070288446f9e78fbe16b032ddb429a8e8015ee7" }, - "_source": "git://github.com/PolymerElements/paper-input.git", - "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-input" + "_source": "git://github.com/polymerelements/paper-input.git", + "_target": "^1.0.9", + "_originalSource": "polymerelements/paper-input" } \ No newline at end of file diff --git a/dashboard-ui/devices/ios/ios.css b/dashboard-ui/devices/ios/ios.css index 50c1a61015..e8a46c33c5 100644 --- a/dashboard-ui/devices/ios/ios.css +++ b/dashboard-ui/devices/ios/ios.css @@ -189,7 +189,8 @@ paper-tab { padding: 0; } -.cardBox { +/* Need the div specifier to gain preference over the value in card.css */ +div.cardBox { margin: 5px; } diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index 89cc7cf50f..07de463fe9 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -3,6 +3,7 @@ var supportsTextTracks; var hlsPlayer; var requiresSettingStartTimeOnStart; + var subtitleTrackIndexToSetOnPlaying; function htmlMediaRenderer(options) { @@ -134,6 +135,8 @@ var element = e.target; element.removeEventListener('playing', onOneVideoPlaying); + self.setCurrentTrackElement(subtitleTrackIndexToSetOnPlaying); + var requiresNativeControls = !self.enableCustomVideoControls(); if (requiresNativeControls) { @@ -384,6 +387,15 @@ tracks = tracks || []; + var currentTrackIndex = -1; + for (var i = 0, length = tracks.length; i < length; i++) { + if (tracks[i].isDefault) { + currentTrackIndex = i; + break; + } + } + subtitleTrackIndexToSetOnPlaying = currentTrackIndex; + if (enableHlsPlayer(val)) { setTracks(elem, tracks); @@ -407,14 +419,6 @@ playNow = true; } - var currentTrackIndex = -1; - for (var i = 0, length = tracks.length; i < length; i++) { - if (tracks[i].isDefault) { - currentTrackIndex = i; - break; - } - } - self.setCurrentTrackElement(currentTrackIndex); } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c5beccef38..2fc6555c74 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1759,6 +1759,11 @@ var AppInfo = {}; require(['themes/halloween/theme']); return; } + + if (month == 11 && day >= 18 && day <= 26) { + //require(['themes/holiday/theme']); + return; + } } function initRequire() { diff --git a/dashboard-ui/themes/holiday/bg.jpg b/dashboard-ui/themes/holiday/bg.jpg new file mode 100644 index 0000000000..7e9c87e279 Binary files /dev/null and b/dashboard-ui/themes/holiday/bg.jpg differ diff --git a/dashboard-ui/themes/holiday/style.css b/dashboard-ui/themes/holiday/style.css new file mode 100644 index 0000000000..b90e099f0e --- /dev/null +++ b/dashboard-ui/themes/holiday/style.css @@ -0,0 +1,28 @@ +.ui-body-b h1, .ui-body-b h2 { + color: #cc3333; +} + +.viewMenuBar, .holidayInfoButton { + color: #cc3333 !important; +} + +.barsMenuButton { + color: #cc3333 !important; +} + +.libraryViewNav .ui-btn-active { + border-bottom-color: #cc3333 !important; + color: #cc3333 !important; +} + +paper-button[raised].more { + background: #cc3333; +} + +.channelTimeslotHeader, .timeslotHeader { + background: #cc3333 !important; +} + +.channelTimeslotHeader { + border-right-color: #cc3333 !important; +} diff --git a/dashboard-ui/themes/holiday/theme.js b/dashboard-ui/themes/holiday/theme.js new file mode 100644 index 0000000000..b3531af48d --- /dev/null +++ b/dashboard-ui/themes/holiday/theme.js @@ -0,0 +1,91 @@ +(function () { + + var lastSound = 0; + var iconCreated; + var destroyed; + var currentSound; + + function onPageShow() { + + var page = this; + + if (!destroyed) { + + require(['css!themes/holiday/style.css']); + + if (!browserInfo.mobile) { + + if (!page.classList.contains('itemDetailPage')) { + Backdrops.setBackdropUrl(page, 'themes/holiday/bg.jpg'); + } + + if (lastSound == 0) { + playSound('http://github.com/MediaBrowser/Emby.Resources/raw/master/themes/halloween/monsterparadefade.mp3', .1); + } else if ((new Date().getTime() - lastSound) > 30000) { + playSound('http://github.com/MediaBrowser/Emby.Resources/raw/master/themes/halloween/howl.wav'); + } + } + + addIcon(); + } + } + + function onIconClick() { + + // todo: switch this to action sheet + + //require(['dialog'], function (dialog) { + // dialog({ + + // title: "Happy Halloween", + // message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?", + // callback: function (result) { + + // if (result == 1) { + // destroyTheme(); + // } + // }, + + // buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')] + // }); + //}); + } + + function addIcon() { + + if (iconCreated) { + return; + } + + iconCreated = true; + + var elem = document.createElement('paper-icon-button'); + elem.icon = 'info'; + elem.classList.add('holidayInfoButton'); + elem.addEventListener('click', onIconClick); + + var viewMenuSecondary = document.querySelector('.viewMenuSecondary'); + + if (viewMenuSecondary) { + viewMenuSecondary.insertBefore(elem, viewMenuSecondary.childNodes[0]); + } + } + + pageClassOn('pageshow', "libraryPage", onPageShow); + + function playSound(path, volume) { + + require(['howler'], function (howler) { + + var sound = new Howl({ + urls: [path], + volume: volume || .3 + }); + + sound.play(); + currentSound = sound; + lastSound = new Date().getTime(); + }); + } + +})(); \ No newline at end of file