From 15c2f1606af387d6f7070f984855d45f2be50faf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 15 Dec 2015 13:24:41 -0500 Subject: [PATCH] schedule recordings with a dialog --- .../iron-a11y-keys-behavior/.bower.json | 6 +- .../iron-dropdown/.bower.json | 11 +- .../iron-dropdown/.travis.yml | 22 ++ .../iron-dropdown/CONTRIBUTING.md | 72 +++++ .../bower_components/iron-dropdown/bower.json | 7 +- .../iron-dropdown/demo/index.html | 133 +++++---- .../iron-dropdown-scroll-manager.html | 4 + .../iron-dropdown/iron-dropdown.html | 53 +++- .../iron-dropdown/test/index.html | 4 +- .../iron-dropdown/test/iron-dropdown.html | 203 ++++++++++++-- .../iron-selector/.bower.json | 4 +- .../bower_components/paper-input/.bower.json | 6 +- .../paper-material/.bower.json | 8 +- .../paper-material/.travis.yml | 2 +- .../paper-material/bower.json | 2 +- .../paper-material-shared-styles.html | 40 +++ .../paper-material/paper-material.html | 27 +- .../paper-material/test/index.html | 15 +- .../paper-radio-button/.bower.json | 9 +- .../paper-radio-button/.travis.yml | 42 ++- .../paper-radio-button/bower.json | 3 +- .../paper-radio-button/demo/index.html | 120 ++++---- .../paper-radio-button/test/index.html | 15 +- .../bower_components/paper-ripple/.bower.json | 6 +- .../paper-toggle-button/.bower.json | 24 +- .../paper-toggle-button/.travis.yml | 24 ++ .../paper-toggle-button/CONTRIBUTING.md | 72 +++++ .../paper-toggle-button/bower.json | 20 +- .../paper-toggle-button/demo/index.html | 138 ++++----- .../paper-toggle-button/index.html | 8 +- .../paper-toggle-button/test/index.html | 15 +- .../recordingcreator/recordingcreator.js | 265 ++++++++++++++++++ .../recordingcreator.template.html | 61 ++++ dashboard-ui/livetvnewrecording.html | 86 ------ dashboard-ui/scripts/dashboardpage.js | 1 - dashboard-ui/scripts/itemdetailpage.js | 7 +- dashboard-ui/scripts/librarylist.js | 4 +- dashboard-ui/scripts/livetvcomponents.js | 5 +- dashboard-ui/scripts/livetvnewrecording.js | 256 ----------------- dashboard-ui/scripts/mediaplayer.js | 4 + dashboard-ui/scripts/syncactivity.js | 3 +- .../thirdparty/paper-button-style.css | 20 +- 42 files changed, 1097 insertions(+), 730 deletions(-) create mode 100644 dashboard-ui/bower_components/iron-dropdown/.travis.yml create mode 100644 dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md create mode 100644 dashboard-ui/bower_components/paper-material/paper-material-shared-styles.html create mode 100644 dashboard-ui/bower_components/paper-toggle-button/.travis.yml create mode 100644 dashboard-ui/bower_components/paper-toggle-button/CONTRIBUTING.md create mode 100644 dashboard-ui/components/recordingcreator/recordingcreator.js create mode 100644 dashboard-ui/components/recordingcreator/recordingcreator.template.html delete mode 100644 dashboard-ui/livetvnewrecording.html delete mode 100644 dashboard-ui/scripts/livetvnewrecording.js diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index c43fd8f6e2..9bc69e84d1 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -30,14 +30,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "ignore": [], - "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior", + "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", "_release": "1.1.0", "_resolution": { "type": "version", "tag": "v1.1.0", "commit": "cd8c972278c0d916bef57209d7dce5b81e67687c" }, - "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git", + "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-a11y-keys-behavior" + "_originalSource": "polymerelements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-dropdown/.bower.json b/dashboard-ui/bower_components/iron-dropdown/.bower.json index 3e3c7dec79..aca2b46fb4 100644 --- a/dashboard-ui/bower_components/iron-dropdown/.bower.json +++ b/dashboard-ui/bower_components/iron-dropdown/.bower.json @@ -1,7 +1,7 @@ { "name": "iron-dropdown", - "version": "1.0.6", - "description": "", + "version": "1.1.0", + "description": "An unstyled element that works similarly to a native browser select", "authors": [ "The Polymer Authors" ], @@ -35,11 +35,12 @@ "web-component-tester": "*", "iron-image": "polymerelements/iron-image#^1.0.0" }, - "_release": "1.0.6", + "ignore": [], + "_release": "1.1.0", "_resolution": { "type": "version", - "tag": "v1.0.6", - "commit": "9b52ccb37577b0e4b3d34f3795117d95648b39ff" + "tag": "v1.1.0", + "commit": "b09b0d57ba917bac9315de4761373d88e85ac52e" }, "_source": "git://github.com/polymerelements/iron-dropdown.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-dropdown/.travis.yml b/dashboard-ui/bower_components/iron-dropdown/.travis.yml new file mode 100644 index 0000000000..60801d0689 --- /dev/null +++ b/dashboard-ui/bower_components/iron-dropdown/.travis.yml @@ -0,0 +1,22 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install +env: + global: + - secure: Nd7sbgkYVekuQRB4K3svNCL3veA6t6aGopNP2FUxlJvQuzRV1vKV67angPvMUAFelEA7/rTzrFPBMfNbsz9C2wInLLLPux4wEk1MQX+2KYZVeXKMHjgl8iQKMXnodaL7XXwBPg0L7053TWtYkIt8wZ/vN0JGPQFKhlQkSrduztkPCJQfkFsMPJ7SudPG3Ld0UPBVxo8TwH/d44p8VhLGiI0oEWw3GnGZZ1T7RJLDAVBwj1BiVHAOaS0SSeOR3ngpZyXbk8OItgzw4o/bbAt2yrHMfwymBy0Xv9v3G0QLFJnMi/gE2lWnN4+IttUPI8gVyr1TuiTgtFxdwteLO3R5iFe+qlQjq0VGssmAHcPwtLhvrT4wEkGMc8ZeyW11z+GdkIw4XHGACWj+9Jz9f19mJd9xU3fkJ+f5mFiB8vEkzjsUI9pswgd3RoHt2WewcVdHnCED2wRdQCw9H34dX7d2ieWKPl/pv+EKZOgEJJ8UNZMyKnj57Y25WRrTpIQBt6p9uVv5MsiZQm7Sd1pYQnJKPQ+BxvvL5fsoT1YkFSjyz9gwijtftXhfL8KLB6i04V3mra3f9d5hc20wAOt+ad+mTOkaM/aGxE/I3Ko13BceMvRSNzuz+N2WE6FEJj1NuOCW/AeSh5/6n9nnlDeu7Nu7VeM9kjk4dyBGNRDWLNcSCEk= + - secure: aFsYKL6Sw8/r57wzj3pnzEwBE1mnTajJasHAbXgQMd336S2Sq/f39DCNTXgKBA4AKZGvWKe8w9nzaocQoMa4l9bLWEBJMCMPQFawOhTkuEjsLjpU3g74b46/EhjBP5zixR32xoyF5o9FTzC6UyrDjt2XpKwIQJYxaEfoyIW1vTPdoasWdaG5rXvWFTsmXtaMDpCKFH9aQ1DHn9Sbi9NZlR4izdULsbv9GZwg53xvuH4xYEkGtB29KKy04uK1nJ+9SmRWTAnu4Q/ivYWlbwBArjiYTTi0wclvDNvT1iaFNAaeK2pJea8CnoyJJ0pg9NcuzZtStGUvP00kGUpJQ4lqkr+gBCHDPYtoZ17XCz59cg6LrhG1q//vPi7Yz0xW51GHuwmcVs+PsjmWaRuO/1UFreDCQYf+GU4I1pQZf2q1R4m8noe4i5CcFXLKTrC4udBzPmzVB4As2LsxRc3HCIXmhaMxI8MJwdkQBA22u4vCwU2xpqBawJocj0Gvbeme6wG99PW7+XSkijQDk2cTJ5/CJtY22nAECvn4tve3OVvybSTjQ1yipLxJm/dtjgEXFWtknFZr++tId88wPd3EBtrwEhliD3zD/TyLPO2RPZGuI0i6oD3O89P5d8qp66T/eByDr1IEm0+FIQjgiCEMbhmaIuUKGG2GCfwPglI3uR0kbg0= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/iron-dropdown/bower.json b/dashboard-ui/bower_components/iron-dropdown/bower.json index 3ff762f62e..a047d31933 100644 --- a/dashboard-ui/bower_components/iron-dropdown/bower.json +++ b/dashboard-ui/bower_components/iron-dropdown/bower.json @@ -1,7 +1,7 @@ { "name": "iron-dropdown", - "version": "1.0.6", - "description": "", + "version": "1.1.0", + "description": "An unstyled element that works similarly to a native browser select", "authors": [ "The Polymer Authors" ], @@ -34,5 +34,6 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "web-component-tester": "*", "iron-image": "polymerelements/iron-image#^1.0.0" - } + }, + "ignore": [] } diff --git a/dashboard-ui/bower_components/iron-dropdown/demo/index.html b/dashboard-ui/bower_components/iron-dropdown/demo/index.html index 2b1e449ac4..3ddbaf209b 100644 --- a/dashboard-ui/bower_components/iron-dropdown/demo/index.html +++ b/dashboard-ui/bower_components/iron-dropdown/demo/index.html @@ -19,22 +19,34 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -35,8 +41,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @@ -51,6 +57,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + + + + + + + + + + + + + + + diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index 52d44c1907..ebb18c5b7b 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.0.8", "commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff" }, - "_source": "git://github.com/PolymerElements/iron-selector.git", + "_source": "git://github.com/polymerelements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "PolymerElements/iron-selector" + "_originalSource": "polymerelements/iron-selector" } \ 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/bower_components/paper-material/.bower.json b/dashboard-ui/bower_components/paper-material/.bower.json index af7e846750..70b484b742 100644 --- a/dashboard-ui/bower_components/paper-material/.bower.json +++ b/dashboard-ui/bower_components/paper-material/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-material", - "version": "1.0.4", + "version": "1.0.5", "description": "A material design container that looks like a lifted sheet of paper", "private": true, "authors": [ @@ -31,11 +31,11 @@ "test-fixture": "polymerelements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0" }, - "_release": "1.0.4", + "_release": "1.0.5", "_resolution": { "type": "version", - "tag": "v1.0.4", - "commit": "05f3800d37f8c5cad63ac2cf279f01bffb7d4fe8" + "tag": "v1.0.5", + "commit": "8a906004d8d0071004aafcd4bc4536ed2cf14bde" }, "_source": "git://github.com/polymerelements/paper-material.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/paper-material/.travis.yml b/dashboard-ui/bower_components/paper-material/.travis.yml index c21eaf432e..da8b9341ed 100644 --- a/dashboard-ui/bower_components/paper-material/.travis.yml +++ b/dashboard-ui/bower_components/paper-material/.travis.yml @@ -11,7 +11,7 @@ env: - secure: f/3XYrYjM8aXLe9kqM/MjHQ6IEsDRuoxDqM+l2JiR3v2Nw7lP6ZyXSNvKm8bN+VNU7ubSzAmRbUGnRU7e61BhnGzuLXjOqxYeJLWZaqoSm9TDz3re3rd7wB2ddAhRokeSSPO2KeAgr6C02P9M3Au1DiO1G66fuWVH62WtzW4+qY= node_js: 4 addons: - firefox: '42.0' + firefox: latest apt: sources: - google-chrome diff --git a/dashboard-ui/bower_components/paper-material/bower.json b/dashboard-ui/bower_components/paper-material/bower.json index 296b062288..d5cf3a8c6e 100644 --- a/dashboard-ui/bower_components/paper-material/bower.json +++ b/dashboard-ui/bower_components/paper-material/bower.json @@ -1,6 +1,6 @@ { "name": "paper-material", - "version": "1.0.4", + "version": "1.0.5", "description": "A material design container that looks like a lifted sheet of paper", "private": true, "authors": [ diff --git a/dashboard-ui/bower_components/paper-material/paper-material-shared-styles.html b/dashboard-ui/bower_components/paper-material/paper-material-shared-styles.html new file mode 100644 index 0000000000..3fed5004a9 --- /dev/null +++ b/dashboard-ui/bower_components/paper-material/paper-material-shared-styles.html @@ -0,0 +1,40 @@ + + + + + diff --git a/dashboard-ui/bower_components/paper-material/paper-material.html b/dashboard-ui/bower_components/paper-material/paper-material.html index 3affcc23ae..e754d4ea33 100644 --- a/dashboard-ui/bower_components/paper-material/paper-material.html +++ b/dashboard-ui/bower_components/paper-material/paper-material.html @@ -10,6 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + - - +--> paper-material tests @@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/paper-radio-button/.bower.json b/dashboard-ui/bower_components/paper-radio-button/.bower.json index 76f069b236..3c43d3d1b3 100644 --- a/dashboard-ui/bower_components/paper-radio-button/.bower.json +++ b/dashboard-ui/bower_components/paper-radio-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-radio-button", - "version": "1.0.11", + "version": "1.0.12", "description": "A material design radio button", "authors": [ "The Polymer Authors" @@ -28,17 +28,18 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "Polymer/web-component-tester#^3.3.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "main": "paper-radio-button.html", - "_release": "1.0.11", + "_release": "1.0.12", "_resolution": { "type": "version", - "tag": "v1.0.11", - "commit": "5ba3cec1efcbdb0df3e5df28930473ea02539845" + "tag": "v1.0.12", + "commit": "d7a5a090968c8448d7568208e05fb626fe74ab64" }, "_source": "git://github.com/PolymerElements/paper-radio-button.git", "_target": "~1.0.5", diff --git a/dashboard-ui/bower_components/paper-radio-button/.travis.yml b/dashboard-ui/bower_components/paper-radio-button/.travis.yml index 6b09147460..eaa3f82af3 100644 --- a/dashboard-ui/bower_components/paper-radio-button/.travis.yml +++ b/dashboard-ui/bower_components/paper-radio-button/.travis.yml @@ -1,28 +1,24 @@ language: node_js sudo: false -matrix: - include: - - node_js: stable - script: xvfb-run wct - addons: - firefox: latest - apt: - sources: - - google-chrome - packages: - - google-chrome-stable - - node_js: node - script: - - | - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then - wct -s 'default' - fi before_script: -- npm install web-component-tester -- npm install bower -- export PATH=$PWD/node_modules/.bin:$PATH -- bower install + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install + - npm install polylint + - polylint env: global: - - secure: P6B/39IMzhm/jBmxD+0CDZEPYNMMaizAgpn4MXUUlAmmdMJNwovzvm/kYtVyoPfGiJ08NJh5tNRLQbkG12OH71lQ7ReTiru0hEy93ssmIh0U6ZUAAxTZVQ9SxB5gjrQU8/0fVJ9tNd0kBklHH4FoK+ZtJurhKLJaXhXsupXpcuI= - - secure: rxY6LCY199Lt1aRGK8Hpq3wjx8xcpb91x21fJStKROlpJTlfp+c0yevK1oYkklzChJWEFewFNTYlHbm9pc7TCyXK2WCR0v1GgSeJAUpP4TONkdpueeOvsVC/CGB9mIXEtfUEh2CCdWDj+D7JGLdUvbgmu8C3gfqfP+AyXbQt5Jc= + - secure: P6B/39IMzhm/jBmxD+0CDZEPYNMMaizAgpn4MXUUlAmmdMJNwovzvm/kYtVyoPfGiJ08NJh5tNRLQbkG12OH71lQ7ReTiru0hEy93ssmIh0U6ZUAAxTZVQ9SxB5gjrQU8/0fVJ9tNd0kBklHH4FoK+ZtJurhKLJaXhXsupXpcuI= + - secure: rxY6LCY199Lt1aRGK8Hpq3wjx8xcpb91x21fJStKROlpJTlfp+c0yevK1oYkklzChJWEFewFNTYlHbm9pc7TCyXK2WCR0v1GgSeJAUpP4TONkdpueeOvsVC/CGB9mIXEtfUEh2CCdWDj+D7JGLdUvbgmu8C3gfqfP+AyXbQt5Jc= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-radio-button/bower.json b/dashboard-ui/bower_components/paper-radio-button/bower.json index f40c0ec60b..f1e8839beb 100644 --- a/dashboard-ui/bower_components/paper-radio-button/bower.json +++ b/dashboard-ui/bower_components/paper-radio-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-radio-button", - "version": "1.0.11", + "version": "1.0.12", "description": "A material design radio button", "authors": [ "The Polymer Authors" @@ -28,6 +28,7 @@ }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "Polymer/web-component-tester#^3.3.0", diff --git a/dashboard-ui/bower_components/paper-radio-button/demo/index.html b/dashboard-ui/bower_components/paper-radio-button/demo/index.html index d7ba7d4ece..f46b734a61 100644 --- a/dashboard-ui/bower_components/paper-radio-button/demo/index.html +++ b/dashboard-ui/bower_components/paper-radio-button/demo/index.html @@ -16,89 +16,63 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - + + + - -
-
-

