Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
b5a65ae7e4
|
@ -65,7 +65,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version']);
|
||||
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$view->headScript()->appendScript("var baseUrl='$baseUrl/'");
|
||||
|
||||
//scripts for now playing bar
|
||||
|
|
|
@ -10,7 +10,6 @@ class SystemstatusController extends Zend_Controller_Action
|
|||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/sprintf/sprintf-0.7-beta1.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
|
|
|
@ -85,10 +85,5 @@ function openPreviewWindow(url) {
|
|||
}
|
||||
|
||||
function pad(number, length) {
|
||||
var str = '' + number;
|
||||
while (str.length < length) {
|
||||
str = '0' + str;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
return sprintf("%'0"+length+"d", number);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,23 @@ function popup(mylink){
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Take a string representing a date in the format 2012-04-25 and return
|
||||
* a javascript date object representing this date. */
|
||||
function getDateFromString(time){
|
||||
var date = time.split("-");
|
||||
|
||||
if (date.length != 3){
|
||||
return null;
|
||||
}
|
||||
|
||||
var year = parseInt(date[0], 10);
|
||||
var month = parseInt(date[1], 10) -1;
|
||||
var day = parseInt(date[2], 10);
|
||||
|
||||
return new Date(year, month, day);
|
||||
|
||||
}
|
||||
|
||||
function convertSecondsToDaysHoursMinutesSeconds(seconds){
|
||||
if (seconds < 0)
|
||||
seconds = 0;
|
||||
|
|
|
@ -110,7 +110,22 @@ function setAddShowEvents() {
|
|||
form.find("#add_show_repeats").click(function(){
|
||||
$(this).blur();
|
||||
form.find("#schedule-show-when > fieldset:last").toggle();
|
||||
|
||||
var checkBoxSelected = false;
|
||||
var days = form.find("#add_show_day_check-element input").each( function() {
|
||||
var currentCheckBox = $(this).attr("checked");
|
||||
if (currentCheckBox && currentCheckBox == "checked"){
|
||||
checkBoxSelected = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (!checkBoxSelected){
|
||||
var d = getDateFromString(form.find("#add_show_start_date").attr("value"));
|
||||
if ( d != null)
|
||||
form.find("#add_show_day_check-"+d.getDay()).attr('checked', true);
|
||||
}
|
||||
|
||||
//must switch rebroadcast displays
|
||||
if(form.find("#add_show_rebroadcast").attr('checked')) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue