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

This commit is contained in:
Naomi 2011-02-09 16:29:27 -05:00
commit 86d60dda9e
8 changed files with 78 additions and 28 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
*.pyc
files/
pypo/liquidsoap/liquidsoap
build/build.properties

View File

@ -9,24 +9,11 @@
*/
$pages = array(
array(
'label' => 'Now Playing',
'uri' => 'javascript:void(null)',
'pages' => array(
array(
'label' => 'Current',
'module' => 'default',
'controller' => 'Nowplaying',
'action' => 'index',
'resource' => 'Nowplaying'
),
array(
'label' => 'Daily View',
'module' => 'default',
'controller' => 'Nowplaying',
'action' => 'day-view',
'resource' => 'Nowplaying'
)
)
'label' => 'Now Playing',
'module' => 'default',
'controller' => 'Nowplaying',
'action' => 'index',
'resource' => 'Nowplaying'
),
array(
'label' => 'Schedule',

View File

@ -12,6 +12,10 @@ class Application_Model_DateHelper
return date("Y-m-d H:i:s", $this->_timestamp);
}
function getTime(){
return date("H:i:s", $this->_timestamp);
}
function setDate($dateString){
$this->_timestamp = strtotime($dateString);
}

View File

@ -59,7 +59,8 @@ class Application_Model_Nowplaying
$next = Schedule::Get_Scheduled_Item_Data($timeNow, 1, 10, "24 hours");
} else {
$date = new Application_Model_DateHelper;
$date->setDate($dateString);
$time = $date->getTime();
$date->setDate($dateString." ".$time);
$timeNow = $date->getDate();
$previous = array_reverse(Schedule::Get_Scheduled_Item_Data($timeNow, -1, "ALL", $date->getNowDayStartDiff()." seconds"));

View File

@ -1,2 +1,5 @@
<input type="text" id="datepicker" class="input_text">
<div class="button-bar-top">
Date:<input type="text" id="datepicker" class="input_text">
<a href="javascript:void(0)" class="toggle-button" id="now_view">Now View</a><a href="javascript:void(0)" class="toggle-button-active end-button" id="day_view">Day View</a>
</div>
<div id='demo'></div>

View File

@ -1 +1,4 @@
<div class="button-bar-top">
<a href="javascript:void(0)" class="toggle-button-active end-button" id="now_view">Now View</a><a href="javascript:void(0)" class="toggle-button" id="day_view">Day View</a>
</div>
<div id='demo'></div>

View File

@ -867,7 +867,6 @@ div.ui-datepicker {
margin-right:22px;
}
#schedule_playlist_chosen li > div > div > span {
float: right;
margin-right:46px;
@ -932,7 +931,7 @@ h2#scheduled_playlist_name span {
}
.time {
width: 100px;
width: 80px;
margin: 5px;
text-align: left;
}
@ -1083,15 +1082,21 @@ button, input {
.user-management {
width:810px;
width:380px;
}
.user-management-expanded {
width:810px;
}
.user-data {
float:left;
width:420px;
margin-left:10px;
display:none;
}
.user-list-wrapper {
float:left;
width:380px;
margin-right:10px;
/*margin-right:10px;*/
}
.user-management div.user-list-wrapper .ui-widget-header:first-child {
@ -1105,10 +1110,11 @@ button, input {
}
.user-management h2 {
font-size: 1.7em;
padding-bottom: 16px;
padding-bottom: 12px;
}
.user-management .dataTables_filter input {
width: 378px;
margin-bottom:8px;
}
.user-data.simple-formblock dd {
width: 73%;
@ -1122,8 +1128,9 @@ button, input {
}
.user-list-wrapper .button-holder {
padding:8px 0;
padding:0;
text-align:right;
height:37px;
}
.user-list-wrapper .button-holder .ui-button {
margin:0;
@ -1141,3 +1148,39 @@ button, input {
#ui-datepicker-div { z-index: 10 !important }
.button-bar-top {
text-align:right;
height:30px;
}
.toggle-button, .toggle-button-active {
border: 1px solid #505050;
background-color: #5e5e5e;
background: -moz-linear-gradient(top, #757575 0, #5e5e5e 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #757575), color-stop(100%, #5e5e5e));
color: #ffffff;
margin:0;
font-size:12px;
padding:5px 12px;
text-decoration:none;
text-shadow: #343434 0px -1px;
border-width:1px 0 1px 1px;
}
.toggle-button:hover {
background-color: #292929;
background: -moz-linear-gradient(top, #3b3b3b 0, #292929 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3b3b3b), color-stop(100%, #292929));
text-shadow: #000000 0px -1px;
}
.toggle-button-active {
background-color: #c6c6c6;
background: -moz-linear-gradient(top, #767676 0, #c6c6c6 20%, #c6c6c6 35%, #a0a0a0 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #767676), color-stop(20%, #c6c6c6), color-stop(35%, #c6c6c6), color-stop(100%, #a0a0a0));
color: #2e2e2e;
cursor:default;
text-shadow: #d8d8d8 0px 1px;
}
.end-button {
border-width:1px;
}

View File

@ -123,12 +123,20 @@ function init2(){
}
function redirect(url){
document.location.href = url;
}
$(document).ready(function() {
if (viewType == "day"){
$('#now_view').click(function(){redirect('/Nowplaying/index')});
$("#datepicker").datepicker({
onSelect: function(dateText, inst) { updateData();}});
var date = new Date();
$("#datepicker").datepicker("setDate", date);
onSelect: function(dateText, inst)
{ updateData();}});
$("#datepicker").datepicker("setDate", new Date());
} else {
$('#day_view').click(function(){redirect('/Nowplaying/day-view')});
}
init2();