Enabled

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+
+

Radio buttons can be checked or unchecked, or disabled entirely

+ + + -
-

Disabled

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+

Radio buttons can hide the ripple effect using the noink attribute

+ + + -
-

Color

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+

Radio buttons can be styled using custom properties

+ + +
diff --git a/dashboard-ui/bower_components/paper-radio-button/test/index.html b/dashboard-ui/bower_components/paper-radio-button/test/index.html index bc6ad6e08f..364a068195 100644 --- a/dashboard-ui/bower_components/paper-radio-button/test/index.html +++ b/dashboard-ui/bower_components/paper-radio-button/test/index.html @@ -1,14 +1,11 @@ - - - - +--> paper-radio-button tests @@ -17,8 +14,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json index 2f654d71c6..157225ee71 100644 --- a/dashboard-ui/bower_components/paper-ripple/.bower.json +++ b/dashboard-ui/bower_components/paper-ripple/.bower.json @@ -32,14 +32,14 @@ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" }, "ignore": [], - "homepage": "https://github.com/polymerelements/paper-ripple", + "homepage": "https://github.com/PolymerElements/paper-ripple", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5" }, - "_source": "git://github.com/polymerelements/paper-ripple.git", + "_source": "git://github.com/PolymerElements/paper-ripple.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/paper-ripple" + "_originalSource": "PolymerElements/paper-ripple" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-toggle-button/.bower.json b/dashboard-ui/bower_components/paper-toggle-button/.bower.json index 5525eebd49..20d0921d9b 100644 --- a/dashboard-ui/bower_components/paper-toggle-button/.bower.json +++ b/dashboard-ui/bower_components/paper-toggle-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-toggle-button", - "version": "1.0.11", + "version": "1.0.12", "description": "A material design toggle button control", "authors": [ "The Polymer Authors" @@ -21,24 +21,26 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#^1.1.0", - "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", - "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0" + "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "devDependencies": { - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "Polymer/web-component-tester#^3.3.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", - "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0" + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "Polymer/web-component-tester#^3.3.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.11", + "main": "paper-toggle-button.html", + "_release": "1.0.12", "_resolution": { "type": "version", - "tag": "v1.0.11", - "commit": "a6c8e6d76c4645042b4f346dedad18bcd6d8ad10" + "tag": "v1.0.12", + "commit": "363fb16086662fea165668ffe10be233e02e0aa9" }, "_source": "git://github.com/PolymerElements/paper-toggle-button.git", "_target": "~1.0.5", diff --git a/dashboard-ui/bower_components/paper-toggle-button/.travis.yml b/dashboard-ui/bower_components/paper-toggle-button/.travis.yml new file mode 100644 index 0000000000..f5f84ae269 --- /dev/null +++ b/dashboard-ui/bower_components/paper-toggle-button/.travis.yml @@ -0,0 +1,24 @@ +language: node_js +sudo: false +before_script: + - npm install web-component-tester + - npm install bower + - 'export PATH=$PWD/node_modules/.bin:$PATH' + - bower install + - npm install polylint + - polylint +env: + global: + - secure: T4tEkegUT5RhgMTQAUxtXQROsEEIGYyQZ3MzrEX9Xf8XjCYk7pZmK50UXuHa61xO5F5M1bQV0mu4lPcl41Nzws3GKOmKrprbwdhLGfJY5DsqRr6rVnWKvCf57T1jXciEbr17dQyW0kqP41m4LSvNRRJwxv52bk9Nxu22X1HMrD0= + - secure: rKcth+F7zQJu/nMxEdxRDgyNAR/IQVuduPEmrgbUShIsbN48QoI+Bwdqj38NPpKj8LdVE8pgpuiN7FkQ8cipsQNiXTp5cl9t9k/gKGmXfsKE0K85H4bHYoPv6OH2bSyRuUzVlFWQH4FVNXGdDLwSLV/4VQT4+P19MTZRSm4oG1A= +node_js: 4 +addons: + firefox: latest + apt: + sources: + - google-chrome + packages: + - google-chrome-stable +script: + - xvfb-run wct + - "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi" diff --git a/dashboard-ui/bower_components/paper-toggle-button/CONTRIBUTING.md b/dashboard-ui/bower_components/paper-toggle-button/CONTRIBUTING.md new file mode 100644 index 0000000000..7b10141565 --- /dev/null +++ b/dashboard-ui/bower_components/paper-toggle-button/CONTRIBUTING.md @@ -0,0 +1,72 @@ + + +# Polymer Elements +## Guide for Contributors + +Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines: + +### Filing Issues + +**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions: + + 1. **Who will use the feature?** _“As someone filling out a form…”_ + 2. **When will they use the feature?** _“When I enter an invalid value…”_ + 3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_ + +**If you are filing an issue to report a bug**, please provide: + + 1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug: + + ```markdown + The `paper-foo` element causes the page to turn pink when clicked. + + ## Expected outcome + + The page stays the same color. + + ## Actual outcome + + The page turns pink. + + ## Steps to reproduce + + 1. Put a `paper-foo` element in the page. + 2. Open the page in a web browser. + 3. Click the `paper-foo` element. + ``` + + 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output). + + 3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers. + +### Submitting Pull Requests + +**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request. + +When submitting pull requests, please provide: + + 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax: + + ```markdown + (For a single issue) + Fixes #20 + + (For multiple issues) + Fixes #32, #40 + ``` + + 2. **A succinct description of the design** used to fix any related issues. For example: + + ```markdown + This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked. + ``` + + 3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered. + +If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that! diff --git a/dashboard-ui/bower_components/paper-toggle-button/bower.json b/dashboard-ui/bower_components/paper-toggle-button/bower.json index 701b97e400..9e78356ed5 100644 --- a/dashboard-ui/bower_components/paper-toggle-button/bower.json +++ b/dashboard-ui/bower_components/paper-toggle-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-toggle-button", - "version": "1.0.11", + "version": "1.0.12", "description": "A material design toggle button control", "authors": [ "The Polymer Authors" @@ -21,17 +21,19 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#^1.1.0", - "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", - "paper-styles": "PolymerElements/paper-styles#^1.0.0", + "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", - "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0" + "paper-ripple": "PolymerElements/paper-ripple#^1.0.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "devDependencies": { - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "Polymer/web-component-tester#^3.3.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", - "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0" - } + "test-fixture": "PolymerElements/test-fixture#^1.0.0", + "web-component-tester": "Polymer/web-component-tester#^3.3.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "main": "paper-toggle-button.html" } diff --git a/dashboard-ui/bower_components/paper-toggle-button/demo/index.html b/dashboard-ui/bower_components/paper-toggle-button/demo/index.html index 2d65a1934d..f5356a989a 100644 --- a/dashboard-ui/bower_components/paper-toggle-button/demo/index.html +++ b/dashboard-ui/bower_components/paper-toggle-button/demo/index.html @@ -17,101 +17,71 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + + - -
-
-

