From 1f2f8a27a55775c9b76be895421520f70f01dfdb Mon Sep 17 00:00:00 2001 From: drigato <denise.rigato@sourcefabric.org> Date: Mon, 16 Mar 2015 13:24:58 -0400 Subject: [PATCH] SAAS-650: Fix up player page UI in Airtime --- .../application/controllers/EmbeddableplayerController.php | 3 +++ airtime_mvc/application/forms/EmbeddablePlayer.php | 5 +++++ .../application/views/scripts/embeddableplayer/index.phtml | 6 ++---- .../application/views/scripts/form/embeddableplayer.phtml | 5 ++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/controllers/EmbeddableplayerController.php b/airtime_mvc/application/controllers/EmbeddableplayerController.php index d7a16104b..ec16317b5 100644 --- a/airtime_mvc/application/controllers/EmbeddableplayerController.php +++ b/airtime_mvc/application/controllers/EmbeddableplayerController.php @@ -9,6 +9,9 @@ class EmbeddablePlayerController extends Zend_Controller_Action public function indexAction() { + $CC_CONFIG = Config::getConfig(); + $baseUrl = Application_Common_OsPath::getBaseDir(); + $this->view->headLink()->appendStylesheet($baseUrl.'css/embeddableplayer.css?'.$CC_CONFIG['airtime_version']); $form = new Application_Form_EmbeddablePlayer(); if ($form->getElement('player_stream_url')->getAttrib('numberOfEnabledStreams') > 0) { diff --git a/airtime_mvc/application/forms/EmbeddablePlayer.php b/airtime_mvc/application/forms/EmbeddablePlayer.php index 520a5318b..a77ae5f1d 100644 --- a/airtime_mvc/application/forms/EmbeddablePlayer.php +++ b/airtime_mvc/application/forms/EmbeddablePlayer.php @@ -34,8 +34,13 @@ class Application_Form_EmbeddablePlayer extends Zend_Form_SubForm $embedSrc = new Zend_Form_Element_Text('player_embed_src'); $embedSrc->setAttrib("readonly", "readonly"); $embedSrc->setValue('<iframe frameborder="0" src="'.Application_Common_HTTPHelper::getStationUrl().'/embeddableplayer/embed-code?url='.$url.'&codec='.$codec.'"></iframe>'); + $embedSrc->setAttrib("class", "embed-player-text-box"); $embedSrc->removeDecorator('label'); $this->addElement($embedSrc); + $previewLabel = new Zend_Form_Element_Text('player_preview_label'); + $previewLabel->setLabel("Preview:"); + $this->addElement($previewLabel); + } } \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml index f762892b4..7a069af6d 100644 --- a/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml +++ b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml @@ -1,14 +1,12 @@ -<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong preferences"> +<div class="ui-widget ui-widget-content block-shadow simple-formblock embed-player-form clearfix padded-strong preferences"> <h2 style="float:left"><?php echo _("Embeddable Player") ?></h2> <?php $baseUrl = Application_Common_OsPath::getBaseDir(); ?> <form method="post" id="player_form" enctype="multipart/form-data"> - - + <div style="clear:both"></div> <?php echo $this->errorMsg; ?> <?php echo $this->form; ?> - <br /> </form> </div> diff --git a/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml b/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml index d4f481199..5153189e8 100644 --- a/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml +++ b/airtime_mvc/application/views/scripts/form/embeddableplayer.phtml @@ -7,7 +7,10 @@ <?php echo $this->element->getElement('player_stream_url'); ?> + <?php echo $this->element->getElement('player_preview_label')->renderLabel(); ?> <div style="clear:both"></div> - <?php echo $this->element->getElement('player_embed_src')->getValue(); ?> + <div id="embed_player_preview"> + <?php echo $this->element->getElement('player_embed_src')->getValue(); ?> + </div> </dl> </fieldset> \ No newline at end of file