Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
e28a1421c5
|
@ -35,12 +35,6 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
$checkboxes = $this->getElement('add_show_day_check');
|
|
||||||
|
|
||||||
$checkboxes->setDecorators(array(array('ViewScript', array(
|
|
||||||
'viewScript' => 'form/add-show-checkbox.phtml'
|
|
||||||
))));
|
|
||||||
|
|
||||||
// Add end date element
|
// Add end date element
|
||||||
$this->addElement('text', 'add_show_end_date', array(
|
$this->addElement('text', 'add_show_end_date', array(
|
||||||
'label' => 'Date End:',
|
'label' => 'Date End:',
|
||||||
|
|
|
@ -33,6 +33,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
$this->addElement('text', 'add_show_duration', array(
|
$this->addElement('text', 'add_show_duration', array(
|
||||||
'label' => 'Duration:',
|
'label' => 'Duration:',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
|
'value' => '1:00',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
|
|
|
@ -80,7 +80,10 @@ class Show {
|
||||||
//only want the day of the week from the start date.
|
//only want the day of the week from the start date.
|
||||||
if(!$data['add_show_repeats']) {
|
if(!$data['add_show_repeats']) {
|
||||||
$data['add_show_day_check'] = array($startDow);
|
$data['add_show_day_check'] = array($startDow);
|
||||||
}
|
}
|
||||||
|
else if($data['add_show_repeats'] && $data['add_show_day_check'] == "") {
|
||||||
|
$data['add_show_day_check'] = array($startDow);
|
||||||
|
}
|
||||||
|
|
||||||
//find repeat type or set to a non repeating show.
|
//find repeat type or set to a non repeating show.
|
||||||
if($data['add_show_repeats']) {
|
if($data['add_show_repeats']) {
|
||||||
|
@ -89,7 +92,7 @@ class Show {
|
||||||
else {
|
else {
|
||||||
$repeat_type = -1;
|
$repeat_type = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$show = new CcShow();
|
$show = new CcShow();
|
||||||
$show->setDbName($data['add_show_name']);
|
$show->setDbName($data['add_show_name']);
|
||||||
$show->setDbDescription($data['add_show_description']);
|
$show->setDbDescription($data['add_show_description']);
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
<dt id="<?php echo $this->element->getName() ?>-label" class="block-display">
|
|
||||||
<?php echo $this->formLabel($this->element->getName(),
|
|
||||||
$this->element->getLabel()) ?>
|
|
||||||
</dt>
|
|
||||||
<dd id="<?php echo $this->element->getName() ?>-element" class="block-display clearfix">
|
|
||||||
<?php $i=0 ?>
|
|
||||||
<?php foreach ($this->element->getMultiOptions() as $opt) : ?>
|
|
||||||
<label class="wrapp-label" for="<?php echo $this->element->getName() ?>-<?php echo $i ?>">
|
|
||||||
<input id="<?php echo $this->element->getName() ?>-<?php echo $i ?>" value="<?php echo $i ?>" type="checkbox" name="add_show_day_check[]"><?php echo $opt ?></input>
|
|
||||||
</label>
|
|
||||||
<?php $i=$i+1 ?>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if($this->element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?>
|
|
||||||
</dd>
|
|
|
@ -1,12 +1,24 @@
|
||||||
<div id="show_content_dialog">
|
<div id="show_content_dialog">
|
||||||
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="datatable">
|
||||||
|
<tr>
|
||||||
|
<th>Start</th>
|
||||||
|
<th>Title</th>
|
||||||
|
<th>Creator</th>
|
||||||
|
<th>Album</th>
|
||||||
|
<th>Length</th>
|
||||||
|
<th>Genre</th>
|
||||||
|
</tr>
|
||||||
|
<?php $i=0; ?>
|
||||||
<?php foreach($this->showContent as $row): ?>
|
<?php foreach($this->showContent as $row): ?>
|
||||||
<div>
|
<tr class="<?php if($i&1){echo "even";}else{echo "odd";}?>">
|
||||||
<span><?php echo $row["starts"] ?></span>
|
<td><?php echo $row["starts"] ?></td>
|
||||||
<span><?php echo $row["track_title"] ?></span>
|
<td><?php echo $row["track_title"] ?></td>
|
||||||
<span><?php echo $row["artist_name"] ?></span>
|
<td><?php echo $row["artist_name"] ?></td>
|
||||||
<span><?php echo $row["album_title"] ?></span>
|
<td><?php echo $row["album_title"] ?></td>
|
||||||
<span><?php echo $row["length"] ?></span>
|
<td><?php echo $row["length"] ?></td>
|
||||||
<span><?php echo $row["genre"] ?></span>
|
<td><?php echo $row["genre"] ?></td>
|
||||||
</div>
|
</tr>
|
||||||
|
<?php $i=$i+1; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1301,11 +1301,15 @@ ul.errors li {
|
||||||
background-color:#ff753c;
|
background-color:#ff753c;
|
||||||
}
|
}
|
||||||
.playing-list {
|
.playing-list {
|
||||||
background-color:#b4e0f7;
|
background-color:#b0dcf2;
|
||||||
|
}
|
||||||
|
.odd.playing-list {
|
||||||
|
background-color:#bfe5f8;
|
||||||
}
|
}
|
||||||
.gap {
|
.gap {
|
||||||
background-color:#da5454;
|
background-color:#da5454;
|
||||||
}
|
}
|
||||||
|
/*---//////////////////// END NOW PLAYING COLORS ////////////////////---*/
|
||||||
.icon-link, .ui-widget-content a.icon-link {
|
.icon-link, .ui-widget-content a.icon-link {
|
||||||
color: #646464;
|
color: #646464;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -1335,4 +1339,14 @@ ul.errors li {
|
||||||
.button-bar .icon-link {
|
.button-bar .icon-link {
|
||||||
float:left;
|
float:left;
|
||||||
margin:7px 0 0 1px;
|
margin:7px 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#show_content_dialog .datatable tr:first-child td {
|
||||||
|
border-top:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#show_content_dialog .datatable {
|
||||||
|
margin-top:8px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -59,46 +59,54 @@ function findHosts(request, callback) {
|
||||||
|
|
||||||
function setAddShowEvents() {
|
function setAddShowEvents() {
|
||||||
|
|
||||||
$("h3").click(function(){
|
var form = $("#add-show-form");
|
||||||
|
|
||||||
|
form.find("h3").click(function(){
|
||||||
$(this).next().toggle();
|
$(this).next().toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!$("#add_show_repeats").attr('checked')) {
|
if(!form.find("#add_show_repeats").attr('checked')) {
|
||||||
$("#schedule-show-when > fieldset:last").hide();
|
form.find("#schedule-show-when > fieldset:last").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#add_show_repeats").click(function(){
|
form.find("#add_show_repeats").click(function(){
|
||||||
$("#schedule-show-when > fieldset:last").toggle();
|
form.find("#schedule-show-when > fieldset:last").toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#add_show_repeat_type").change(function(){
|
form.find("#add_show_repeat_type").change(function(){
|
||||||
if($(this).val() == 2) {
|
if($(this).val() == 2) {
|
||||||
$("#add_show_day_check-label, #add_show_day_check-element").hide();
|
form.find("#add_show_day_check-label, #add_show_day_check-element").hide();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$("#add_show_day_check-label, #add_show_day_check-element").show();
|
form.find("#add_show_day_check-label, #add_show_day_check-element").show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#add_show_no_end").click(function(){
|
form.find("#add_show_day_check-label").addClass("block-display");
|
||||||
$("#add_show_end_date").toggle();
|
form.find("#add_show_day_check-element").addClass("block-display clearfix");
|
||||||
|
form.find("#add_show_day_check-element label").addClass("wrapp-label");
|
||||||
|
form.find("#add_show_day_check-element br").remove();
|
||||||
|
|
||||||
|
form.find("#add_show_no_end").click(function(){
|
||||||
|
form.find("#add_show_end_date").toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
createDateInput($("#add_show_start_date"), startDpSelect);
|
createDateInput(form.find("#add_show_start_date"), startDpSelect);
|
||||||
createDateInput($("#add_show_end_date"), endDpSelect);
|
createDateInput(form.find("#add_show_end_date"), endDpSelect);
|
||||||
|
|
||||||
$("#add_show_start_time").timepicker();
|
form.find("#add_show_start_time").timepicker();
|
||||||
$("#add_show_duration").timepicker({
|
form.find("#add_show_duration").timepicker({
|
||||||
amPmText: ['', '']
|
amPmText: ['', ''],
|
||||||
|
defaultTime: '01:00'
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#add_show_hosts_autocomplete").autocomplete({
|
form.find("#add_show_hosts_autocomplete").autocomplete({
|
||||||
source: findHosts,
|
source: findHosts,
|
||||||
select: autoSelect,
|
select: autoSelect,
|
||||||
delay: 200
|
delay: 200
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#schedule-show-style input").ColorPicker({
|
form.find("#schedule-show-style input").ColorPicker({
|
||||||
onChange: function (hsb, hex, rgb, el) {
|
onChange: function (hsb, hex, rgb, el) {
|
||||||
$(el).val(hex);
|
$(el).val(hex);
|
||||||
},
|
},
|
||||||
|
@ -112,7 +120,7 @@ function setAddShowEvents() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#add-show-close")
|
form.find("#add-show-close")
|
||||||
.click(function(event){
|
.click(function(event){
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
@ -124,7 +132,7 @@ function setAddShowEvents() {
|
||||||
$("#add-show-form").hide();
|
$("#add-show-form").hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#add-show-submit")
|
form.find("#add-show-submit")
|
||||||
.button()
|
.button()
|
||||||
.click(function(event){
|
.click(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue