diff --git a/airtime_mvc/application/controllers/PlaylistController.php b/airtime_mvc/application/controllers/PlaylistController.php index 84848d301..4c63d73e5 100644 --- a/airtime_mvc/application/controllers/PlaylistController.php +++ b/airtime_mvc/application/controllers/PlaylistController.php @@ -57,18 +57,21 @@ class PlaylistController extends Zend_Controller_Action return $obj; } - private function createUpdateResponse($obj) + private function createUpdateResponse($obj, $formIsValid = false) { $formatter = new LengthFormatter($obj->getLength()); $this->view->length = $formatter->format(); $this->view->obj = $obj; $this->view->contents = $obj->getContents(); + if ($formIsValid) { + $this->view->poolCount = $obj->getListofFilesMeetCriteria()['count']; + } + $this->view->showPoolCount = true; $this->view->html = $this->view->render('playlist/update.phtml'); $this->view->name = $obj->getName(); $this->view->description = $obj->getDescription(); $this->view->modified = $obj->getLastModified("U"); - unset($this->view->obj); } @@ -99,7 +102,6 @@ class PlaylistController extends Zend_Controller_Action $form = new Application_Form_SmartBlockCriteria(); $form->removeDecorator('DtDdWrapper'); $form->startForm($obj->getId(), $formIsValid); - $this->view->form = $form; $this->view->obj = $obj; //$this->view->type = "sb"; @@ -555,8 +557,7 @@ class PlaylistController extends Zend_Controller_Action if ($form->isValid($params)) { $this->setPlaylistNameDescAction(); $bl->saveSmartBlockCriteria($params['data']); - - $this->createUpdateResponse($bl); + $this->createUpdateResponse($bl, true); $this->view->result = 0; /* $result['html'] = $this->createFullResponse($bl, true, true); @@ -599,7 +600,7 @@ class PlaylistController extends Zend_Controller_Action if ($form->isValid($params)) { $result = $bl->generateSmartBlock($params['data']); $this->view->result = $result['result']; - $this->createUpdateResponse($bl); + $this->createUpdateResponse($bl, true); #$this->_helper->json->sendJson(array("result"=>0, "html"=>$this->createFullResponse($bl, true, true))); } else { $this->view->obj = $bl; @@ -624,7 +625,7 @@ class PlaylistController extends Zend_Controller_Action $result = $bl->shuffleSmartBlock(); $this->view->result = $result["result"]; - $this->createUpdateResponse($bl); + $this->createUpdateResponse($bl,true); /* if ($result['result'] == 0) { @@ -652,7 +653,7 @@ class PlaylistController extends Zend_Controller_Action $result = $pl->shuffle(); $this->view->result = $result["result"]; - $this->createUpdateResponse($pl); + $this->createUpdateResponse($pl,true); /* if ($result['result'] == 0) { $this->_helper->json->sendJson(array( diff --git a/airtime_mvc/application/forms/SmartBlockCriteria.php b/airtime_mvc/application/forms/SmartBlockCriteria.php index b9605ab6f..3b3d1637e 100644 --- a/airtime_mvc/application/forms/SmartBlockCriteria.php +++ b/airtime_mvc/application/forms/SmartBlockCriteria.php @@ -366,8 +366,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/smart-block-criteria.phtml', "openOption"=> $openSmartBlockOption, - 'criteriasLength' => count($this->getCriteriaOptions()), 'poolCount' => $files['count'], 'modRowMap' => $modRowMap, - 'showPoolCount' => $showPoolCount)) + 'criteriasLength' => count($this->getCriteriaOptions()), 'modRowMap' => $modRowMap)) )); } diff --git a/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml b/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml index 032ae669f..9a1c31c07 100644 --- a/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml +++ b/airtime_mvc/application/views/scripts/form/smart-block-criteria.phtml @@ -119,35 +119,6 @@ - - showPoolCount) { ?> -
- - poolCount > 1) { - echo $this->poolCount; - ?> - - - - poolCount == 1) { - echo $this->poolCount; - ?> - - - - - 0 - - - -
- diff --git a/airtime_mvc/application/views/scripts/playlist/update.phtml b/airtime_mvc/application/views/scripts/playlist/update.phtml index b8be82b1c..f9651e94e 100644 --- a/airtime_mvc/application/views/scripts/playlist/update.phtml +++ b/airtime_mvc/application/views/scripts/playlist/update.phtml @@ -123,6 +123,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) { } echo $this->partial('playlist/set-fade.phtml', $vars); + ?> diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 8011928ba..45a67d36c 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -739,6 +739,7 @@ input.input_text.sp_extra_input_text{ .sp_text_font_bold{ font-weight: bold; + color: white; } .sp-ui-button-icon-only { @@ -782,6 +783,8 @@ input.input_text.sp_extra_input_text{ .sp-closed{ border-width: 0 0 0 !important; } + + /***** SMART BLOCK SPECIFIC STYLES END *****/ label {