Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
James 2013-01-07 18:15:12 -05:00
commit de980d21ea
3 changed files with 51 additions and 39 deletions

View file

@ -1051,6 +1051,9 @@ function addQtipToSCIcons(){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover ready: true // Needed to make it show on first mouseover
// event // event
@ -1080,6 +1083,9 @@ function addQtipToSCIcons(){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover ready: true // Needed to make it show on first mouseover
// event // event
@ -1109,6 +1115,9 @@ function addQtipToSCIcons(){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover ready: true // Needed to make it show on first mouseover
// event // event

View file

@ -257,11 +257,11 @@ function eventRender(event, element, view) {
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) { if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
$(element) $(element)
.find(".fc-event-time") .find(".fc-event-time")
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>'); .before('<span id="'+event.id+'" class="small-icon show-empty"></span>');
} else if (event.show_partial_filled === true) { } else if (event.show_partial_filled === true) {
$(element) $(element)
.find(".fc-event-time") .find(".fc-event-time")
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>'); .before('<span id="'+event.id+'" class="small-icon show-partial-filled"></span>');
} }
} else if (view.name === 'month') { } else if (view.name === 'month') {
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) { if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
@ -288,7 +288,7 @@ function eventRender(event, element, view) {
function eventAfterRender( event, element, view ) { function eventAfterRender( event, element, view ) {
$(element).find(".small-icon").live('mouseover',function(){ $(element).find(".small-icon").live('mouseover',function(){
addQtipToSCIcons($(this)); addQtipsToIcons($(this));
}); });
} }
@ -406,7 +406,8 @@ function getCurrentShow(){
}); });
} }
function addQtipToSCIcons(ele){
function addQtipsToIcons(ele){
var id = $(ele).attr("id"); var id = $(ele).attr("id");
if($(ele).hasClass("progress")){ if($(ele).hasClass("progress")){
@ -423,6 +424,9 @@ function addQtipToSCIcons(ele){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover event ready: true // Needed to make it show on first mouseover event
} }
@ -434,7 +438,7 @@ function addQtipToSCIcons(ele){
ajax: { ajax: {
url: baseUrl+"/Library/get-upload-to-soundcloud-status", url: baseUrl+"/Library/get-upload-to-soundcloud-status",
type: "post", type: "post",
data: ({format: "json", id : id, type: "file"}), data: ({format: "json", id : id, type: "show"}),
success: function(json, status){ success: function(json, status){
this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id); this.set('content.text', $.i18n._("The soundcloud id for this file is: ")+json.sc_id);
} }
@ -449,6 +453,9 @@ function addQtipToSCIcons(ele){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover event ready: true // Needed to make it show on first mouseover event
} }
@ -476,6 +483,9 @@ function addQtipToSCIcons(ele){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover event ready: true // Needed to make it show on first mouseover event
} }
@ -494,45 +504,36 @@ function addQtipToSCIcons(ele){
my: "left top", my: "left top",
viewport: $(window) viewport: $(window)
}, },
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: {
ready: true // Needed to make it show on first mouseover event
}
});
} else if ($(ele).hasClass("show-partial-filled")){
$(ele).qtip({
content: {
text: $.i18n._("This show is not completely filled with content.")
},
position:{
adjust: {
resize: true,
method: "flip flip"
},
at: "right center",
my: "left top",
viewport: $(window)
},
style: {
classes: "ui-tooltip-dark file-md-long"
},
show: { show: {
ready: true // Needed to make it show on first mouseover event ready: true // Needed to make it show on first mouseover event
} }
}); });
} }
} }
/* This functions does two things:
* 1. Checks if each event(i.e. a show) is over and removes the show empty icon if it is
* 2. Else, if an event is passed in, it checks if the event(i.e. a show) is over
* This gets checked when we are deciding if the show-empty icon should be added
* at the beginning of an event render callback.
*/
/*
function checkEmptyShowStatus(e) {
var currDate = new Date();
var endTime;
if (e === undefined) {
var events = $('#schedule_calendar').fullCalendar('clientEvents');
$.each(events, function(i, event){
endTime = event.end;
$emptyIcon = $("span[id="+event.id+"][class='small-icon show-empty']");
if (currDate.getTime() > endTime.getTime() && $emptyIcon.length === 1) {
$emptyIcon.remove();
}
});
} else {
endTime = e.end;
var showOver = false;
if (currDate.getTime() > endTime.getTime()) {
showOver = true;
}
return showOver;
}
}
*/
//Alert the error and reload the page //Alert the error and reload the page
//this function is used to resolve concurrency issue //this function is used to resolve concurrency issue
function alertShowErrorAndReload(){ function alertShowErrorAndReload(){
@ -543,7 +544,6 @@ function alertShowErrorAndReload(){
$(document).ready(function(){ $(document).ready(function(){
setInterval( "checkSCUploadStatus()", 5000 ); setInterval( "checkSCUploadStatus()", 5000 );
setInterval( "getCurrentShow()", 5000 ); setInterval( "getCurrentShow()", 5000 );
//setInterval( "checkEmptyShowStatus()", 5000 );
}); });
var view_name; var view_name;

View file

@ -7,6 +7,9 @@ if [[ $EUID -ne 0 ]]; then
exit 1 exit 1
fi fi
echo "Generating locales"
for i in `ls /usr/share/airtime/locale | grep ".._.."`; do locale-gen "$i.utf8"; done
# Absolute path to this script, e.g. /home/user/bin/foo.sh # Absolute path to this script, e.g. /home/user/bin/foo.sh
SCRIPT=`readlink -f $0` SCRIPT=`readlink -f $0`
# Absolute path this script is in, thus /home/user/bin # Absolute path this script is in, thus /home/user/bin