Merge branch 'master' of dev.sourcefabric.org:campcaster

This commit is contained in:
mkonecny 2011-02-09 18:28:42 -05:00
commit 313252f93a
9 changed files with 120 additions and 64 deletions

View File

@ -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());
}

View File

@ -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) {

View File

@ -10,5 +10,5 @@
</label>
<?php $i=$i+1 ?>
<?php endforeach; ?>
<?php echo $this->formErrors($this->element->getMessages()) ?>
<?php if($this->element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?>
</dd>

View File

@ -9,8 +9,5 @@
$this->element->getAttribs()
) ?>
<?php if($this->element->hasErrors()) {
echo $this->formErrors($this->element->getMessages());
}
?>
<?php if($this->element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?>
</dd>

View File

@ -1,31 +1,29 @@
<div class="wrapper" id="content">
<form method="post" action="">
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<ul>
<li><a href="#schedule-show-what"><span>What</span></a></li>
<li><a href="#schedule-show-when"><span>When</span></a></li>
<li><a href="#schedule-show-who"><span>Who</span></a></li>
<li><a href="#schedule-show-style"><span>Style</span></a></li>
</ul>
<div class="button-bar">
<button id="add-show-submit" class="right-floated">Add this show</button></div>
<div class="clear"></div>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>
<div id="schedule-show-style">
<?php echo $this->style ?>
</div>
</div>
</form>
<form method="post" action="">
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<div class="button-bar">
<button id="add-show-submit" class="right-floated">Add this show</button>
</div>
<div class="clear"></div>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>When</h3>
<div id="schedule-show-when" class="collapsible-content">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Who</h3>
<div id="schedule-show-who" class="collapsible-content">
<?php echo $this->who ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Style</h3>
<div id="schedule-show-style" class="collapsible-content">
<?php echo $this->style ?>
</div>
</div>
</form>
<div id="fullcalendar_show_display" class="ui-widget-content block-shadow omega-block padded"></div>
</div>

View File

@ -2,10 +2,6 @@
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>

View File

@ -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;
}
}

View File

@ -724,7 +724,7 @@ dt.block-display, dd.block-display {
.floated-panel {
margin-top:0;
width:99.99%;
z-index:9999;
z-index:999;
}
@ -823,7 +823,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;
}
@ -1094,7 +1095,7 @@ button, input {
float:left;
width:420px;
margin-left:10px;
/* display:block;*/
/*display:none;*/
}
.user-list-wrapper {
float:left;
@ -1187,3 +1188,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;

View File

@ -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();