From 641cfb9432974d0cc31668bde478518b77153f5d Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Thu, 19 Nov 2015 17:09:49 -0500 Subject: [PATCH] SAAS-1234 - bind station feed url to angular data model --- airtime_mvc/application/forms/PodcastPreferences.php | 10 ---------- .../views/scripts/form/preferences_podcast.phtml | 4 ---- .../application/views/scripts/podcast/station.phtml | 12 ++++++------ airtime_mvc/public/css/station_podcast.css | 4 ++++ airtime_mvc/public/js/airtime/library/podcast.js | 9 +-------- 5 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 airtime_mvc/application/views/scripts/form/preferences_podcast.phtml diff --git a/airtime_mvc/application/forms/PodcastPreferences.php b/airtime_mvc/application/forms/PodcastPreferences.php index adf86c84e..9c007439e 100644 --- a/airtime_mvc/application/forms/PodcastPreferences.php +++ b/airtime_mvc/application/forms/PodcastPreferences.php @@ -17,16 +17,6 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm { )); $stationPodcastPrivacy->setValue($isPrivate); $this->addElement($stationPodcastPrivacy); - - $stationPodcast = PodcastQuery::create()->findOneByDbId(Application_Model_Preference::getStationPodcastId()); - $url = $stationPodcast->getDbUrl(); - $feedUrl = new Zend_Form_Element_Text("stationPodcastFeedUrl"); - $feedUrl->setAttrib('class', 'input_text') - ->setAttrib('disabled', 'disabled') - ->setRequired(false) - ->setLabel(_("Feed URL")) - ->setValue($url); - $this->addElement($feedUrl); } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/form/preferences_podcast.phtml b/airtime_mvc/application/views/scripts/form/preferences_podcast.phtml deleted file mode 100644 index bfea8ae3f..000000000 --- a/airtime_mvc/application/views/scripts/form/preferences_podcast.phtml +++ /dev/null @@ -1,4 +0,0 @@ -
- element->getElement('stationPodcastPrivacy')->render() ?> - element->getElement('stationPodcastFeedUrl')->render() ?> -
diff --git a/airtime_mvc/application/views/scripts/podcast/station.phtml b/airtime_mvc/application/views/scripts/podcast/station.phtml index 7a074de40..ded12e3e9 100644 --- a/airtime_mvc/application/views/scripts/podcast/station.phtml +++ b/airtime_mvc/application/views/scripts/podcast/station.phtml @@ -26,9 +26,6 @@ - - - @@ -81,8 +78,12 @@ form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
- form->getSubform('preferences_podcast')->getElement("stationPodcastFeedUrl") ?> - +
+ +
+
+ +
@@ -122,5 +123,4 @@ $(this).toggleClass("closed"); return false; }); - diff --git a/airtime_mvc/public/css/station_podcast.css b/airtime_mvc/public/css/station_podcast.css index 9f6c1db88..65c2f0e58 100644 --- a/airtime_mvc/public/css/station_podcast.css +++ b/airtime_mvc/public/css/station_podcast.css @@ -9,6 +9,10 @@ overflow: hidden; } +#station_podcast .inner_editor_title h2 { + width: 40%; +} + #station_podcast .inner_editor_title * { margin: 0; } diff --git a/airtime_mvc/public/js/airtime/library/podcast.js b/airtime_mvc/public/js/airtime/library/podcast.js index 1a01e777c..1f23c9cf8 100644 --- a/airtime_mvc/public/js/airtime/library/podcast.js +++ b/airtime_mvc/public/js/airtime/library/podcast.js @@ -107,7 +107,7 @@ var AIRTIME = (function (AIRTIME) { headers: {'Content-Type': 'application/x-www-form-urlencoded'}, data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() } }).success(function (data) { - $("#preferences_podcast-stationPodcastFeedUrl").val(data.url); + jQuery.extend($scope.podcast, data); $(".success").text($.i18n._("Podcast settings saved")).slideDown("fast"); setTimeout(function () { $(".success").slideUp("fast"); @@ -138,13 +138,6 @@ var AIRTIME = (function (AIRTIME) { }); }; - /** - * Open metadata editor tabs for each of the selected episodes. - */ - StationPodcastController.prototype.openSelectedTabEditors = function () { - mod.editSelectedEpisodes(this.episodeTable.getSelectedRows()); - }; - /** * Initialize the Station podcast episode table. *