From d210a363585223b3c06037700886de7ca89ce43f Mon Sep 17 00:00:00 2001 From: Naomi Date: Wed, 9 Feb 2011 18:10:46 -0500 Subject: [PATCH] new add show html. --- .../controllers/ScheduleController.php | 20 +------ application/models/Shows.php | 32 +++++++++- .../scripts/form/add-show-checkbox.phtml | 2 +- .../views/scripts/form/add-show-style.phtml | 5 +- .../scripts/schedule/add-show-dialog.phtml | 50 ++++++++-------- .../views/scripts/schedule/edit-show.phtml | 4 -- public/css/add-show.css | 9 +-- public/css/styles.css | 58 ++++++++++++++++++- public/js/airtime/schedule/add-show.js | 4 +- 9 files changed, 120 insertions(+), 64 deletions(-) diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index 13cdc8d7f..a6792d84a 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -331,24 +331,10 @@ class ScheduleController extends Zend_Controller_Action public function editShowAction() { - $formWhat = new Application_Form_AddShowWhat(); - $formWhat->removeDecorator('DtDdWrapper'); - $formWho = new Application_Form_AddShowWho(); - $formWho->removeDecorator('DtDdWrapper'); - $formWhen = new Application_Form_AddShowWhen(); - $formWhen->removeDecorator('DtDdWrapper'); - $formRepeats = new Application_Form_AddShowRepeats(); - $formRepeats->removeDecorator('DtDdWrapper'); - $formStyle = new Application_Form_AddShowStyle(); - $formStyle->removeDecorator('DtDdWrapper'); + $showInstanceId = $this->_getParam('id'); + $showInstance = new ShowInstance($showInstanceId); - $this->view->what = $formWhat; - //$this->view->when = $formWhen; - //$this->view->repeats = $formRepeats; - $this->view->who = $formWho; - $this->view->style = $formStyle; - - $this->view->dialog = $this->view->render('schedule/edit-show.phtml'); + $show = new Show($showInstance->getShowId()); } diff --git a/application/models/Shows.php b/application/models/Shows.php index 6d6ee9356..20a3a122b 100644 --- a/application/models/Shows.php +++ b/application/models/Shows.php @@ -11,16 +11,44 @@ class Show { public function getName() { $show = CcShowQuery::create()->findPK($this->_showId); - return $show->getDbName(); } public function setName($name) { $show = CcShowQuery::create()->findPK($this->_showId); - $show->setDbName($name); } + public function getDescription() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbDescription(); + } + + public function setDescription($description) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbDescription($description); + } + + public function getColor() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbColor(); + } + + public function setColor($color) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbColor($color); + } + + public function getBackgroundColor() { + $show = CcShowQuery::create()->findPK($this->_showId); + return $show->getDbBackgroundColor(); + } + + public function setBackgroundColor($backgroundColor) { + $show = CcShowQuery::create()->findPK($this->_showId); + $show->setDbBackgroundColor($backgroundColor); + } + //end dates are non inclusive. public static function addShow($data) { diff --git a/application/views/scripts/form/add-show-checkbox.phtml b/application/views/scripts/form/add-show-checkbox.phtml index 2d7f95bd1..f1012d1c7 100644 --- a/application/views/scripts/form/add-show-checkbox.phtml +++ b/application/views/scripts/form/add-show-checkbox.phtml @@ -10,5 +10,5 @@ - formErrors($this->element->getMessages()) ?> + element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?> diff --git a/application/views/scripts/form/add-show-style.phtml b/application/views/scripts/form/add-show-style.phtml index 7ab679a6f..86f42ff24 100644 --- a/application/views/scripts/form/add-show-style.phtml +++ b/application/views/scripts/form/add-show-style.phtml @@ -9,8 +9,5 @@ $this->element->getAttribs() ) ?> - element->hasErrors()) { - echo $this->formErrors($this->element->getMessages()); - } - ?> + element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?> diff --git a/application/views/scripts/schedule/add-show-dialog.phtml b/application/views/scripts/schedule/add-show-dialog.phtml index dc152e89e..aba2daf40 100644 --- a/application/views/scripts/schedule/add-show-dialog.phtml +++ b/application/views/scripts/schedule/add-show-dialog.phtml @@ -1,31 +1,29 @@
-
-
- -
-
-
-
- what ?> -
-
- when ?> - repeats ?> -
-
- who ?> -
-
- style ?> -
-
-
+
+
+
+ +
+
+
+ what ?> +
+

When

+
+ when ?> + repeats ?> +
+

Who

+
+ who ?> +
+

Style

+
+ style ?> +
+
+
diff --git a/application/views/scripts/schedule/edit-show.phtml b/application/views/scripts/schedule/edit-show.phtml index 3efef5486..bce09e6c8 100644 --- a/application/views/scripts/schedule/edit-show.phtml +++ b/application/views/scripts/schedule/edit-show.phtml @@ -2,10 +2,6 @@
what ?>
-
- when ?> - repeats ?> -
who ?>
diff --git a/public/css/add-show.css b/public/css/add-show.css index 106027531..3f53ff6b0 100644 --- a/public/css/add-show.css +++ b/public/css/add-show.css @@ -1,4 +1,3 @@ - #schedule-add-show, #fullcalendar_show_display { float: left; @@ -12,7 +11,7 @@ #schedule-add-show textarea { width: 99%; - height: 100px; + height: 80px; } #fullcalendar_show_display { @@ -78,9 +77,7 @@ label.wrapp-label input[type="checkbox"] { float:left; margin:-1px 4px 0 0; } -#schedule-add-show fieldset { - min-height:70px; -} + #schedule-add-show fieldset:last-child { margin-bottom:0; } @@ -107,4 +104,4 @@ label.wrapp-label input[type="checkbox"] { padding:8px; color:#902d2d; display:none; -} +} \ No newline at end of file diff --git a/public/css/styles.css b/public/css/styles.css index 1cbd252d0..c92abe916 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -721,7 +721,7 @@ dt.block-display, dd.block-display { .floated-panel { margin-top:0; width:99.99%; - z-index:9999; + z-index:999; } @@ -820,7 +820,8 @@ div.ui-datepicker { #schedule_playlist_chosen li > h3 > div > span.ui-icon { margin-top: 0px; } -#schedule_playlist_chosen li > h3 > span.ui-icon.ui-icon-triangle-1-e { +#schedule_playlist_chosen li > h3 > span.ui-icon.ui-icon-triangle-1-e, +#schedule_playlist_chosen li > h3 > span.ui-icon.ui-icon-triangle-1-s { float:left; margin-right: 8px; } @@ -1091,7 +1092,7 @@ button, input { float:left; width:420px; margin-left:10px; - /* display:block;*/ + /*display:none;*/ } .user-list-wrapper { float:left; @@ -1184,3 +1185,54 @@ button, input { .end-button { border-width:1px; } + + +ul.errors { + display:block; + clear:left; + padding:3px 0 0 0; + margin:0; +} + +ul.errors li { + color:#902d2d; + font-size:11px; + padding:2px 4px; + background:#c6b4b4; + margin-bottom:2px; + border:1px solid #c83f3f; +} +.collapsible-header { + border: 1px solid #8f8f8f; + background-color: #cccccc; + background: -moz-linear-gradient(top, #cccccc 0, #b9b9b9 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #cccccc), color-stop(100%, #b9b9b9)); + font-size:13px; + color:#353535; + font-weight:bold; + padding:6px 0 6px 20px; + margin:8px 0 0 0; + cursor:pointer; + position:relative; +} +.collapsible-content { + margin-top:-1px; + display:none; +} +.collapsible-header .arrow-icon { + display:block; + background:url(images/arrows_collapse.png) no-repeat 0 0; + height:11px; + width:11px; + position:absolute; + left:5px; + top:8px; + +} +.collapsible-header.close .arrow-icon { + background-position: 0 -11px; + +} +#schedule-add-show .button-bar { + height: 28px; + margin: 0 0 8px 0; \ No newline at end of file diff --git a/public/js/airtime/schedule/add-show.js b/public/js/airtime/schedule/add-show.js index e06090265..8280bd40e 100644 --- a/public/js/airtime/schedule/add-show.js +++ b/public/js/airtime/schedule/add-show.js @@ -60,7 +60,9 @@ function findHosts(request, callback) { function setAddShowEvents() { var start, end; - $(".tabs").tabs(); + $("h3").click(function(){ + $(this).next().toggle(); + }); if(!$("#add_show_repeats").attr('checked')) { $("#schedule-show-when > fieldset:last").hide();