Enabled

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+
+

Toggle buttons can be checked and disabled

+ + + +
-
-

Disabled

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+
+

Toggle buttons can hide the ripple effect using the noink attribute

+ + + +
-
-

Color

-
- Oxygen - Carbon - Hydrogen - Nitrogen - Calcium -
-
+
+

Toggle buttons can be styled using custom properties

+ + +
diff --git a/dashboard-ui/bower_components/paper-toggle-button/index.html b/dashboard-ui/bower_components/paper-toggle-button/index.html index e871f17d98..487bb5c38a 100644 --- a/dashboard-ui/bower_components/paper-toggle-button/index.html +++ b/dashboard-ui/bower_components/paper-toggle-button/index.html @@ -2,11 +2,11 @@ diff --git a/dashboard-ui/bower_components/paper-toggle-button/test/index.html b/dashboard-ui/bower_components/paper-toggle-button/test/index.html index c2b22786b5..513f309c38 100644 --- a/dashboard-ui/bower_components/paper-toggle-button/test/index.html +++ b/dashboard-ui/bower_components/paper-toggle-button/test/index.html @@ -1,5 +1,4 @@ - - - - +--> paper-toggle-button tests @@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN - - + + + diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.js b/dashboard-ui/components/recordingcreator/recordingcreator.js new file mode 100644 index 0000000000..6dd4bcd25d --- /dev/null +++ b/dashboard-ui/components/recordingcreator/recordingcreator.js @@ -0,0 +1,265 @@ +define(['components/paperdialoghelper', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input'], function (paperDialogHelper) { + + var currentProgramId; + var currentDialog; + var currentResolve; + var currentReject; + + function getDaysOfWeek() { + + // Do not localize. These are used as values, not text. + return LiveTvHelpers.getDaysOfWeek().map(function (d) { + return d.value; + }); + } + + function getDays(context) { + + var daysOfWeek = getDaysOfWeek(); + + var days = []; + + for (var i = 0, length = daysOfWeek.length; i < length; i++) { + + var day = daysOfWeek[i]; + + if ($('#chk' + day, context).checked()) { + days.push(day); + } + + } + + return days; + } + + function hideSeriesRecordingFields(context) { + $('#seriesFields', context).hide(); + context.querySelector('.btnSubmitContainer').classList.remove('hide'); + context.querySelector('.supporterContainer').classList.add('hide'); + } + + function closeDialog(isSubmitted) { + + paperDialogHelper.close(currentDialog); + + if (isSubmitted) { + currentResolve(); + } else { + currentReject(); + } + } + + function onSubmit() { + + Dashboard.showLoadingMsg(); + + var form = this; + + ApiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) { + + item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; + item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; + + item.RecordNewOnly = $('#chkNewOnly', form).checked(); + item.RecordAnyChannel = $('#chkAllChannels', form).checked(); + item.RecordAnyTime = $('#chkAnyTime', form).checked(); + + item.Days = getDays(form); + + if ($('#chkRecordSeries', form).checked()) { + + ApiClient.createLiveTvSeriesTimer(item).then(function () { + + Dashboard.hideLoadingMsg(); + closeDialog(true); + }); + + } else { + ApiClient.createLiveTvTimer(item).then(function () { + + Dashboard.hideLoadingMsg(); + closeDialog(true); + }); + } + }); + + // Disable default form submission + return false; + } + + function getRegistration(programId) { + + Dashboard.showLoadingMsg(); + + return ApiClient.getJSON(ApiClient.getUrl('LiveTv/Registration', { + + ProgramId: programId, + Feature: 'seriesrecordings' + + })).then(function (result) { + + Dashboard.hideLoadingMsg(); + return result; + + }, function () { + + Dashboard.hideLoadingMsg(); + return { + TrialVersion: true, + IsValid: true, + IsRegistered: false + }; + }); + } + + function showSeriesRecordingFields(context) { + $('#seriesFields', context).show(); + context.querySelector('.btnSubmitContainer').classList.remove('hide'); + + getRegistration(getParameterByName('programid')).then(function (regInfo) { + + if (regInfo.IsValid) { + context.querySelector('.btnSubmitContainer').classList.remove('hide'); + } else { + context.querySelector('.btnSubmitContainer').classList.add('hide'); + } + + if (regInfo.IsRegistered) { + + context.querySelector('.supporterContainer').classList.add('hide'); + + } else { + + context.querySelector('.supporterContainer').classList.remove('hide'); + + if (AppInfo.enableSupporterMembership) { + context.querySelector('.btnSupporter').classList.remove('hide'); + } else { + context.querySelector('.btnSupporter').classList.add('hide'); + } + + if (regInfo.TrialVersion) { + context.querySelector('.supporterTrial').classList.remove('hide'); + } else { + context.querySelector('.supporterTrial').classList.add('hide'); + } + } + }); + } + + function init(context) { + + $('#chkRecordSeries', context).on('change', function () { + + if (this.checked) { + showSeriesRecordingFields(context); + } else { + hideSeriesRecordingFields(context); + } + }); + + $('.btnCancel', context).on('click', function () { + + closeDialog(false); + }); + + $('form', context).off('submit', onSubmit).on('submit', onSubmit); + } + + function selectDays(page, days) { + + var daysOfWeek = getDaysOfWeek(); + + for (var i = 0, length = daysOfWeek.length; i < length; i++) { + + var day = daysOfWeek[i]; + + $('#chk' + day, page).checked(days.indexOf(day) != -1); + + } + } + + function renderRecording(context, defaultTimer, program) { + + $('#chkNewOnly', context).checked(defaultTimer.RecordNewOnly); + $('#chkAllChannels', context).checked(defaultTimer.RecordAnyChannel); + $('#chkAnyTime', context).checked(defaultTimer.RecordAnyTime); + + $('#txtPrePaddingMinutes', context).val(defaultTimer.PrePaddingSeconds / 60); + $('#txtPostPaddingMinutes', context).val(defaultTimer.PostPaddingSeconds / 60); + + if (program.IsSeries) { + $('#eligibleForSeriesFields', context).show(); + } else { + $('#eligibleForSeriesFields', context).hide(); + } + + selectDays(context, defaultTimer.Days); + + Dashboard.hideLoadingMsg(); + } + + function reload(context, programId) { + + Dashboard.showLoadingMsg(); + + var promise1 = ApiClient.getNewLiveTvTimerDefaults({ programId: programId }); + var promise2 = ApiClient.getLiveTvProgram(programId, Dashboard.getCurrentUserId()); + + Promise.all([promise1, promise2]).then(function (responses) { + + var defaults = responses[0]; + var program = responses[1]; + + renderRecording(context, defaults, program); + }); + } + + function showEditor(itemId) { + + return new Promise(function (resolve, reject) { + + currentResolve = resolve; + currentReject = reject; + + currentProgramId = itemId; + Dashboard.showLoadingMsg(); + + var xhr = new XMLHttpRequest(); + xhr.open('GET', 'components/recordingcreator/recordingcreator.template.html', true); + + xhr.onload = function (e) { + + var template = this.response; + var dlg = paperDialogHelper.createDialog({ + removeOnClose: true, + theme: 'b' + }); + + dlg.classList.add('formDialog'); + + var html = ''; + + html += Globalize.translateDocument(template); + + dlg.innerHTML = html; + document.body.appendChild(dlg); + + paperDialogHelper.open(dlg); + + currentDialog = dlg; + + hideSeriesRecordingFields(dlg); + init(dlg); + + reload(dlg, itemId); + } + + xhr.send(); + }); + } + + return { + show: showEditor + }; +}); \ No newline at end of file diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.template.html b/dashboard-ui/components/recordingcreator/recordingcreator.template.html new file mode 100644 index 0000000000..f702ed3a3e --- /dev/null +++ b/dashboard-ui/components/recordingcreator/recordingcreator.template.html @@ -0,0 +1,61 @@ +
+ +
+ New Recording +
+
+ +
+ + + +
+
+ +
+
+
+ +
+
+
+
+
+

${MessageActiveSubscriptionRequiredSeriesRecordings}

+

${HeaderEnjoyDayTrial}

+ ${HeaderBecomeProjectSupporter} +
+ +
+
\ No newline at end of file diff --git a/dashboard-ui/livetvnewrecording.html b/dashboard-ui/livetvnewrecording.html deleted file mode 100644 index eeecabd969..0000000000 --- a/dashboard-ui/livetvnewrecording.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - Emby - - -
- -
-
-

-

-

-

- -

-

-

- -
- - - -
-

${HeaderAdvanced}

-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-

${MessageActiveSubscriptionRequiredSeriesRecordings}

-

${HeaderEnjoyDayTrial}

- ${HeaderBecomeProjectSupporter} -
-
- - - ${ButtonCancel} -
-
-
-
- - diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 005f8b28a7..18901b94c0 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -75,7 +75,6 @@ var list = DashboardPage.sessionsList; if (list) { - Logger.log('refreshSessionsLocally'); DashboardPage.renderActiveConnections($.mobile.activePage, list); } }, diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index fc06de7ac1..fedb9a7e2f 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -1991,8 +1991,11 @@ $('.btnRecord,.btnFloatingRecord', page).on('click', function () { var id = getParameterByName('id'); - - Dashboard.navigate('livetvnewrecording.html?programid=' + id); + require(['components/recordingcreator/recordingcreator'], function (recordingcreator) { + recordingcreator.show(id).then(function () { + reload(page); + }); + }); }); diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index 043af1f602..aa6064c408 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -494,7 +494,9 @@ Dashboard.navigate('itemdetails.html?id=' + albumid); break; case 'record': - Dashboard.navigate('livetvnewrecording.html?programid=' + itemId); + require(['components/recordingcreator/recordingcreator'], function (recordingcreator) { + recordingcreator.show(itemId); + }); break; case 'artist': Dashboard.navigate('itemdetails.html?context=music&id=' + artistid); diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index 697373b496..ed35280e05 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -245,7 +245,10 @@ function onRecordClick() { hideOverlay(); - Dashboard.navigate('livetvnewrecording.html?programid=' + this.getAttribute('data-id')); + var programId = this.getAttribute('data-id'); + require(['components/recordingcreator/recordingcreator'], function (recordingcreator) { + recordingcreator.show(programId); + }); } function showOverlay(elem, item) { diff --git a/dashboard-ui/scripts/livetvnewrecording.js b/dashboard-ui/scripts/livetvnewrecording.js deleted file mode 100644 index 51279ed7c7..0000000000 --- a/dashboard-ui/scripts/livetvnewrecording.js +++ /dev/null @@ -1,256 +0,0 @@ -(function ($, document) { - - var currentProgram; - var registrationInfo; - var lastRegId; - - function getRegistration(programId) { - - var deferred = DeferredBuilder.Deferred(); - - if (registrationInfo && (lastRegId == programId)) { - deferred.resolveWith(null, [registrationInfo]); - return deferred.promise(); - } - - registrationInfo = null; - Dashboard.showLoadingMsg(); - - ApiClient.getJSON(ApiClient.getUrl('LiveTv/Registration', { - - ProgramId: programId, - Feature: 'seriesrecordings' - })).then(function (result) { - - lastRegId = programId; - registrationInfo = result; - deferred.resolveWith(null, [registrationInfo]); - Dashboard.hideLoadingMsg(); - - }, function () { - - deferred.resolveWith(null, [ - { - TrialVersion: true, - IsValid: true, - IsRegistered: false - }]); - - Dashboard.hideLoadingMsg(); - }); - - return deferred.promise(); - } - - function renderRecording(page, defaultTimer, program) { - - currentProgram = program; - - $('.itemName', page).html(program.Name); - - $('.itemEpisodeName', page).html(program.EpisodeTitle || ''); - - $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(program)); - - LibraryBrowser.renderGenres($('.itemGenres', page), program); - LibraryBrowser.renderOverview(page.querySelectorAll('.itemOverview'), program); - - $('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(program)); - - $('#chkNewOnly', page).checked(defaultTimer.RecordNewOnly); - $('#chkAllChannels', page).checked(defaultTimer.RecordAnyChannel); - $('#chkAnyTime', page).checked(defaultTimer.RecordAnyTime); - - $('#txtPrePaddingMinutes', page).val(defaultTimer.PrePaddingSeconds / 60); - $('#txtPostPaddingMinutes', page).val(defaultTimer.PostPaddingSeconds / 60); - - if (program.IsSeries) { - $('#eligibleForSeriesFields', page).show(); - } else { - $('#eligibleForSeriesFields', page).hide(); - } - - selectDays(page, defaultTimer.Days); - - Dashboard.hideLoadingMsg(); - } - - function reload(page) { - - Dashboard.showLoadingMsg(); - - var programId = getParameterByName('programid'); - - var promise1 = ApiClient.getNewLiveTvTimerDefaults({ programId: programId }); - var promise2 = ApiClient.getLiveTvProgram(programId, Dashboard.getCurrentUserId()); - - Promise.all([promise1, promise2]).then(function (responses) { - - var defaults = responses[0]; - var program = responses[1]; - - renderRecording(page, defaults, program); - }); - } - - function selectDays(page, days) { - - var daysOfWeek = getDaysOfWeek(); - - for (var i = 0, length = daysOfWeek.length; i < length; i++) { - - var day = daysOfWeek[i]; - - $('#chk' + day, page).checked(days.indexOf(day) != -1); - - } - - } - - function getDaysOfWeek() { - - // Do not localize. These are used as values, not text. - return LiveTvHelpers.getDaysOfWeek().map(function (d) { - return d.value; - }); - } - - function getDays(page) { - - var daysOfWeek = getDaysOfWeek(); - - var days = []; - - for (var i = 0, length = daysOfWeek.length; i < length; i++) { - - var day = daysOfWeek[i]; - - if ($('#chk' + day, page).checked()) { - days.push(day); - } - - } - - return days; - } - - function onSubmit() { - - Dashboard.showLoadingMsg(); - - var form = this; - - var programId = getParameterByName('programid'); - - ApiClient.getNewLiveTvTimerDefaults({ programId: programId }).then(function (item) { - - item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60; - item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60; - - item.RecordNewOnly = $('#chkNewOnly', form).checked(); - item.RecordAnyChannel = $('#chkAllChannels', form).checked(); - item.RecordAnyTime = $('#chkAnyTime', form).checked(); - - item.Days = getDays(form); - - if ($('#chkRecordSeries', form).checked()) { - - ApiClient.createLiveTvSeriesTimer(item).then(function () { - - Dashboard.hideLoadingMsg(); - Dashboard.navigate('livetv.html'); - - }); - - } else { - ApiClient.createLiveTvTimer(item).then(function () { - - Dashboard.hideLoadingMsg(); - Dashboard.navigate('livetv.html'); - - }); - } - - }); - - // Disable default form submission - return false; - } - - function hideSeriesRecordingFields(page) { - $('#seriesFields', page).hide(); - page.querySelector('.btnSubmitContainer').classList.remove('hide'); - page.querySelector('.supporterContainer').classList.add('hide'); - } - - function showSeriesRecordingFields(page) { - $('#seriesFields', page).show(); - page.querySelector('.btnSubmitContainer').classList.remove('hide'); - - getRegistration(getParameterByName('programid')).then(function (regInfo) { - - if (regInfo.IsValid) { - page.querySelector('.btnSubmitContainer').classList.remove('hide'); - } else { - page.querySelector('.btnSubmitContainer').classList.add('hide'); - } - - if (regInfo.IsRegistered) { - - page.querySelector('.supporterContainer').classList.add('hide'); - - } else { - - page.querySelector('.supporterContainer').classList.remove('hide'); - - if (AppInfo.enableSupporterMembership) { - page.querySelector('.btnSupporter').classList.remove('hide'); - } else { - page.querySelector('.btnSupporter').classList.add('hide'); - } - - if (regInfo.TrialVersion) { - page.querySelector('.supporterTrial').classList.remove('hide'); - } else { - page.querySelector('.supporterTrial').classList.add('hide'); - } - } - }); - } - - $(document).on('pageinit', "#liveTvNewRecordingPage", function () { - - var page = this; - - $('#chkRecordSeries', page).on('change', function () { - - if (this.checked) { - showSeriesRecordingFields(page); - } else { - hideSeriesRecordingFields(page); - } - }); - - $('#btnCancel', page).on('click', function () { - - var programId = getParameterByName('programid'); - - Dashboard.navigate('itemdetails.html?id=' + programId); - - }); - - $('.liveTvNewRecordingForm').off('submit', onSubmit).on('submit', onSubmit); - - }).on('pagebeforeshow', "#liveTvNewRecordingPage", function () { - - var page = this; - hideSeriesRecordingFields(page); - reload(page); - - }).on('pagebeforehide', "#liveTvNewRecordingPage", function () { - - currentProgram = null; - - }); - -})(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 417c0559cb..a98deb44ff 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -474,6 +474,10 @@ Format: 'idx', Method: 'Embed' }); + profile.SubtitleProfiles.push({ + Format: 'smi', + Method: 'Embed' + }); } else { profile.SubtitleProfiles.push({ Format: 'vtt', diff --git a/dashboard-ui/scripts/syncactivity.js b/dashboard-ui/scripts/syncactivity.js index 9699da4a9e..24d3a38c93 100644 --- a/dashboard-ui/scripts/syncactivity.js +++ b/dashboard-ui/scripts/syncactivity.js @@ -389,8 +389,7 @@ $('.btnSyncSupporter', page).on('click', function () { requirejs(["registrationservices"], function () { - RegistrationServices.validateFeature('sync').then(function () { - }); + RegistrationServices.validateFeature('sync'); }); }); $('.supporterPromotion .mainText', page).html(Globalize.translate('HeaderSyncRequiresSupporterMembership')); diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index e6eea25526..22c68c2a0c 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -570,7 +570,21 @@ paper-dialog paper-radio-group paper-radio-button { } } -paper-dialog.popupEditor .dialogHeader { +div.dialogHeader { + margin: 0 0 2.5em!important; + padding: .35em 1em; + background-color: #101010; + display: flex; + align-items: center; + line-height: normal; + font-size: 110%; +} + +.dialogHeaderTitle { + margin-left: .75em; +} + +paper-dialog.popupEditor h2.dialogHeader { font-weight: inherit !important; line-height: 36px; padding: 0 1em; @@ -613,3 +627,7 @@ paper-toggle-button paper-ripple { paper-progress.mini #progressContainer { height: 3px !important; } + +.formDialog.background-theme-b { + background-color: #202020; +} \ No newline at end of file