diff options
-rw-r--r-- | doc/Hubzilla_on_OpenShift.bb | 2 | ||||
-rw-r--r-- | include/datetime.php | 4 | ||||
-rw-r--r-- | include/text.php | 51 | ||||
-rwxr-xr-x | mod/events.php | 59 | ||||
-rw-r--r-- | version.inc | 4 | ||||
-rw-r--r-- | view/css/mod_events.css | 6 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 73 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 25 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 22 |
9 files changed, 245 insertions, 1 deletions
diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index 9b2c539dc..9ccd66284 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -8,7 +8,7 @@ Create an account on OpenShift, then use the registration e-mail and password to [code]rhc app-create your_app_name php-5.4 mysql-5.5 cron phpmyadmin --namespace your_domain --from-code https://github.com/redmatrix/hubzilla.git -l your@email.address -p your_account_password [/code] -Make a note of the database username and password OpenShift creates for your instance, and use these at [url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. +Make a note of the database username and password OpenShift creates for your instance, and use these at [url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. You MUST change server address from 127.0.0.1 to localhost. NOTE: PostgreSQL is NOT supported by the deploy script yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. diff --git a/include/datetime.php b/include/datetime.php index 1d10e7ad7..952151a00 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -235,7 +235,11 @@ function datetimesel($format, $min, $max, $default, $label, $id = 'datetimepicke $o .= replace_macros($tpl,array( '$field' => array($id, $label, $input_text, (($required) ? t('Required') : ''), (($required) ? '*' : ''), 'placeholder="' . $readable_format . '"'), )); +<<<<<<< HEAD + $o .= "<script>\$(function () {var picker = \$('#id_$id').datetimepicker({step:5,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>"; +======= $o .= "<script>\$(function () {var picker = \$('#id_$id').datetimepicker({step:15,format:'$dateformat' $minjs $maxjs $pickers $defaultdatejs,dayOfWeekStart:$first_day}); $extra_js})</script>"; +>>>>>>> upstream/master return $o; } diff --git a/include/text.php b/include/text.php index 4777e7a61..99c73ebee 100644 --- a/include/text.php +++ b/include/text.php @@ -1444,11 +1444,62 @@ function prepare_body(&$item,$attach = false) { } } +<<<<<<< HEAD + $event = array(); + $is_event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? true : false); + + if($is_event) { + $object = json_decode($item['object'],true); + + //ensure compatibility with older items + if(array_key_exists('description', $object)) { + + $bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM + + $event['header'] = '<div class="event-title"><h3><i class="icon-calendar"></i> ' . bbcode($object['title']) . '</h3></div>' . "\r\n"; + + $event['header'] .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span> <span class="dtstart" title="' + . datetime_convert('UTC', 'UTC', $object['start'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) + . '" >' + . (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + $object['start'] , $bd_format )) + : day_translate(datetime_convert('UTC', 'UTC', + $object['start'] , $bd_format))) + . '</span></div>' . "\r\n"; + + if(! $object['nofinish']) + $event['header'] .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span> <span class="dtend" title="' + . datetime_convert('UTC','UTC',$object['finish'], (($object['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' )) + . '" >' + . (($object['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(), + $object['finish'] , $bd_format )) + : day_translate(datetime_convert('UTC', 'UTC', + $object['finish'] , $bd_format ))) + . '</span></div>' . "\r\n"; + + + $event['content'] = '<div class="event-description">' . bbcode($object['description']) . '</div>' . "\r\n"; + + if(strlen($object['location'])) + $event['content'] .= '<div class="event-location"><span class="event-label"> ' . t('Location:') . '</span> <span class="location">' + . bbcode($object['location']) + . '</span></div>' . "\r\n"; + } + else { + $is_event = false; + } + } + + $prep_arr = array( + 'item' => $item, + 'html' => $is_event ? $event['content'] : $s, +======= $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event($item['object']) : false); $prep_arr = array( 'item' => $item, 'html' => $event ? $event['content'] : $s, +>>>>>>> upstream/master 'event' => $event['header'], 'photo' => $photo ); diff --git a/mod/events.php b/mod/events.php index 080c39911..a61da5f3e 100755 --- a/mod/events.php +++ b/mod/events.php @@ -90,7 +90,11 @@ function events_post(&$a) { linkify_tags($a, $desc, local_channel()); linkify_tags($a, $location, local_channel()); +<<<<<<< HEAD + $action = ($event_hash == '') ? 'new' : "event/" . $event_hash; +======= //$action = ($event_hash == '') ? 'new' : "event/" . $event_hash; +>>>>>>> upstream/master //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"; @@ -322,6 +326,7 @@ function events_content(&$a) { } if($mode == 'view') { +<<<<<<< HEAD /* edit/create form */ if($event_id) { @@ -339,6 +344,25 @@ function events_content(&$a) { if(!x($orig_event)) $orig_event = array(); +======= + + /* edit/create form */ + if($event_id) { + $r = q("SELECT * FROM `event` WHERE event_hash = '%s' AND `uid` = %d LIMIT 1", + dbesc($event_id), + intval(local_channel()) + ); + if(count($r)) + $orig_event = $r[0]; + } + + $channel = $a->get_channel(); + + // Passed parameters overrides anything found in the DB + if(!x($orig_event)) + $orig_event = array(); + +>>>>>>> upstream/master // In case of an error the browser is redirected back here, with these parameters filled in with the previous values /* if(x($_REQUEST,'nofinish')) $orig_event['nofinish'] = $_REQUEST['nofinish']; @@ -376,24 +400,55 @@ function events_content(&$a) { if(x($orig_event)) $tz = (($orig_event['adjust']) ? date_default_timezone_get() : 'UTC'); +<<<<<<< HEAD +// $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'); + +======= $syear = datetime_convert('UTC', $tz, $sdt, 'Y'); $smonth = datetime_convert('UTC', $tz, $sdt, 'm'); $sday = datetime_convert('UTC', $tz, $sdt, 'd'); +>>>>>>> upstream/master $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"; +<<<<<<< HEAD +// $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'); + +======= $fyear = datetime_convert('UTC', $tz, $fdt, 'Y'); $fmonth = datetime_convert('UTC', $tz, $fdt, 'm'); $fday = datetime_convert('UTC', $tz, $fdt, 'd'); +>>>>>>> upstream/master $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"; +<<<<<<< HEAD +======= +>>>>>>> upstream/master $type = ((x($orig_event)) ? $orig_event['type'] : 'event'); $f = get_config('system','event_input_format'); @@ -593,7 +648,11 @@ function events_content(&$a) { $last_date = $d; +<<<<<<< HEAD + $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); +>>>>>>> upstream/master $drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'',''); diff --git a/version.inc b/version.inc index 7e47edd58..30d5c870f 100644 --- a/version.inc +++ b/version.inc @@ -1 +1,5 @@ +<<<<<<< HEAD +2015-11-25.1227 +======= 2015-11-27.1229 +>>>>>>> upstream/master diff --git a/view/css/mod_events.css b/view/css/mod_events.css index dc1dc902f..3e6ee63ac 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -4,6 +4,8 @@ margin-bottom: -1px; } +<<<<<<< HEAD +======= .fc-unthemed th, .fc-unthemed td, .fc-unthemed thead, @@ -19,10 +21,13 @@ margin-bottom: -9px; } +>>>>>>> upstream/master .bootstrap-tagsinput { width: 100%; padding: 6px 12px; } +<<<<<<< HEAD +======= .event-wrapper { max-width: 700px; @@ -50,3 +55,4 @@ #event-upload-choose { width: 100%; } +>>>>>>> upstream/master diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index e392f00d9..11e56cfc2 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -848,6 +848,71 @@ nav .acpopup { cursor: pointer; } +<<<<<<< HEAD +.fc-unthemed th, +.fc-unthemed td, +.fc-unthemed thead, +.fc-unthemed tbody, +.fc-unthemed .fc-divider, +.fc-unthemed .fc-row, +.fc-unthemed .fc-popover { + border-color: #ccc !important; +} + +.wall-event-item { + padding: 10px; + color: #fff; + background-color: #3A87AD; /* should reflect calendar color */ + border-top-left-radius: $radiuspx; + border-top-right-radius: $radiuspx; +} + +.vevent .event-end { + padding-bottom: 10px; +} + +#event-summary-text { + margin-top: 15px; +} + + +#new-event-link { + margin-bottom: 10px; +} + +.edit-event-link, .plink-event-link, .drop-event-link { + float: left; + margin-top: 4px; + margin-right: 4px; + margin-bottom: 15px; +} + +.event-owner img { + padding-bottom: 10px; + padding-right: 10px; +} + +.event-buttons { + margin-top: 10px; +} + +.event-list-date { + margin-bottom: 10px; +} + +.prevcal, .nextcal { + float: left; + margin-left: 32px; + margin-right: 32px; + margin-top: 64px; +} +.event-calendar-end { + clear: both; +} + + +======= +>>>>>>> upstream/master #cboxOverlay { z-index: 1050; } @@ -2195,3 +2260,11 @@ nav .badge.mail-update:hover { .help-searchlist a { font-size: 130%; } +<<<<<<< HEAD + +.response-list ul { + list-style-type: none; +} + +======= +>>>>>>> upstream/master diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index dc98d14b3..496a07782 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -58,8 +58,11 @@ $('#events-spinner').spin('tiny'); $('#events-spinner > i').css('color', 'transparent'); if(!isLoading) { +<<<<<<< HEAD +======= $('#events-spinner').spin(false); $('#events-spinner > i').css('color', ''); +>>>>>>> upstream/master $('td.fc-day').dblclick(function() { openMenu('form'); //window.location.href='/events/new?start='+$(this).data('date'); @@ -75,7 +78,11 @@ switch(view.name){ case "month": element.find(".fc-title").html( +<<<<<<< HEAD + "<img src='{0}' style='height:10px;width:10px'> {1}: {2}".format( +======= "<img src='{0}' style='height:12px;width:12px;' title='{1}'> <span title='{3}{4}'>{2}</span>".format( +>>>>>>> upstream/master event.item['author']['xchan_photo_s'], event.item['author']['xchan_name'], event.title, @@ -85,22 +92,40 @@ break; case "agendaWeek": element.find(".fc-title").html( +<<<<<<< HEAD + "<img src='{0}' style='height:10px; width:10px'> {1}: {2}<p>{3}</p><p>{4}</p>".format( + event.item['author']['xchan_photo_s'], + event.item['author']['xchan_name'], + event.title, + event.item.description, + event.item.location +======= "<img src='{0}' style='height:12px;width:12px;'> {1}: <span title='{3}{4}'>{2}</span>".format( event.item['author']['xchan_photo_s'], event.item['author']['xchan_name'], event.title, event.item.description ? event.item.description + "\r\n\r\n" : '', event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : '' +>>>>>>> upstream/master )); break; case "agendaDay": element.find(".fc-title").html( +<<<<<<< HEAD + "<img src='{0}' style='height:10px;width:10px'> {1}: {2}<p>{3}</p><p>{4}</p>".format( + event.item['author']['xchan_photo_s'], + event.item['author']['xchan_name'], + event.title, + event.item.description, + event.item.location +======= "<img src='{0}' style='height:12px;width:12px;'> {1}: <span title='{3}{4}'>{2}</span>".format( event.item['author']['xchan_photo_s'], event.item['author']['xchan_name'], event.title, event.item.description ? event.item.description + "\r\n\r\n" : '', event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : '' +>>>>>>> upstream/master )); break; } diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index 08c8aa64a..cef7b45cc 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,7 +1,13 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <div class="pull-right"> +<<<<<<< HEAD + <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> + +======= + <button class="btn btn-success btn-xs" onclick="openClose('form'); closeMenu('event-tools');">{{$new_event.1}}</button> +>>>>>>> upstream/master <div class="btn-group"> <button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="icon-backward"></i></button> <button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button> @@ -13,6 +19,22 @@ </div> <div id="form" class="section-content-tools-wrapper"{{if !$expandform}} style="display:none;"{{/if}}> {{$form}} +<<<<<<< HEAD + </div> + <div id="event-tools" class="section-content-tools-wrapper" style="display:none;"> + <div class="form-group"> + <button class="btn btn-primary btn-xs" onclick="exportDate(); return false;"><i class="icon-download"></i> {{$export.1}}</button> + <button class="btn btn-primary btn-xs" onclick="openClose('event-upload-form');"><i class="icon-upload"></i> {{$upload}}</button> + </div> + <div id="event-upload-form" style="display:none;"> + <form action="events" enctype="multipart/form-data" method="post" name="event-upload-form" id="event-upload-form"> + <button id="dbtn-submit" class="btn btn-primary btn-sm pull-right" type="submit" name="submit" >{{$submit}}</button> + <input id="event-upload-choose" type="file" name="userfile" /> + + </form> + </div> +======= +>>>>>>> upstream/master </div> <div class="clear"></div> <div class="section-content-wrapper-np"> |