SAAS-1234 - bind station feed url to angular data model
This commit is contained in:
parent
c328515f4b
commit
641cfb9432
|
@ -17,16 +17,6 @@ class Application_Form_PodcastPreferences extends Zend_Form_SubForm {
|
||||||
));
|
));
|
||||||
$stationPodcastPrivacy->setValue($isPrivate);
|
$stationPodcastPrivacy->setValue($isPrivate);
|
||||||
$this->addElement($stationPodcastPrivacy);
|
$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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +0,0 @@
|
||||||
<fieldset class="padded">
|
|
||||||
<?php echo $this->element->getElement('stationPodcastPrivacy')->render() ?>
|
|
||||||
<?php echo $this->element->getElement('stationPodcastFeedUrl')->render() ?>
|
|
||||||
</fieldset>
|
|
|
@ -26,9 +26,6 @@
|
||||||
<label><?php echo _("Creator") ?></label>
|
<label><?php echo _("Creator") ?></label>
|
||||||
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
|
<input name="podcast_creator" ng-model="podcast.creator" type="text"/>
|
||||||
|
|
||||||
<label><?php echo _("URL") ?></label>
|
|
||||||
<input disabled name="podcast_url" ng-model="podcast.url" type="text"/>
|
|
||||||
|
|
||||||
<label><?php echo _("Description") ?></label>
|
<label><?php echo _("Description") ?></label>
|
||||||
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
|
<textarea name="podcast_description" ng-model="podcast.description"></textarea>
|
||||||
|
|
||||||
|
@ -81,8 +78,12 @@
|
||||||
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
|
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastPrivacy")->renderViewHelper() ?>
|
||||||
</div>
|
</div>
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
<?php echo $this->form->getSubform('preferences_podcast')->getElement("stationPodcastFeedUrl") ?>
|
<dt>
|
||||||
|
<label for="stationPodcastFeedUrl" class="optional">Feed URL</label>
|
||||||
|
</dt>
|
||||||
|
<dd>
|
||||||
|
<input type="url" ng-model="podcast.url" disabled="disabled" class="input_text" />
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,5 +123,4 @@
|
||||||
$(this).toggleClass("closed");
|
$(this).toggleClass("closed");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -9,6 +9,10 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#station_podcast .inner_editor_title h2 {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
#station_podcast .inner_editor_title * {
|
#station_podcast .inner_editor_title * {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
|
||||||
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
|
data: { stationPodcastPrivacy: $("#podcast-settings").find("input:checked").val() }
|
||||||
}).success(function (data) {
|
}).success(function (data) {
|
||||||
$("#preferences_podcast-stationPodcastFeedUrl").val(data.url);
|
jQuery.extend($scope.podcast, data);
|
||||||
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
|
$(".success").text($.i18n._("Podcast settings saved")).slideDown("fast");
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
$(".success").slideUp("fast");
|
$(".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.
|
* Initialize the Station podcast episode table.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue