calendar: show playout path on icon
move icon generation from javascript to perl
This commit is contained in:
@@ -449,6 +449,7 @@ sub showCalendar {
|
|||||||
$events_by_start->{ $date->{start} }->{rms_right} = $date->{rms_right} || 0;
|
$events_by_start->{ $date->{start} }->{rms_right} = $date->{rms_right} || 0;
|
||||||
$events_by_start->{ $date->{start} }->{playout_modified_at} = $date->{modified_at};
|
$events_by_start->{ $date->{start} }->{playout_modified_at} = $date->{modified_at};
|
||||||
$events_by_start->{ $date->{start} }->{playout_updated_at} = $date->{updated_at};
|
$events_by_start->{ $date->{start} }->{playout_updated_at} = $date->{updated_at};
|
||||||
|
$events_by_start->{ $date->{start} }->{file} = $date->{file};
|
||||||
}
|
}
|
||||||
push @$events, $date;
|
push @$events, $date;
|
||||||
}
|
}
|
||||||
@@ -1504,7 +1505,27 @@ sub print_event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($showIcons) {
|
if ($showIcons) {
|
||||||
$content = '<div class="text">' . $content . '</div><div class="icons"></div>';
|
my $attr = { map { $_ => undef } split( /\s+/, $class) };
|
||||||
|
|
||||||
|
my $file = $event->{file}
|
||||||
|
? 'playout: ' . $event->{file} =~ s/\'/\'/gr
|
||||||
|
: 'playout';
|
||||||
|
|
||||||
|
my $icons='';
|
||||||
|
if ( exists $attr->{event} ){
|
||||||
|
$icons.='<i class="fas fa-microphone-alt" title="live"></i>'
|
||||||
|
if exists($attr->{live}) && exists($attr->{no_rerun});
|
||||||
|
$icons.='<i class="fas fa-microphone-slash" title="preproduced"></i>'
|
||||||
|
if exists($attr->{preproduced}) && exists($attr->{no_rerun});
|
||||||
|
$icons.='<i class="fas fa-redo" title="rerun"></i>'
|
||||||
|
if exists $attr->{rerun};
|
||||||
|
$icons.=qq{<i class="fas fa-play" title="$file" onmouseenter="console.log('$file');"></i>}
|
||||||
|
if exists $attr->{playout};
|
||||||
|
$icons.='<i class="fas fa-archive" title="archived"></i>'
|
||||||
|
if exists $attr->{archived};
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = qq{<div class="text">$content</div><div class="icons">$icons</div>};
|
||||||
}
|
}
|
||||||
|
|
||||||
my $time = '';
|
my $time = '';
|
||||||
|
|||||||
@@ -346,25 +346,6 @@ function checkStudio(){
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setIcons(){
|
|
||||||
var img='';
|
|
||||||
|
|
||||||
img='<i class="fas fa-microphone-alt" title="live"></i>';
|
|
||||||
$('#calendar div.event.live.no_rerun div.icons').append(img);
|
|
||||||
|
|
||||||
img='<i class="fas fa-microphone-slash" title="preproduced"></i>';
|
|
||||||
$('#calendar div.event.preproduced.no_rerun div.icons').append(img);
|
|
||||||
|
|
||||||
img='<i class="fas fa-redo" title="rerun"></i>';
|
|
||||||
$('#calendar div.event.rerun div.icons').append(img);
|
|
||||||
|
|
||||||
img='<i class="fas fa-play" title="playout"></i>';
|
|
||||||
$('#calendar div.event.playout div.icons').append(img);
|
|
||||||
|
|
||||||
img='<i class="fas fa-archive" title="archived"></i>';
|
|
||||||
$('#calendar div.event.archived div.icons').append(img);
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_not_assigned_to_series_dialog(){
|
function show_not_assigned_to_series_dialog(){
|
||||||
$("#event_no_series").dialog({
|
$("#event_no_series").dialog({
|
||||||
resizable: false,
|
resizable: false,
|
||||||
@@ -773,7 +754,6 @@ function updateTable(){
|
|||||||
);
|
);
|
||||||
|
|
||||||
//set checkboxes from url parameters and update all urls
|
//set checkboxes from url parameters and update all urls
|
||||||
setIcons();
|
|
||||||
$('#calendar').show();
|
$('#calendar').show();
|
||||||
|
|
||||||
showMouse();
|
showMouse();
|
||||||
|
|||||||
Reference in New Issue
Block a user