Merge branch '2.3.x' into 2.3.x-saas

This commit is contained in:
Martin Konecny 2013-01-24 17:49:08 -05:00
commit 6f5ffdc1e7
29 changed files with 7386 additions and 95 deletions

View file

@ -37,7 +37,7 @@ function createDateInput(el, onSelect) {
dayNamesMin: i18n_days_short,
closeText: $.i18n._('Close'),
//showButtonPanel: true,
firstDay: weekStart
firstDay: calendarPref.weekStart
});
}
@ -324,7 +324,7 @@ function setAddShowEvents() {
dayNamesMin: i18n_days_short,
closeText: 'Close',
showButtonPanel: true,
firstDay: weekStart
firstDay: calendarPref.weekStart
});
form.find('input[name^="add_show_rebroadcast_time"]').timepicker({
amPmText: ['', ''],

View file

@ -326,21 +326,36 @@ function eventResize( event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, vie
});
}
function getFullCalendarEvents(start, end, callback) {
var url, start_date, end_date;
start_date = makeTimeStamp(start);
end_date = makeTimeStamp(end);
url = baseUrl+'Schedule/event-feed';
function preloadEventFeed () {
var url = baseUrl+'Schedule/event-feed-preload';
var d = new Date();
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
callback(json.events);
$.post(url, {format: "json", cachep: d.getTime()}, function(json){
calendarEvents = json.events;
createFullCalendar({calendarInit: calendarPref});
});
}
var initialLoad = true;
function getFullCalendarEvents(start, end, callback) {
if (initialLoad) {
initialLoad = false;
callback(calendarEvents);
} else {
var url, start_date, end_date;
start_date = makeTimeStamp(start);
end_date = makeTimeStamp(end);
url = baseUrl+'Schedule/event-feed';
var d = new Date();
$.post(url, {format: "json", start: start_date, end: end_date, cachep: d.getTime()}, function(json){
callback(json.events);
});
}
}
function checkSCUploadStatus(){
var url = baseUrl+'Library/get-upload-to-soundcloud-status/format/json';
$("span[class*=progress]").each(function(){
@ -541,6 +556,7 @@ function alertShowErrorAndReload(){
window.location.reload();
}
preloadEventFeed();
$(document).ready(function(){
setInterval( "checkSCUploadStatus()", 5000 );
setInterval( "getCurrentShow()", 5000 );

View file

@ -328,9 +328,6 @@ function alertShowErrorAndReload(){
}
$(document).ready(function() {
$.ajax({ url: baseUrl+"Api/calendar-init/format/json", dataType:"json", success:createFullCalendar
, error:function(jqXHR, textStatus, errorThrown){}});
setInterval(checkCalendarSCUploadStatus, 5000);
$.contextMenu({