diff --git a/lib/calcms/auth.pm b/lib/calcms/auth.pm index 97bccf6..32f84c9 100644 --- a/lib/calcms/auth.pm +++ b/lib/calcms/auth.pm @@ -282,9 +282,15 @@ sub show_login_form{ @@ -340,8 +361,8 @@ sub show_login_form{
- - + +
diff --git a/lib/calcms/events.pm b/lib/calcms/events.pm index 09668d4..b29e742 100644 --- a/lib/calcms/events.pm +++ b/lib/calcms/events.pm @@ -632,7 +632,7 @@ sub get_query { $bind_values = [ $params->{event_id} ]; #filter by published, default=1 to see published only, set published='all' to see all - my $published = $params->{published} || 1; + my $published = $params->{published} || '1'; if ( ( $published eq '0' ) || ( $published eq '1' ) ) { push @$where_cond, 'published=?'; push @$bind_values, $published; @@ -945,7 +945,7 @@ sub get_query { #filter by published, default =1, set to 'all' to see all my $published_cond = ''; - my $published = $params->{published} || 1; + my $published = $params->{published} || '1'; if ( ( $published eq '0' ) || ( $published eq '1' ) ) { $published_cond = 'published=?'; push @$bind_values, $published; diff --git a/lib/calcms/params.pm b/lib/calcms/params.pm index a9f96b5..f186384 100644 --- a/lib/calcms/params.pm +++ b/lib/calcms/params.pm @@ -21,8 +21,8 @@ sub get{ #get the Apache2::RequestRec my $r=shift; - my $tmp_dir ='/var/tmp/'; - my $upload_limit=1000*1024; + my $tmp_dir = '/var/tmp/'; + my $upload_limit = 1000*1024; my $cgi = undef; my $status = undef; diff --git a/lib/calcms/studios.pm b/lib/calcms/studios.pm index 99fa98e..2e12935 100644 --- a/lib/calcms/studios.pm +++ b/lib/calcms/studios.pm @@ -133,6 +133,7 @@ sub update{ }; my $dbh=db::connect($config); + #print STDERR Dumper($query)." ".Dumper(\@bind_values); db::put($dbh, $query, \@bind_values); } diff --git a/lib/calcms/time.pm b/lib/calcms/time.pm index c8e8285..cf79561 100644 --- a/lib/calcms/time.pm +++ b/lib/calcms/time.pm @@ -339,9 +339,27 @@ sub get_duration_seconds{ my $start = shift; my $end = shift; my $timezone= shift||'UTC'; - $start=time::get_datetime($start, $timezone); - $end =time::get_datetime($end, $timezone); - my $duration=$end->epoch()-$start->epoch(); + + unless (defined $start){ + print STDERR "time::get_duration_seconds(): start is missing\n"; + return 0; + } + unless (defined $end){ + print STDERR "time::get_duration_seconds(): end is missing\n"; + return 0; + } + + $start= time::get_datetime($start, $timezone); + $end = time::get_datetime($end, $timezone); + unless (defined $start){ + print STDERR "time::get_duration_seconds(): invalid start\n"; + return 0; + } + unless (defined $end){ + print STDERR "time::get_duration_seconds(): invalid end\n"; + return 0; + } + my $duration=$end->epoch() - $start->epoch(); return $duration; } diff --git a/website/agenda/cal.cgi b/website/agenda/cal.cgi index 91967d8..84b61b3 100755 --- a/website/agenda/cal.cgi +++ b/website/agenda/cal.cgi @@ -5,7 +5,7 @@ use warnings "all"; use strict; use CGI qw(header param Vars); -$CGI::POST_MAX = 1000; +$CGI::POST_MAX = 1000; $CGI::DISABLE_UPLOADS = 1; use Data::Dumper; @@ -14,31 +14,31 @@ use config; use log; use calendar; -my $r=shift; +my $r = shift; #binmode STDOUT, ":utf8"; binmode STDOUT, ":encoding(UTF-8)"; -if ($0=~/cal.*?\.cgi$/){ - (my $cgi, my $params, my $error)=params::get($r); +if ( $0 =~ /cal.*?\.cgi$/ ) { + ( my $cgi, my $params, my $error ) = params::get($r); - my $config=config::get('config/config.cgi'); - my $debug=$config->{system}->{debug}; + my $config = config::get('config/config.cgi'); + my $debug = $config->{system}->{debug}; - my $request={ - url => $ENV{QUERY_STRING}, - params => { + my $request = { + url => $ENV{QUERY_STRING}, + params => { original => $params, - checked => calendar::check_params($config, $params), + checked => calendar::check_params( $config, $params ), }, }; - $params=$request->{params}->{checked}; + $params = $request->{params}->{checked}; log::init($request); - my $out=''; - calendar::get_cached_or_render($out, $config, $request); - print $out."\n"; + my $out = ''; + calendar::get_cached_or_render( $out, $config, $request ); + print $out. "\n"; } 1; diff --git a/website/agenda/comments.cgi b/website/agenda/comments.cgi index df32af9..caeb58d 100755 --- a/website/agenda/comments.cgi +++ b/website/agenda/comments.cgi @@ -4,7 +4,7 @@ use warnings "all"; use strict; use CGI qw(header param Vars); -$CGI::POST_MAX = 1000; +$CGI::POST_MAX = 1000; $CGI::DISABLE_UPLOADS = 1; use Data::Dumper; @@ -17,26 +17,26 @@ use time; use cache; use log; -my $r=shift; -(my $cgi, my $params, my $error)=params::get($r); +my $r = shift; +( my $cgi, my $params, my $error ) = params::get($r); binmode STDOUT, ":encoding(UTF-8)"; -if ($0=~/comments.*?\.cgi$/){ - my $config=config::get('config/config.cgi'); - my $debug=$config->{system}->{debug}; +if ( $0 =~ /comments.*?\.cgi$/ ) { + my $config = config::get('config/config.cgi'); + my $debug = $config->{system}->{debug}; - my $request={ - url => $ENV{QUERY_STRING}, - params => { + my $request = { + url => $ENV{QUERY_STRING}, + params => { original => $params, - checked => comments::check_params($config, $params), + checked => comments::check_params( $config, $params ), }, }; log::init($request); - - my $output=''; - comments::get_cached_or_render($output, $config, $request, 'filter_locked'); + + my $output = ''; + comments::get_cached_or_render( $output, $config, $request, 'filter_locked' ); print $output; } diff --git a/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.eot b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.eot new file mode 100644 index 0000000..f25146f Binary files /dev/null and b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.eot differ diff --git a/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.svg b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.svg new file mode 100644 index 0000000..78eb653 --- /dev/null +++ b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.svg @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.ttf b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.ttf new file mode 100644 index 0000000..65a04f1 Binary files /dev/null and b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.ttf differ diff --git a/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff new file mode 100644 index 0000000..6ca02c4 Binary files /dev/null and b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff differ diff --git a/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff2 b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff2 new file mode 100644 index 0000000..a337154 Binary files /dev/null and b/website/agenda/fonts/open-sans-v15-latin_latin-ext-regular.woff2 differ diff --git a/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.eot b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.eot new file mode 100644 index 0000000..748c0e6 Binary files /dev/null and b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.eot differ diff --git a/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.svg b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.svg new file mode 100644 index 0000000..627f5a3 --- /dev/null +++ b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.ttf b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.ttf new file mode 100644 index 0000000..5c3b764 Binary files /dev/null and b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.ttf differ diff --git a/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff new file mode 100644 index 0000000..0f128f1 Binary files /dev/null and b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff differ diff --git a/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff2 b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff2 new file mode 100644 index 0000000..ab076be Binary files /dev/null and b/website/agenda/fonts/roboto-v18-latin_latin-ext-regular.woff2 differ diff --git a/website/agenda/js/calcms.cust.js b/website/agenda/js/calcms.cust.js index 8431a53..148761d 100644 --- a/website/agenda/js/calcms.cust.js +++ b/website/agenda/js/calcms.cust.js @@ -392,13 +392,12 @@ var calcms_settings = new Array(); $('header.entry-header').each( function(){ var elem=$(this); $(this).find("h1").each( function(){ - if ( $(this).text() == "calcms" ){ + if ( $(this).text() == "Programm" ){ isCalcms=true; $(this).text("Programm"); } }); }); - $('div.site-info').remove(); if (isCalcms==false){ diff --git a/website/agenda/js/calcms.js b/website/agenda/js/calcms.js index 3d3d96a..e2101ba 100644 --- a/website/agenda/js/calcms.js +++ b/website/agenda/js/calcms.js @@ -677,35 +677,30 @@ var calcms = (function($) { my.showCommentForm = function showCommentForm(id, parent_id, event_id, event_start) { var response = '
'; - if (parent_id != '') - response += 'Deine Anwort:'; - document.getElementById(id).innerHTML = response - + '
' - + ' Name: *
' - + '
' - + ' Was ich sagen will, ist: *
' - + '
' + if (parent_id != '') response += 'Deine Anwort:'; + var html = response + html += '' + html += '' + html += '' + html += '
' + html += '
'; - + ' Email: (für Rückmeldungen, wird nicht angezeigt)
' - + '
' + document.getElementById(id).innerHTML = html - + ' ' - + ' ' - + ' ' - + ' ' + '' + ''; - // $("#"+id).show("drop"); my.show(id); } // end of Comment actions diff --git a/website/agenda/planung/audio_recordings.cgi b/website/agenda/planung/audio_recordings.cgi index 334f84c..a51573a 100755 --- a/website/agenda/planung/audio_recordings.cgi +++ b/website/agenda/planung/audio_recordings.cgi @@ -298,6 +298,7 @@ sub showAudioRecordings { event_id => $params->{event_id}, } ); + #print Dumper($audioRecordings); for my $recording (@$audioRecordings) { $recording->{size} =~ s/(\d)(\d\d\d)$/$1\.$2/g; $recording->{size} =~ s/(\d)(\d\d\d\.\d\d\d)$/$1\.$2/g; @@ -531,6 +532,7 @@ sub getEventDuration{ }, config => $config }; + $request->{params}->{checked}->{published}='all'; my $events = events::get( $config, $request ); if (scalar @$events == 0){ print STDERR "getEventDuration: no event found with event_id=$eventId\n"; diff --git a/website/agenda/planung/calendar.cgi b/website/agenda/planung/calendar.cgi index 30f4d94..0559479 100755 --- a/website/agenda/planung/calendar.cgi +++ b/website/agenda/planung/calendar.cgi @@ -399,7 +399,9 @@ sub showCalendar { $date->{title} .= $format if defined $format; $date->{title} .= 'library: ' . ( $date->{writing_library} || '' ) . '
' if defined $date->{'writing_library'}; $date->{title} .= 'path: ' . ( $date->{file} || '' ) . '
' if defined $date->{file}; - + $date->{title} .= 'updated_at: ' . ( $date->{updated_at} || '' ) . '
' if defined $date->{updated_at}; + $date->{title} .= 'modified_at: ' . ( $date->{modified_at} || '' ) . '
' if defined $date->{modified_at}; + #print STDERR Dumper($date) if $date->{file}=~/180503/; #$date->{title}.= 'rms_image: ' .($date->{rms_image}||'').'
' if defined $date->{rms_image}; $date->{rms_image} = uri_unescape( $date->{rms_image} ) if defined $date->{rms_image}; @@ -496,9 +498,9 @@ sub showCalendar { for my $event (@$events){ next unless defined $event->{uploaded_at}; - #print STDERR "uploadAt=$event->{uploaded_at}, playoutModified:$event->{playout_modified_at}, playoutUpdatedAt:$event->{playout_updated_at}\n"; + print STDERR "uploadAt=$event->{uploaded_at}, playoutModified:$event->{playout_modified_at}, playoutUpdatedAt:$event->{playout_updated_at}\n"; next if (defined $event->{playout_updated_at}) && ( $event->{uploaded_at} lt $event->{playout_updated_at} ); - #print STDERR Dumper($event); + print STDERR Dumper($event); $event->{upload} ='pending' ; #$event->{title}.='
pending'; } diff --git a/website/agenda/planung/css/admin.css b/website/agenda/planung/css/admin.css index 823a179..37019df 100644 --- a/website/agenda/planung/css/admin.css +++ b/website/agenda/planung/css/admin.css @@ -235,25 +235,26 @@ li.ui-menu-item{ color:green; } +#content div.ok, +#content div.warn, +#content div.error{ + font-weight:bold; + margin:0.5rem; + padding:1rem; +} + div.ok{ - border:2px solid #aca; - background:#cfc; - background: linear-gradient(to right, #cfc, white); - opacity:0.8; + color:white; + background:#0c0; } div.warn{ - border:2px solid #ff0; background:#ff0; - background: linear-gradient(to right, #ff3, white); - opacity:0.8; } div.error{ - border:2px solid #f99; - background:#fcc; - background: linear-gradient(to right, #fcc, white); - opacity:0.8; + color:white; + background:#d00; } #content button, @@ -435,3 +436,6 @@ input[type='checkbox']{ clear:both; } +#content input[readonly] { + border: 0; +} diff --git a/website/agenda/planung/css/image_manager.css b/website/agenda/planung/css/image_manager.css index a6088fb..42b7079 100644 --- a/website/agenda/planung/css/image_manager.css +++ b/website/agenda/planung/css/image_manager.css @@ -1,3 +1,7 @@ +input.field{ + width:30em; +} + #content div.image{ display:inline-block; vertical-alignment:top; @@ -11,11 +15,6 @@ vertical-align:bottom; } -#content .image_detail{ - width:150px; - height:150px; -} - #content .close{ text-align:right; padding:0; @@ -24,25 +23,51 @@ float:right; } -form table{ - width:100%; - height:100%; +#content div.image:hover{ + cursor:pointer; + background-color:#39a1f4; + font-weight:bold; + opacity:0.9; + filter:contrast(120%); + box-shadow: 0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15); } -input.field{ - width:30em; -} - - #content div.image .label{ text-align:center; background-color:#333; color:#fff; vertical-align:bottom; - opacity:0.8; + opacity:0.9; padding:6px; width:138px; margin:0; } +#content div.image.active .label{ + background-color:#39a1f4; + font-weight:bold; +} +#content div.image.active{ + border:1px solid #39a1f4; + box-shadow: 0 5px 11px 0 rgba(0,0,0,.18),0 4px 15px 0 rgba(0,0,0,.15); +} + +#imageEditor{ + min-height:800px; + height:100%; +} + +#content #imageEditor input, +#content #imageEditor select, +#content #imageEditor textarea{ + margin-left:0; + margin-bottom:1rem; + padding:1rem; +} + +#content label{ + margin-top:1rem; + text-transform: uppercase; + color:#333; +} diff --git a/website/agenda/planung/css/projects.css b/website/agenda/planung/css/projects.css index 8407f88..b38d75a 100644 --- a/website/agenda/planung/css/projects.css +++ b/website/agenda/planung/css/projects.css @@ -17,11 +17,6 @@ clear:both; } -#content div.view img{ - max-width:50px; - max-height:50px; -} - #content div.editor div.right{ float:right; padding:0; diff --git a/website/agenda/planung/image.cgi b/website/agenda/planung/image.cgi index 7ea6c9a..0f83de0 100755 --- a/website/agenda/planung/image.cgi +++ b/website/agenda/planung/image.cgi @@ -188,7 +188,7 @@ sub show_image { if ( $params->{template} =~ /edit/ ) { my $result = $results->[0]; - $result->{missing_licence}=1 unless $result->{licence}=~/\S/; + $result->{missing_licence}=1 if (! defined $result->{licence} ) || ( $result->{licence}!~/\S/); $results = [ $result ] ; } diff --git a/website/agenda/planung/image/chess.gif b/website/agenda/planung/image/chess.gif index 2a65a2b..a8cb59d 100644 Binary files a/website/agenda/planung/image/chess.gif and b/website/agenda/planung/image/chess.gif differ diff --git a/website/agenda/planung/js/datetime.js b/website/agenda/planung/js/datetime.js index 04f7eae..e850514 100644 --- a/website/agenda/planung/js/datetime.js +++ b/website/agenda/planung/js/datetime.js @@ -135,6 +135,11 @@ function showYearPicker(selector, options){ function parseDateTime(datetime){ + if (! datetime){ + console.log("datetime.js parseDateTime() is undefined or null"); + return null; + } + var dateTime = datetime.split(/[ T]+/); var date = dateTime[0].split("-"); @@ -207,6 +212,8 @@ function addDays(datetime, days){ var weekdays=['Mo','Di','Mi','Do','Fr','Sa','So']; function getWeekday(date){ + if (!date) return '?'; + if (loc['weekday_Mo']!=null) weekdays[0]=loc['weekday_Mo']; if (loc['weekday_Tu']!=null) weekdays[1]=loc['weekday_Tu']; if (loc['weekday_We']!=null) weekdays[2]=loc['weekday_We']; diff --git a/website/agenda/planung/js/edit_image.js b/website/agenda/planung/js/edit_image.js index 5fa0591..f23ea97 100644 --- a/website/agenda/planung/js/edit_image.js +++ b/website/agenda/planung/js/edit_image.js @@ -1,25 +1,6 @@ -function editImage(filename){ - $("#img_editor").load('image.cgi?show='+filename+'&template=image_edit.html', - function(){ - $('#img_editor').dialog({ - width:920, - height:330 - }); - } - ); -} - -function showImage(url){ - $("#img_image").html(''); - $("#img_image").dialog({ - width:640, - height:640 - }); -} - +/* function hideImageDetails(id,filename){ try{$('#img_editor').dialog('close');}catch(e){} - try{$('#img_image').dialog("close");}catch(e){} $("#"+id).load('image.cgi?show='+filename+'&template=image_single.html'); return false; @@ -61,4 +42,4 @@ function showImageUrl(id){ return false; } - +*/ diff --git a/website/agenda/planung/js/fileUploader.js b/website/agenda/planung/js/fileUploader.js index a5f0f97..c905f9c 100644 --- a/website/agenda/planung/js/fileUploader.js +++ b/website/agenda/planung/js/fileUploader.js @@ -115,18 +115,30 @@ var formId = "pxupload" + itr; var iframeId = "pxupload" + itr + "_frame"; var inputId = "pxupload" + itr + "_input"; - var contents = - '
' - +'
'+loc['label_name']+'
' - +'
'+loc['label_description']+'
' - ; + var contents = '' + contents += '' + if (studio_id != null) contents+=''; if (project_id != null) contents+=''; - contents+= - '' - +'' - +'
' - +''; + + contents += '
' + contents += '
' + + contents += '
' + contents += '
' + + contents += '
' + contents += '
' + + contents += '
' + contents += '
' + + contents += '
' + contents += '' + contents += '' + contents += '' + + contents += ''; $("#pxupload_form").append( contents ); }, diff --git a/website/agenda/planung/js/image.js b/website/agenda/planung/js/image.js index 467f6e5..d635b47 100644 --- a/website/agenda/planung/js/image.js +++ b/website/agenda/planung/js/image.js @@ -2,70 +2,44 @@ var windowOffsetX=32; var windowOffsetY=32; -// choose action depending on selected tab -function imageAction(filename){ - if(selectedImageTab=='select'){ - selectThisImage(filename); - return false; - } - - if(selectedImageTab=='edit'){ - editImage(filename); - return false; - } -} - // get current selected tab by tabs-id function getSelectedTab(id){ - var selector='#'+id+" li.ui-tabs-active a"; - var tabValue=$(selector).attr("value"); + var selector = '#'+id+" li.ui-tabs-active a"; + var tabValue = $(selector).attr("value"); return tabValue; } - -//select image load into selectImage box -function selectImage(project_id, studio_id, id, value, imageUrl, series_id){ - selectImageId=id; - value=value.replace(/[^a-zA-Z0-9]/g,'%'); - var url="image.cgi?search="+encodeURIComponent(value)+'&project_id='+project_id+'&studio_id='+studio_id; - if((series_id!=null)&&(series_id != '')){ - url+='&series_id='+series_id; +function setActiveImage(elem){ + $('div.image').removeClass("active"); + if (elem){ + $(elem).addClass("active"); + }else{ + $('div.image').first().addClass("active"); } +} - if(imageUrl!=null){ - var filename=imageUrl.split('%2F').pop(); - url+='&filename='+filename; - } - var x=$(window).width() - windowOffsetX; - var y=$(window).height() - windowOffsetY; - hideContent(); - - $('#selectImage').load(url); - $('#selectImage').dialog({ - appendTo: "#content", - title:"select image", - width:x, - height:y, - close: function( event, ui ) { - showContent(); - } - }); - return false; +// open dialog to show or edit image properties +function updateImageEditor(filename, elem){ + var url='image.cgi?show='+filename+'&template=image_edit.html&project_id='+project_id+'&studio_id='+studio_id + console.log("updateImageEditor "+url); + + $("#img_editor").load( + url, + function(){ + setActiveImage(elem); + } + ); } // set editor image and image url to selected image function selectThisImage(filename){ $('#'+selectImageId).val(filename); + var url = 'showImage.cgi?project_id='+project_id+'&studio_id='+studio_id+'&filename=' + filename; - console.log(url); + console.log("select image "+url); $('#imagePreview').prop('src',url); - try{ - $('#selectImage').dialog('close'); - }catch(e){ - $('#selectImage').parent().remove(); - $('html').append('
'); - }; + showContent(); return false; } @@ -77,15 +51,18 @@ function searchImage(){ value=value.replace(/[^a-zA-Z0-9]/g,'%'); if (value!=null) url+='&search='+encodeURIComponent(value) - value=$('#image_manager input[name=filename]').val(); - if (value!=null) url+='&filename='+encodeURIComponent(value); + var filename=$('#image_manager input[name=filename]').val(); + var filename = filename.replace(/^.*[\\\/]/, '') + if (filename!=null) url+='&filename='+encodeURIComponent(filename); - if(selectedImageTab=='edit'){ - url+='#image-tabs-edit' + if(selectedImageTab!='upload'){ + url+='#image-tabs-select' } - updateContainer('selectImage',url, function(){ + + console.log("searchImage(), load url="+url) + updateContainer('selectImage', url, function(){ $( "#image-tabs" ).tabs(); - $( "#image-tabs" ).tabs( "option", "active", 1 ); + if (filename!=null) updateImageEditor(encodeURIComponent(filename)); }); return false; } @@ -97,92 +74,62 @@ function hideContent(){ 'width': $(window).width() - windowOffsetX, 'height': $(window).height() - windowOffsetY, 'left': windowOffsetX/2+'px', - 'top': windowOffsetY/2+'px' + 'top': windowOffsetY/2+'px', + modal: true }); }).resize(); + /* $('.editor').each( function(){ $(this).hide(); } ); + */ return false; } function showContent(){ + /* $('.editor').each( function(){ $(this).show(); } ); + */ + $('#selectImage').remove(); return false; } -// open dialog to edit image properties -function editImage(filename){ - $("#img_editor").load( - 'image.cgi?show='+filename+'&template=image_edit.html&project_id='+project_id+'&studio_id='+studio_id, - function(){ - var x=$(window).width() - windowOffsetX; - var y=$(window).height() - windowOffsetY; - hideContent(); - - $('#img_editor').dialog({ - appendTo: "#content", - width:x, - height:y, - close: function( event, ui ) { - showContent(); - } - }); - } - ); -} - -// open dialog to show image preview -function showImage(url){ - $("#img_image").html(''); - var x=$(window).width() - windowOffsetX; - var y=$(window).height() - windowOffsetY; - hideContent(); - - $("#img_image").dialog({ - appendTo: "#content", - width:x, - height:y, - close: function( event, ui ) { - showContent(); - } - - }); -} - // save image function saveImage(id, filename) { + + $('#imageEditor #status').html(''); + console.log("save image "+id); + var url='image.cgi?save_image='+filename+'&project_id='+project_id+'&studio_id='+studio_id; - - //remove error field - if($('#image-tabs .error').length>0){ - $('#image-tabs div.error').remove(); - } - - if (url!='') $.post( + $.post( url, $("#save_img_"+id).serialize(), function(data){ + var errorFound=0; + var lines=data.split(/\n/); for (index in lines){ var line=lines[index]; if(contains(line,'ERROR:')){ //add error field - if( $('#image-tabs .error').length==0 ){ - $('#image-tabs').append('
'); + if( $('#imageEditor #status .error').length==0 ){ + $('#imageEditor #status').append('
'); } - $('#image-tabs div.error').append(line); + $('#imageEditor #status div.error').append(line); + errorFound++; } }; //console.log(data); - console.log("save "+id); + if (errorFound==0){ + $('#imageEditor #status').append('
saved
'); + } hideImageDetails('img_'+id, filename); } ); @@ -191,7 +138,11 @@ function saveImage(id, filename) { // delete image function askDeleteImage(id, filename) { - commitAction("delete image", function(){ deleteImage(id, filename) } ); + commitAction("delete image", + function(){ + deleteImage(id, filename) + } + ); } // delete image @@ -204,28 +155,12 @@ function deleteImage(id, filename) { } // close all open dialogs -function hideImageDetails(id,filename){ +function hideImageDetails(id, filename){ try{$('#img_editor').dialog('close');}catch(e){} - try{$('#img_image').dialog("close");}catch(e){} - $("#"+id).load('image.cgi?show='+filename+'&template=image_single.html&project_id='+project_id+'&studio_id='+studio_id); - return false; -} - -// show image url -function showImageUrl(id){ - var el=document.getElementById(id); - var input_id=id+'_input'; - var text=''; - if (el.innerHTML==text){ - el.innerHTML=''; - }else{ - el.innerHTML=text; - var input=document.getElementById(input_id); - input.focus(); - input.select(); - input.createTextRange().execCommand("Copy"); - } + var url='image.cgi?show='+filename+'&template=image_single.html&project_id='+project_id+'&studio_id='+studio_id; + console.log("hideImageDetails, load url="+url) + $("#"+id).load(url); return false; } @@ -254,3 +189,49 @@ function decreaseImageSize(){ } +//select image load into selectImage box +function selectImage(project_id, studio_id, imageId, searchValue, imageUrl, series_id){ + selectImageId = imageId; + searchValue = searchValue.replace(/[^a-zA-Z0-9]/g,'%'); + + var url="image.cgi?search="+encodeURIComponent(searchValue)+'&project_id='+project_id+'&studio_id='+studio_id; + + if( (series_id!=null) && (series_id != '') ){ + url+='&series_id='+series_id; + } + + if(imageUrl!=null){ + var filename=imageUrl.split('%2F').pop(); + url+='&filename='+filename; + } + + var x=$(window).width() - windowOffsetX; + var y=$(window).height() - windowOffsetY; + console.log("selectImage(), load url="+url) + + $('#selectImage').remove(); + $('body').append('
'); + + $('#selectImage').load( + url, + function(){ + hideContent(); + + $('#selectImage').dialog({ + appendTo: "#content", + title:"select image", + width:x, + height:y, + close: function( event, ui ) { + showContent(); + $('.ui-dialog').remove(); + } + }); + updateImageEditor(filename); + } + ); + + return false; +} + + diff --git a/website/agenda/planung/pot/de/image.po b/website/agenda/planung/pot/de/image.po index d2f72d2..af12714 100644 --- a/website/agenda/planung/pot/de/image.po +++ b/website/agenda/planung/pot/de/image.po @@ -61,6 +61,12 @@ msgstr "Lizenz" msgid "label_public" msgstr "veröffentlicht" +msgid "label_file" +msgstr "Datei" + msgid "label_licence_missing" msgstr "bitte eintragen" +msgid "select_image" +msgstr "Dieses Bild zuweisen" + diff --git a/website/agenda/planung/pot/de/projects.po b/website/agenda/planung/pot/de/projects.po index 1834cab..a61a3fa 100644 --- a/website/agenda/planung/pot/de/projects.po +++ b/website/agenda/planung/pot/de/projects.po @@ -25,6 +25,9 @@ msgstr "Studio entfernen" msgid "button_edit" msgstr "Bearbeiten" +msgid "button_change" +msgstr "Ändern" + msgid "button_create" msgstr "Anlegen" @@ -44,7 +47,7 @@ msgid "label_assign_studio" msgstr "Studio hinzufügen" msgid "label_name" -msgstr "Name" +msgstr "ID" msgid "label_title" msgstr "Titel" diff --git a/website/agenda/planung/pot/de/studios.po b/website/agenda/planung/pot/de/studios.po index 0d01acc..52281d4 100644 --- a/website/agenda/planung/pot/de/studios.po +++ b/website/agenda/planung/pot/de/studios.po @@ -34,6 +34,9 @@ msgstr "Beschreibung" msgid "label_location" msgstr "ID" +msgid "label_image" +msgstr "Logo" + msgid "label_stream" msgstr "Stream-URL" diff --git a/website/agenda/planung/pot/en/image.po b/website/agenda/planung/pot/en/image.po index 8b7bec6..bd89390 100644 --- a/website/agenda/planung/pot/en/image.po +++ b/website/agenda/planung/pot/en/image.po @@ -61,6 +61,12 @@ msgstr "author" msgid "label_public" msgstr "published" +msgid "label_file" +msgstr "file" + msgid "label_licence_missing" msgstr "please fill in" +msgid "select_image" +msgstr "select this image" + diff --git a/website/agenda/planung/pot/en/projects.po b/website/agenda/planung/pot/en/projects.po index fc94679..ca3e788 100644 --- a/website/agenda/planung/pot/en/projects.po +++ b/website/agenda/planung/pot/en/projects.po @@ -43,8 +43,11 @@ msgstr "assign studio" msgid "button_edit" msgstr "edit" +msgid "button_change" +msgstr "change" + msgid "button_show_changes" -msgstr "changes" +msgstr "show changes" msgid "label_name" msgstr "name" diff --git a/website/agenda/planung/pot/en/studios.po b/website/agenda/planung/pot/en/studios.po index 510248a..278f28d 100644 --- a/website/agenda/planung/pot/en/studios.po +++ b/website/agenda/planung/pot/en/studios.po @@ -34,6 +34,9 @@ msgstr "description" msgid "label_location" msgstr "id" +msgid "label_image" +msgstr "image" + msgid "label_stream" msgstr "stream" diff --git a/website/agenda/planung/series.cgi b/website/agenda/planung/series.cgi index 2c06bf5..17a32b4 100755 --- a/website/agenda/planung/series.cgi +++ b/website/agenda/planung/series.cgi @@ -1091,6 +1091,7 @@ sub show_series { series_id => $serie->{series_id} } ); + uac::print_warn( "There is no user assigned, yet. Please assign a user!" ) if scalar @{$serie->{series_users}} ==0; #add events $serie->{events} = series::get_events( diff --git a/website/agenda/planung/studios.cgi b/website/agenda/planung/studios.cgi index 08a3f73..485d15a 100755 --- a/website/agenda/planung/studios.cgi +++ b/website/agenda/planung/studios.cgi @@ -222,7 +222,7 @@ sub check_params { } } - for my $param ( 'name', 'description', 'location', 'stream', 'google_calendar' ) { + for my $param ( 'name', 'description', 'location', 'stream', 'google_calendar', 'image' ) { if ( defined $params->{$param} ) { $checked->{$param} = $params->{$param}; } diff --git a/website/agenda/planung/templates/edit_event.html b/website/agenda/planung/templates/edit_event.html index 08ae95e..936e8d2 100644 --- a/website/agenda/planung/templates/edit_event.html +++ b/website/agenda/planung/templates/edit_event.html @@ -43,15 +43,22 @@ ); } }); + + $( "#edit_event input" ).prop( "disabled", true ); + $( "#edit_event textarea" ).prop( "disabled", true ); + $( "#edit_event select" ).prop( "disabled", true ); + + } ); + -
+
@@ -208,6 +215,7 @@ +
@@ -236,7 +244,7 @@
- +
@@ -490,6 +498,7 @@ +
@@ -524,6 +533,7 @@
+
diff --git a/website/agenda/planung/templates/edit_series.html b/website/agenda/planung/templates/edit_series.html index af3faab..6a6264f 100644 --- a/website/agenda/planung/templates/edit_series.html +++ b/website/agenda/planung/templates/edit_series.html @@ -138,7 +138,7 @@ > - +
diff --git a/website/agenda/planung/templates/image.html b/website/agenda/planung/templates/image.html index 8d2f117..666a67e 100644 --- a/website/agenda/planung/templates/image.html +++ b/website/agenda/planung/templates/image.html @@ -1,6 +1,21 @@ + + @@ -23,15 +38,16 @@ selectedImageTab = getSelectedTab('image-tabs'); - if(selectedImageTab=="upload"){ - initUploadDialog(); - $('#imageList').hide(); - return - }else{ - closeImageUpload(); - $('#imageList').show(); - } + if(selectedImageTab=="upload"){ + initUploadDialog(); + $('#imageList').hide(); + return; + } + + // show images by default + closeImageUpload(); + $('#imageList').show(); } }); // get initially selected tab @@ -45,41 +61,38 @@
- -
-
+ +
+
- - -
-
-
- - - -
-
-
-
- - - - -
-
-
-
- - + + +
+
+
+
+ + + + +
+
+
+
@@ -87,6 +100,7 @@
+
@@ -94,26 +108,28 @@
-
-
-
+
+ +
+ +
+ +
+
- - -
diff --git a/website/agenda/planung/templates/imageUpload.html b/website/agenda/planung/templates/imageUpload.html index 5051dc8..5ae2acf 100644 --- a/website/agenda/planung/templates/imageUpload.html +++ b/website/agenda/planung/templates/imageUpload.html @@ -30,6 +30,14 @@ Beschreibung: + + + + + + + + diff --git a/website/agenda/planung/templates/image_edit.html b/website/agenda/planung/templates/image_edit.html index a8727f3..ab0a747 100644 --- a/website/agenda/planung/templates/image_edit.html +++ b/website/agenda/planung/templates/image_edit.html @@ -1,9 +1,10 @@ - - - - - - + -
- - + +
+ +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/
checked="checked" value="1"value="0" />
- - - - - + - - - -
+ + - +
+
+ +
+
+ +
+
+ + + checked="checked" value="1"value="0" />
+ + + + + + + + + + +
+
+
+ : {{|}}
+ + +
+
diff --git a/website/agenda/planung/templates/projects.html b/website/agenda/planung/templates/projects.html index d0c878d..4d0c3d4 100644 --- a/website/agenda/planung/templates/projects.html +++ b/website/agenda/planung/templates/projects.html @@ -1,5 +1,7 @@ - - + + + + + +

@@ -12,7 +15,6 @@ - @@ -45,11 +47,11 @@
+ -
 
 
 
 
 
@@ -65,7 +67,17 @@ - + + + + + + + diff --git a/website/agenda/planung/templates/upload_audio_recordings.html b/website/agenda/planung/templates/upload_audio_recordings.html index ccda0bf..d31335c 100644 --- a/website/agenda/planung/templates/upload_audio_recordings.html +++ b/website/agenda/planung/templates/upload_audio_recordings.html @@ -58,6 +58,8 @@ action name + uploaded by + uploaded at size in bytes event duration in seconds audio duration in seconds @@ -65,13 +67,14 @@ RMS R processed mastered - uploaded by - uploaded at + modified at + + @@ -79,8 +82,7 @@ - - +
diff --git a/website/agenda/upload_playout.cgi b/website/agenda/upload_playout.cgi index 556104e..de6b2c7 100755 --- a/website/agenda/upload_playout.cgi +++ b/website/agenda/upload_playout.cgi @@ -49,7 +49,7 @@ if ( $0 =~ /upload_playout.*?\.cgi$/ ) { #print Dumper($content)."\n"; #print Dumper($r); #print Dumper($json); - print "result:" . Dumper($result); + print "upload playout result:" . Dumper($result); } 1;