Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
0152ad7f44
|
@ -54,6 +54,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/libs/stuHover.js','text/javascript');
|
||||
$view->headScript()->appendFile('/js/libs/jquery.stickyPanel.js','text/javascript');
|
||||
|
||||
$view->headScript()->appendFile('/js/airtime/common/common.js','text/javascript');
|
||||
|
||||
//TODO: Find better place to put this in.
|
||||
$view->addHelperPath('../application/views/helpers', 'Airtime_View_Helper');
|
||||
|
|
|
@ -85,7 +85,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/fullcalendar.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/colorpicker/css/colorpicker.css');
|
||||
$this->view->headLink()->appendStylesheet('/css/add-show.css');
|
||||
|
@ -110,7 +110,20 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$what = $formWhat->isValid($data);
|
||||
$when = $formWhen->isValid($data);
|
||||
$repeats = $formRepeats->isValid($data);
|
||||
if($when) {
|
||||
$when = $formWhen->checkReliantFields($data);
|
||||
}
|
||||
|
||||
if($data["add_show_repeats"]) {
|
||||
$repeats = $formRepeats->isValid($data);
|
||||
if($repeats) {
|
||||
$when = $formRepeats->checkReliantFields($data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$repeats = 1; //make it valid, results don't matter anyways.
|
||||
}
|
||||
|
||||
$who = $formWho->isValid($data);
|
||||
$style = $formStyle->isValid($data);
|
||||
|
||||
|
@ -126,7 +139,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
}
|
||||
else {
|
||||
$this->_redirect('Schedule');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,10 +23,16 @@ 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
|
||||
$this->addElement('text', 'add_show_end_date', array(
|
||||
'label' => 'Date End:',
|
||||
//'class' => 'input_text hasDatepicker',
|
||||
'class' => 'input_text',
|
||||
'required' => false,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
|
@ -42,6 +48,21 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
|||
));
|
||||
}
|
||||
|
||||
public function checkReliantFields($formData) {
|
||||
|
||||
$start_timestamp = $formData['add_show_start_date'];
|
||||
$end_timestamp = $formData['add_show_end_date'];
|
||||
|
||||
$start_epoch = strtotime($start_timestamp);
|
||||
$end_epoch = strtotime($end_timestamp);
|
||||
|
||||
if($end_epoch < $start_epoch) {
|
||||
$this->getElement('add_show_end_date')->setErrors(array('End date must be after start date'));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -12,12 +12,26 @@ class Application_Form_AddShowStyle extends Zend_Form_SubForm
|
|||
'filters' => array('StringTrim')
|
||||
));
|
||||
|
||||
$bg = $this->getElement('add_show_background_color');
|
||||
|
||||
$bg->setDecorators(array(array('ViewScript', array(
|
||||
'viewScript' => 'form/add-show-style.phtml',
|
||||
'class' => 'big'
|
||||
))));
|
||||
|
||||
// Add show color input
|
||||
$this->addElement('text', 'add_show_color', array(
|
||||
'label' => 'Text Colour',
|
||||
'class' => 'input_text',
|
||||
'filters' => array('StringTrim')
|
||||
));
|
||||
|
||||
$c = $this->getElement('add_show_color');
|
||||
|
||||
$c->setDecorators(array(array('ViewScript', array(
|
||||
'viewScript' => 'form/add-show-style.phtml',
|
||||
'class' => 'big'
|
||||
))));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
|
|||
'validators' => array('NotEmpty')
|
||||
));
|
||||
|
||||
$nameLabel = $this->getElement('add_show_name');
|
||||
$nameInput = $this->getElement('add_show_name');
|
||||
|
||||
$nameLabel->setDecorators(array(array('ViewScript', array(
|
||||
'viewScript' => 'testform.phtml',
|
||||
'class' => 'test template'
|
||||
$nameInput->setDecorators(array(array('ViewScript', array(
|
||||
'viewScript' => 'form/add-show-block.phtml',
|
||||
'class' => 'block-display'
|
||||
))));
|
||||
|
||||
|
||||
|
@ -29,6 +29,13 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
|
|||
'class' => 'input_text_area'
|
||||
));
|
||||
|
||||
$descText = $this->getElement('add_show_description');
|
||||
|
||||
$descText->setDecorators(array(array('ViewScript', array(
|
||||
'viewScript' => 'form/add-show-block.phtml',
|
||||
'class' => 'block-display'
|
||||
))));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
// Add start date element
|
||||
$this->addElement('text', 'add_show_start_date', array(
|
||||
'label' => 'Date Start:',
|
||||
//'class' => 'input_text hasDatepicker',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
|
@ -37,7 +37,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
array('date', false, array('HH:mm'))
|
||||
array('date', false, array('HH:mm', 'messages' => 'Show must be under 24 hours'))
|
||||
)
|
||||
));
|
||||
|
||||
|
@ -49,9 +49,10 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
|
||||
}
|
||||
|
||||
/*
|
||||
public function postValidation(array $formData) {
|
||||
public function checkReliantFields($formData) {
|
||||
|
||||
$valid = true;
|
||||
|
||||
$now_timestamp = date("Y-m-d H:i:s");
|
||||
$start_timestamp = $formData['add_show_start_date']."".$formData['add_show_start_time'];
|
||||
|
||||
|
@ -60,12 +61,16 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
|
||||
if($start_epoch < $now_epoch) {
|
||||
$this->getElement('add_show_start_time')->setErrors(array('Cannot create show in the past'));
|
||||
return false;
|
||||
$valid = false;
|
||||
}
|
||||
|
||||
if(strtotime("00:00") == strtotime($formData["add_show_duration"])) {
|
||||
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration 00:00'));
|
||||
$valid = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return $valid;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,15 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<div id="nowplayingbar"><?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())); ?></div>
|
||||
<div class="logo"></div>
|
||||
<div id="Panel">
|
||||
<div class="logo"></div>
|
||||
<?= $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
|
||||
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
||||
<?php echo $this->navigation()->menu() ?>
|
||||
</div>
|
||||
|
||||
<div class="wrapper" id="content"><?php echo $this->layout()->content ?></div>
|
||||
</body>
|
||||
|
|
|
@ -9,13 +9,15 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<div id="nowplayingbar"><?= $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?></div>
|
||||
<div class="logo"></div>
|
||||
<div id="Panel">
|
||||
<div class="logo"></div>
|
||||
<?= $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs())) ?>
|
||||
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
||||
<?php echo $this->navigation()->menu() ?>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div id="side_playlist" class="ui-widget ui-widget-content block-shadow alpha-block"><?php echo $this->layout()->spl ?></div>
|
||||
|
|
|
@ -76,14 +76,17 @@ class Show {
|
|||
$start = $data['add_show_start_date'];
|
||||
}
|
||||
|
||||
$showDay = new CcShowDays();
|
||||
$showDay->setDbFirstShow($start);
|
||||
$showDay->setDbLastShow($endDate);
|
||||
$showDay->setDbStartTime($data['add_show_start_time']);
|
||||
$showDay->setDbEndTime($endTime);
|
||||
$showDay->setDbDay($day);
|
||||
$showDay->setDbShowId($showId);
|
||||
$showDay->save();
|
||||
if(strtotime($start) < strtotime($endDate)) {
|
||||
|
||||
$showDay = new CcShowDays();
|
||||
$showDay->setDbFirstShow($start);
|
||||
$showDay->setDbLastShow($endDate);
|
||||
$showDay->setDbStartTime($data['add_show_start_time']);
|
||||
$showDay->setDbEndTime($endTime);
|
||||
$showDay->setDbDay($day);
|
||||
$showDay->setDbShowId($showId);
|
||||
$showDay->save();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($data['add_show_hosts'] as $host) {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<dt id="<?php echo $this->element->getName() ?>-label" class="<?php echo $this->class ?>">
|
||||
<?php echo $this->formLabel($this->element->getName(),
|
||||
$this->element->getLabel()) ?>
|
||||
</dt>
|
||||
<dd id="<?php echo $this->element->getName() ?>-element" class="<?php echo $this->class ?>">
|
||||
<?php echo $this->{$this->element->helper}(
|
||||
$this->element->getName(),
|
||||
$this->element->getValue(),
|
||||
$this->element->getAttribs()
|
||||
) ?>
|
||||
<?php if($this->element->hasErrors()) {
|
||||
echo $this->formErrors($this->element->getMessages());
|
||||
}
|
||||
?>
|
||||
</dd>
|
|
@ -0,0 +1,14 @@
|
|||
<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 echo $this->formErrors($this->element->getMessages()) ?>
|
||||
</dd>
|
|
@ -0,0 +1,16 @@
|
|||
<dt id="<?php echo $this->element->getName() ?>-label" class="<?php echo $this->class ?>">
|
||||
<?php echo $this->formLabel($this->element->getName(),
|
||||
$this->element->getLabel()) ?>
|
||||
</dt>
|
||||
<dd id="<?php echo $this->element->getName() ?>-element">
|
||||
<?php echo $this->{$this->element->helper}(
|
||||
$this->element->getName(),
|
||||
$this->element->getValue(),
|
||||
$this->element->getAttribs()
|
||||
) ?>
|
||||
|
||||
<?php if($this->element->hasErrors()) {
|
||||
echo $this->formErrors($this->element->getMessages());
|
||||
}
|
||||
?>
|
||||
</dd>
|
|
@ -1,12 +1,23 @@
|
|||
<div id="schedule-add-show">
|
||||
<div class="wrapper" id="content">
|
||||
<form method="post" action="">
|
||||
<div id="schedule-add-show-tabs">
|
||||
<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>
|
||||
|
||||
<?php if(isset($this->overlap)) : ?>
|
||||
<div id="schedule-add-show-overlap" style="display:block;">
|
||||
<div>Overlap</div>
|
||||
<?php echo $this->partialLoop('schedule/show-overlap.phtml', $this->overlap); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<div id="schedule-show-what">
|
||||
<?php echo $this->what ?>
|
||||
</div>
|
||||
|
@ -22,13 +33,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<button id="add-show-submit">Add</button>
|
||||
</div>
|
||||
|
||||
<div id="fullcalendar_show_display"></div>
|
||||
<div id="schedule-add-show-overlap">
|
||||
<?php if(isset($this->overlap)) : ?>
|
||||
<div>Overlap</div>
|
||||
<?php echo $this->partialLoop('schedule/show-overlap.phtml', $this->overlap); ?>
|
||||
<?php endif;?>
|
||||
<div id="fullcalendar_show_display" class="ui-widget-content block-shadow omega-block padded"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<div class="<?php echo $this->class ?>">
|
||||
<?php echo $this->formLabel($this->element->getName(),
|
||||
$this->element->getLabel()) ?>
|
||||
<?php echo $this->{$this->element->helper}(
|
||||
$this->element->getName(),
|
||||
$this->element->getValue(),
|
||||
$this->element->getAttribs()
|
||||
) ?>
|
||||
<?php echo $this->formErrors($this->element->getMessages()) ?>
|
||||
<div class="hint"><?php echo $this->element->getDescription() ?></div>
|
||||
</div>
|
|
@ -18,12 +18,10 @@
|
|||
width: 60%;
|
||||
}
|
||||
|
||||
#schedule-add-show-overlap {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
|
||||
#schedule-add-show .ui-tabs-panel {
|
||||
padding-top: 16px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
#schedule-add-show fieldset {
|
||||
padding:8px;
|
||||
|
@ -82,6 +80,9 @@ label.wrapp-label input[type="checkbox"] {
|
|||
#schedule-add-show fieldset {
|
||||
min-height:70px;
|
||||
}
|
||||
#schedule-add-show fieldset:last-child {
|
||||
margin-bottom:0;
|
||||
}
|
||||
#schedule-add-show fieldset dd input[type="checkbox"] {
|
||||
margin-top:2px;
|
||||
}
|
||||
|
@ -96,4 +97,13 @@ label.wrapp-label input[type="checkbox"] {
|
|||
}
|
||||
#add_show_name-element .input_text {
|
||||
width:99%;
|
||||
}
|
||||
|
||||
#schedule-add-show-overlap {
|
||||
border: 1px solid #c83f3f;
|
||||
background: #c6b4b4;
|
||||
margin-top:8px;
|
||||
padding:8px;
|
||||
color:#902d2d;
|
||||
display:none;
|
||||
}
|
|
@ -71,6 +71,7 @@ table.fc-header {
|
|||
.fc-header-title {
|
||||
margin-top: 0;
|
||||
white-space: nowrap;
|
||||
font-size:17px;
|
||||
}
|
||||
|
||||
.fc-header-space {
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -7,9 +7,9 @@
|
|||
* version 0.0.4 : Removed width:100% on tables
|
||||
*/
|
||||
|
||||
.ui-timepicker-inline { display: inline; }
|
||||
.ui-timepicker-inline { display: inline }
|
||||
|
||||
#ui-timepicker-div { padding: 0.2em }
|
||||
#ui-timepicker-div { padding: 0.2em; z-index: 5 !important }
|
||||
.ui-timepicker-table { display: inline-table }
|
||||
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||
|
||||
|
@ -25,4 +25,4 @@
|
|||
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,8 +51,9 @@
|
|||
position:relative;
|
||||
}
|
||||
|
||||
#side_playlist li div.list-item-container {
|
||||
#side_playlist li div.list-item-container, #side_playlist li div.list-item-container.ui-state-active {
|
||||
height:56px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#spl_name {
|
||||
|
@ -70,7 +71,9 @@
|
|||
.spl_playlength {
|
||||
float:right;
|
||||
font-size:14px;
|
||||
padding:0 5px 0 0
|
||||
padding:0 5px 0 0;
|
||||
width:100px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
.spl_artist {
|
||||
|
@ -202,4 +205,32 @@
|
|||
}
|
||||
#spl_sortable dl.inline-list {
|
||||
margin:10px 0 0 37px;
|
||||
}
|
||||
|
||||
|
||||
#spl_sortable li .spl_fade_start, #spl_sortable li .spl_fade_end {
|
||||
background-color: transparent;
|
||||
float:right;
|
||||
font-size: 9px;
|
||||
height: 15px;
|
||||
right: 35px;
|
||||
width: 33px;
|
||||
margin-top:2px;
|
||||
}
|
||||
#spl_sortable li .spl_fade_start.ui-state-default {
|
||||
background: transparent url(images/fade_in.png) no-repeat 0 0;
|
||||
border:none;
|
||||
}
|
||||
#spl_sortable li .spl_fade_start.ui-state-active {
|
||||
background: transparent url(images/fade_in.png) no-repeat 0 -30px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
#spl_sortable li .spl_fade_end.ui-state-default {
|
||||
background: transparent url(images/fade_out.png) no-repeat 0 0;
|
||||
border:none;
|
||||
}
|
||||
#spl_sortable li .spl_fade_end.ui-state-active {
|
||||
background: transparent url(images/fade_out.png) no-repeat 0 -30px;
|
||||
border:none;
|
||||
}
|
|
@ -1509,3 +1509,8 @@ padding: 0;
|
|||
margin: -1px;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
|
||||
.ui-datepicker {
|
||||
display:none;
|
||||
}
|
|
@ -1,127 +1,131 @@
|
|||
#content {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
div.ui-datepicker {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
#schedule_playlist_dialog > div {
|
||||
float: left;
|
||||
width: 510px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#schedule_playlist_dialog ul {
|
||||
list-style-type: none;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 10px 5px;
|
||||
height: 275px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin: 0;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 {
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 475px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 > div {
|
||||
float: left;
|
||||
margin: 0 5px 2px 0;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 > div > span.ui-icon {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li div{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div{
|
||||
width: 475px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div > div > span{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div > div{
|
||||
clear: left;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.sched_description {
|
||||
clear: left;
|
||||
font-size: 85%;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.sh_pl_name {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.sh_pl_creator {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
.sh_pl_time {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
.sh_file_name {
|
||||
display: inline-block;
|
||||
width: 325px;
|
||||
}
|
||||
|
||||
.sh_file_artist {
|
||||
font-size: 90%;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#show_time_info > div, #show_time_info > span{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#show_progressbar {
|
||||
width: 150px;
|
||||
height: 5px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 150px;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Add show Dialog----------------------------------------------------------------------------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#add_show_name {
|
||||
|
||||
}
|
||||
|
||||
#add_show_description {
|
||||
width: 400px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
#fullcalendar_show_display {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#schedule_calendar {
|
||||
width:98%
|
||||
}
|
||||
div.ui-datepicker {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
#schedule_playlist_dialog > div {
|
||||
float: left;
|
||||
width: 510px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#schedule_playlist_dialog ul {
|
||||
list-style-type: none;
|
||||
overflow: auto;
|
||||
margin: 0;
|
||||
padding: 10px 5px;
|
||||
height: 275px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin: 0;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 {
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 475px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 > div {
|
||||
float: left;
|
||||
margin: 0 5px 2px 0;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > h3 > div > span.ui-icon {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li div{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div{
|
||||
width: 475px;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div > div > span{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#schedule_playlist_chosen li > div > div{
|
||||
clear: left;
|
||||
padding-top: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.sched_description {
|
||||
clear: left;
|
||||
font-size: 85%;
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.sh_pl_name {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.sh_pl_creator {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
.sh_pl_time {
|
||||
width: 125px;
|
||||
}
|
||||
|
||||
.sh_file_name {
|
||||
display: inline-block;
|
||||
width: 325px;
|
||||
}
|
||||
|
||||
.sh_file_artist {
|
||||
font-size: 90%;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#show_time_info > div, #show_time_info > span{
|
||||
float: left;
|
||||
}
|
||||
|
||||
#show_progressbar {
|
||||
width: 150px;
|
||||
height: 5px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.time {
|
||||
width: 150px;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Add show Dialog----------------------------------------------------------------------------------------------------
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#add_show_name {
|
||||
|
||||
}
|
||||
|
||||
#add_show_description {
|
||||
width: 400px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
#fullcalendar_show_display {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.fc-agenda-body {
|
||||
max-height:560px;
|
||||
}
|
||||
|
|
|
@ -650,4 +650,10 @@ dt.block-display, dd.block-display {
|
|||
.sticky {
|
||||
padding:0;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.floated-panel {
|
||||
margin-top:0;
|
||||
width:99.99%;
|
||||
z-index:9999;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$("#Panel").stickyPanel({
|
||||
topPadding: 1,
|
||||
afterDetachCSSClass: "floated-panel",
|
||||
savePanelSpace: true
|
||||
});
|
||||
});
|
|
@ -60,7 +60,15 @@ function findHosts(request, callback) {
|
|||
function setAddShowEvents() {
|
||||
var start, end;
|
||||
|
||||
$("#schedule-add-show-tabs").tabs();
|
||||
$(".tabs").tabs();
|
||||
|
||||
if(!$("#add_show_repeats").attr('checked')) {
|
||||
$("#schedule-show-when > fieldset:last").hide();
|
||||
}
|
||||
|
||||
$("#add_show_repeats").click(function(){
|
||||
$("#schedule-show-when > fieldset:last").toggle();
|
||||
});
|
||||
|
||||
start = $("#add_show_start_date");
|
||||
end = $("#add_show_end_date");
|
||||
|
@ -69,13 +77,20 @@ function setAddShowEvents() {
|
|||
createDateInput(end, endDpSelect);
|
||||
|
||||
$("#add_show_start_time").timepicker();
|
||||
$("#add_show_duration").timepicker({
|
||||
amPmText: ['', '']
|
||||
});
|
||||
|
||||
$("#add_show_hosts_autocomplete").autocomplete({
|
||||
source: findHosts,
|
||||
select: autoSelect
|
||||
select: autoSelect,
|
||||
delay: 200
|
||||
});
|
||||
|
||||
$("#schedule-show-style input").ColorPicker({
|
||||
onChange: function (hsb, hex, rgb, el) {
|
||||
$(el).val(hex);
|
||||
},
|
||||
onSubmit: function(hsb, hex, rgb, el) {
|
||||
$(el).val(hex);
|
||||
$(el).ColorPickerHide();
|
||||
|
@ -99,8 +114,8 @@ $(document).ready(function() {
|
|||
$("#fullcalendar_show_display").fullCalendar({
|
||||
header: {
|
||||
left: 'prev, next, today',
|
||||
center: '',
|
||||
right: ''
|
||||
center: 'title',
|
||||
right: 'agendaDay, agendaWeek, month'
|
||||
},
|
||||
defaultView: 'agendaDay',
|
||||
editable: false,
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
||||
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el]);
|
||||
},
|
||||
blur = function (ev) {
|
||||
var cal = $(this).parent().parent();
|
||||
|
@ -454,6 +454,7 @@
|
|||
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
||||
col = RGBToHSB(col);
|
||||
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
||||
|
||||
col = fixHSB(col);
|
||||
} else {
|
||||
return this;
|
||||
|
@ -481,4 +482,4 @@
|
|||
ColorPickerShow: ColorPicker.showPicker,
|
||||
ColorPickerSetColor: ColorPicker.setColor
|
||||
});
|
||||
})(jQuery)
|
||||
})(jQuery)
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* jQuery.stickyPanel
|
||||
* ----------------------
|
||||
* version: 1.0.0
|
||||
* date: 1/17/11
|
||||
*
|
||||
* Copyright (c) 2011 Donny Velazquez
|
||||
* http://donnyvblog.blogspot.com/
|
||||
* http://code.google.com/p/stickyPanel
|
||||
*
|
||||
* Licensed under the Apache License 2.0
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
$.fn.stickyPanel = function (options) {
|
||||
|
||||
var options = $.extend({}, $.fn.stickyPanel.defaults, options);
|
||||
|
||||
return this.each(function () {
|
||||
$(window).bind("scroll.stickyPanel", { selected: $(this), options: options }, Scroll);
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
function Scroll(event) {
|
||||
var node = event.data.selected;
|
||||
var o = event.data.options;
|
||||
|
||||
// when top of window reaches the top of the panel detach
|
||||
if ($(document).scrollTop() >= node.offset().top) {
|
||||
|
||||
// topPadding
|
||||
var top = 0;
|
||||
if (o.topPadding != "undefined") {
|
||||
top = top + o.topPadding;
|
||||
}
|
||||
|
||||
// save panels top
|
||||
node.data("PanelsTop", node.offset().top - top);
|
||||
|
||||
// afterDetachCSSClass
|
||||
if (o.afterDetachCSSClass != "") {
|
||||
node.addClass(o.afterDetachCSSClass);
|
||||
}
|
||||
|
||||
// savePanelSpace
|
||||
if (o.savePanelSpace == true) {
|
||||
var width = node.outerWidth(true);
|
||||
var height = node.outerHeight(true);
|
||||
var float = node.css("float");
|
||||
var randomNum = Math.ceil(Math.random() * 9999); /* Pick random number between 1 and 9999 */
|
||||
node.data("PanelSpaceID", "stickyPanelSpace" + randomNum);
|
||||
node.before("<div id='" + node.data("PanelSpaceID") + "' style='width:" + width + "px;height:" + height + "px;float:" + float + ";'></div>");
|
||||
}
|
||||
|
||||
// detach panel
|
||||
node.css({
|
||||
"top": top,
|
||||
"position": "fixed"
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if ($(document).scrollTop() <= node.data("PanelsTop")) {
|
||||
|
||||
if (o.savePanelSpace == true) {
|
||||
$("#" + node.data("PanelSpaceID")).remove();
|
||||
}
|
||||
|
||||
// attach panel
|
||||
node.css({
|
||||
"top": "auto",
|
||||
"position": "static"
|
||||
});
|
||||
|
||||
if (o.afterDetachCSSClass != "") {
|
||||
node.removeClass(o.afterDetachCSSClass);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.stickyPanel.defaults = {
|
||||
topPadding: 0,
|
||||
// Use this to set the top margin of the detached panel.
|
||||
|
||||
afterDetachCSSClass: "",
|
||||
// This class is applied when the panel detaches.
|
||||
|
||||
savePanelSpace: false
|
||||
// When set to true the space where the panel was is kept open.
|
||||
};
|
||||
|
||||
})(jQuery);
|
Loading…
Reference in New Issue