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-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index ebb18c5b7b..52d44c1907 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/components/recordingcreator/recordingcreator.js b/dashboard-ui/components/recordingcreator/recordingcreator.js index 6dd4bcd25d..66836b7a19 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.js +++ b/dashboard-ui/components/recordingcreator/recordingcreator.js @@ -1,4 +1,4 @@ -define(['components/paperdialoghelper', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input'], function (paperDialogHelper) { +define(['components/paperdialoghelper', 'scripts/livetvcomponents', 'livetvcss', 'paper-checkbox', 'paper-input', 'paper-toggle-button'], function (paperDialogHelper) { var currentProgramId; var currentDialog; @@ -33,7 +33,7 @@ } function hideSeriesRecordingFields(context) { - $('#seriesFields', context).hide(); + slideUpToHide(context.querySelector('#seriesFields')); context.querySelector('.btnSubmitContainer').classList.remove('hide'); context.querySelector('.supporterContainer').classList.add('hide'); } @@ -113,7 +113,7 @@ } function showSeriesRecordingFields(context) { - $('#seriesFields', context).show(); + slideDownToShow(context.querySelector('#seriesFields')); context.querySelector('.btnSubmitContainer').classList.remove('hide'); getRegistration(getParameterByName('programid')).then(function (regInfo) { @@ -147,6 +147,49 @@ }); } + function slideDownToShow(elem) { + + if (!elem.classList.contains('hide')) { + return; + } + + elem.classList.remove('hide'); + + elem.style.overflow = 'hidden'; + + requestAnimationFrame(function () { + + elem.animate([{ + height: 0 + }, { + height: elem.offsetHeight + 'px' + + }], { duration: 400, easing: 'ease' }).onfinish = function () { + elem.classList.remove('hide'); + }; + }); + } + + function slideUpToHide(elem) { + + if (elem.classList.contains('hide')) { + return; + } + + elem.style.overflow = 'hidden'; + + requestAnimationFrame(function () { + + elem.animate([{ + height: elem.offsetHeight + 'px' + }, { + height: 0 + }], { duration: 400, easing: 'ease' }).onfinish = function () { + elem.classList.add('hide'); + }; + }); + } + function init(context) { $('#chkRecordSeries', context).on('change', function () { @@ -163,6 +206,20 @@ closeDialog(false); }); + context.querySelector('.chkAdvanced').addEventListener('change', function (e) { + + var elems = context.querySelectorAll('.advancedToggle'); + var isChecked = e.target.checked; + + for (var i = 0, length = elems.length; i < length; i++) { + if (isChecked) { + slideDownToShow(elems[i]); + } else { + slideUpToHide(elems[i]); + } + } + }); + $('form', context).off('submit', onSubmit).on('submit', onSubmit); } diff --git a/dashboard-ui/components/recordingcreator/recordingcreator.template.html b/dashboard-ui/components/recordingcreator/recordingcreator.template.html index 46f6e91387..728dd32f01 100644 --- a/dashboard-ui/components/recordingcreator/recordingcreator.template.html +++ b/dashboard-ui/components/recordingcreator/recordingcreator.template.html @@ -7,13 +7,16 @@
+
+ ${ButtonAdvanced} +