diff options
-rwxr-xr-x | mod/events.php | 21 | ||||
-rw-r--r-- | view/css/mod_events.css | 5 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 3 |
4 files changed, 14 insertions, 19 deletions
diff --git a/mod/events.php b/mod/events.php index 64d7dfb93..080c39911 100755 --- a/mod/events.php +++ b/mod/events.php @@ -90,7 +90,7 @@ function events_post(&$a) { linkify_tags($a, $desc, local_channel()); linkify_tags($a, $location, local_channel()); - $action = ($event_hash == '') ? 'new' : "event/" . $event_hash; + //$action = ($event_hash == '') ? 'new' : "event/" . $event_hash; //fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location) //$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type"; @@ -376,39 +376,24 @@ function events_content(&$a) { if(x($orig_event)) $tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC'); -// $syear = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'Y') : '0000'); -// $smonth = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'm') : '00'); -// $sday = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'd') : '00'); - $syear = datetime_convert('UTC', $tz, $sdt, 'Y'); $smonth = datetime_convert('UTC', $tz, $sdt, 'm'); $sday = datetime_convert('UTC', $tz, $sdt, 'd'); - -// $shour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'H') : '00'); -// $sminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $sdt, 'i') : '00'); - $shour = datetime_convert('UTC', $tz, $sdt, 'H'); $sminute = datetime_convert('UTC', $tz, $sdt, 'i'); $stext = datetime_convert('UTC',$tz,$sdt); $stext = substr($stext,0,14) . "00:00"; -// $fyear = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'Y') : '0000'); -// $fmonth = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'm') : '00'); -// $fday = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'd') : '00'); - $fyear = datetime_convert('UTC', $tz, $fdt, 'Y'); $fmonth = datetime_convert('UTC', $tz, $fdt, 'm'); $fday = datetime_convert('UTC', $tz, $fdt, 'd'); - -// $fhour = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'H') : '00'); -// $fminute = ((x($orig_event)) ? datetime_convert('UTC', $tz, $fdt, 'i') : '00'); - $fhour = datetime_convert('UTC', $tz, $fdt, 'H'); $fminute = datetime_convert('UTC', $tz, $fdt, 'i'); $ftext = datetime_convert('UTC',$tz,$fdt); $ftext = substr($ftext,0,14) . "00:00"; + $type = ((x($orig_event)) ? $orig_event['type'] : 'event'); $f = get_config('system','event_input_format'); @@ -608,7 +593,7 @@ function events_content(&$a) { $last_date = $d; - $edit = array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'',''); + $edit = ((local_channel() && $rr['author_xchan'] == get_observer_hash()) ? array($a->get_baseurl().'/events/'.$rr['event_hash'].'?expandform=1',t('Edit event'),'','') : false); $drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 5e0fc2bce..9644a5593 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -4,6 +4,11 @@ margin-bottom: -1px; } +#events-spinner .spinner { + margin-top: 9px; + margin-bottom: -9px; +} + .bootstrap-tagsinput { width: 100%; padding: 6px 12px; diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index 6a38057fd..dc98d14b3 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -55,7 +55,11 @@ showEvent(calEvent.id); }, loading: function(isLoading, view) { + $('#events-spinner').spin('tiny'); + $('#events-spinner > i').css('color', 'transparent'); if(!isLoading) { + $('#events-spinner').spin(false); + $('#events-spinner > i').css('color', ''); $('td.fc-day').dblclick(function() { openMenu('form'); //window.location.href='/events/new?start='+$(this).data('date'); diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index b2de90da1..2b6170ff4 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,12 +1,13 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="pull-right"> + <button class="btn btn-default btn-xs" onclick="openClose('event-tools'); closeMenu('form');"><i class="icon-cog"></i></button> <button class="btn btn-success btn-xs" onclick="openClose('form'); closeMenu('event-tools');">{{$new_event.1}}</button> <div class="btn-group"> <button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="icon-backward"></i></button> - <button class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button> + <button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button> <button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="icon-forward"></i></button> </div> </div> |