diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/bootstrap-red.css | 3 | ||||
-rw-r--r-- | view/css/conversation.css | 35 | ||||
-rw-r--r-- | view/css/mod_events.css | 34 | ||||
-rw-r--r-- | view/css/widgets.css | 9 | ||||
-rw-r--r-- | view/en/htconfig.tpl | 2 | ||||
-rw-r--r-- | view/js/autocomplete.js | 2 | ||||
-rw-r--r-- | view/pdl/mod_events.pdl | 1 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 112 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 7 | ||||
-rwxr-xr-x | view/tpl/conv_list.tpl | 5 | ||||
-rwxr-xr-x | view/tpl/event.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 48 | ||||
-rw-r--r-- | view/tpl/event_item_content.tpl | 10 | ||||
-rwxr-xr-x | view/tpl/event_item_header.tpl | 11 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 17 | ||||
-rwxr-xr-x | view/tpl/events_menu_side.tpl (renamed from view/tpl/events_side.tpl) | 0 | ||||
-rwxr-xr-x | view/tpl/events_tools_side.tpl | 15 | ||||
-rwxr-xr-x | view/tpl/js_strings.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/search_item.tpl | 5 | ||||
-rwxr-xr-x | view/tpl/settings.tpl | 2 |
20 files changed, 182 insertions, 139 deletions
diff --git a/view/css/bootstrap-red.css b/view/css/bootstrap-red.css index 19796679a..29164c7ad 100644 --- a/view/css/bootstrap-red.css +++ b/view/css/bootstrap-red.css @@ -57,7 +57,8 @@ nav .navbar-toggle { /* nav overrides end */ -aside .nav-pills > li > a { +aside .nav-pills > li > a, +.response-list .nav-pills > li > a { padding: 6px 10px; } diff --git a/view/css/conversation.css b/view/css/conversation.css index 08b51d2fa..d49359f46 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -245,3 +245,38 @@ a.wall-item-name-link { color: #FF0000; font-size: 1em !important; } + +/* event item */ + +.event-item-title h3 { + margin: 0px 0px 10px 0px; + font-weight: bold; +} + +.event-item-description { + padding-bottom: 10px; +} + +.event-item-label { + font-weight: bold; +} + +/* vevent */ + +.event-title h3 { + margin: 0px 0px 10px 0px; + font-weight: bold; +} + +.vevent { + padding-top: 10px; +} + +.event-description { + padding-top: 10px; + padding-bottom: 10px; +} + +.event-label { + font-weight: bold; +} diff --git a/view/css/mod_events.css b/view/css/mod_events.css index 00dcc40f8..e72464539 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -4,7 +4,41 @@ margin-bottom: -1px; } +.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; +} + +#events-spinner .spinner { + margin-top: 9px; + margin-bottom: -9px; +} + .bootstrap-tagsinput { width: 100%; padding: 6px 12px; } + +.event-wrapper, +.vevent { + max-width: 700px; +} + +.event-owner { + padding: 10px; +} + +.event-owner img { + margin-right: 5px; +} + +.vevent, +.event-buttons { + padding: 10px; +} + diff --git a/view/css/widgets.css b/view/css/widgets.css index eb771cc06..f1c1436c7 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -124,3 +124,12 @@ li:hover .group-edit-icon { width: 250px; } +/* events tools */ + +#event-upload-form { + margin-top: 10px; +} + +#event-upload-choose { + width: 100%; +} diff --git a/view/en/htconfig.tpl b/view/en/htconfig.tpl index c6357b3a7..17ee7bfeb 100644 --- a/view/en/htconfig.tpl +++ b/view/en/htconfig.tpl @@ -81,7 +81,7 @@ $a->config['system']['php_path'] = '{{$phpath}}'; // Configure how we communicate with directory servers. // DIRECTORY_MODE_NORMAL = directory client, we will find a directory // DIRECTORY_MODE_SECONDARY = caching directory or mirror -// DIRECTORY_MODE_PRIMARY = main directory server +// DIRECTORY_MODE_PRIMARY = master directory server - one per realm // DIRECTORY_MODE_STANDALONE = "off the grid" or private directory services $a->config['system']['directory_mode'] = DIRECTORY_MODE_NORMAL; diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 0af27c61b..511a7f815 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -60,7 +60,7 @@ function contact_format(item) { var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick); if(typeof desc === 'undefined') desc = ''; if(desc) desc = ' ('+desc+')'; - return "<div class='{0}' title='{4}'><img src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span><div class='clear'></div></div>".format(item.taggable, item.photo, item.name, desc, item.link); + return "<div class='{0}' title='{4}'><img class='dropdown-menu-img-sm' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span><div class='clear'></div></div>".format(item.taggable, item.photo, item.name, desc, item.link); } else return "<div>" + item.text + "</div>"; diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl index 5a71d88d9..a3bc0c019 100644 --- a/view/pdl/mod_events.pdl +++ b/view/pdl/mod_events.pdl @@ -1,4 +1,5 @@ [region=aside] [widget=eventsmenu][/widget] +[widget=eventstools][/widget] [widget=tasklist][/widget] [/region] diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 959550dbd..e392f00d9 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -241,7 +241,8 @@ footer { padding-right: 3em; } -.birthday-today, .event-today { +.birthday-today, +.event-today { font-weight: bold; } @@ -847,103 +848,6 @@ nav .acpopup { cursor: pointer; } -.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; -} - -.eventcal { - float: left; - font-size: 20px; -} - -#event-summary-text { - margin-top: 15px; -} - -.event-wrapper { - width: 400px; - height: auto; - padding: 10px; -} - -.vevent { - max-width: 100%; - margin: 10px; - padding: 10px; - border: 1px solid #CCCCCC; -} - -.vevent .event-summary { - margin: 10px; - font-weight: bold; -} - -.vevent .event-description, .vevent .event-location { - margin-left: 10px; - margin-right: 10px; -} -.vevent .event-start { - margin-left: 10px; - margin-right: 10px; -} - -#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-description:before { - content: url('../../../../images/calendar.png'); - margin-right: 15px; -} - -.event-start, .event-end { - margin-left: 10px; - width: 300px; - clear: both; -} - -.event-owner img { - padding: 10px; -} - -.event-buttons { - margin-top: 10px; - margin-left: 10px; -} - -.event-start .dtstart, .event-end .dtend { - float: right; - margin-right: 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; -} - - #cboxOverlay { z-index: 1050; } @@ -1597,8 +1501,12 @@ img.mail-conv-sender-photo { padding: 0.5em 10px; } -.wall-photo-item { - /*padding: 0.5em 10px;*/ +.wall-event-item { + padding: 10px; + color: #fff; + background-color: #3A87AD; /* should reflect calendar color */ + border-top-left-radius: $radiuspx; + border-top-right-radius: $radiuspx; } .wall-photo-item img { @@ -2287,7 +2195,3 @@ nav .badge.mail-update:hover { .help-searchlist a { font-size: 130%; } - -.response-list ul { - list-style-type: none; -} diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 5257b3ed6..08f0d4fbe 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -13,6 +13,11 @@ {{$item.photo}} </div> {{/if}} + {{if $item.event}} + <div class="wall-event-item" id="wall-event-item-{{$item.id}}"> + {{$item.event}} + </div> + {{/if}} <div class="wall-item-head"> <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}"> @@ -178,7 +183,7 @@ <h4 class="modal-title">{{$response.title}}</h4> </div> <div class="modal-body response-list"> - <ul>{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul> + <ul class="nav nav-pills nav-stacked">{{foreach $response.list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul> </div> <div class="modal-footer clear"> <button type="button" class="btn btn-default" data-dismiss="modal">{{$item.modal_dismiss}}</button> diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index 53f65bc78..cf1310ea6 100755 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -13,6 +13,11 @@ {{$item.photo}} </div> {{/if}} + {{if $item.event}} + <div class="wall-event-item" id="wall-event-item-{{$item.id}}"> + {{$item.event}} + </div> + {{/if}} <div class="wall-item-head"> <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}"> diff --git a/view/tpl/event.tpl b/view/tpl/event.tpl index c1793c3e7..3fc2063ef 100755 --- a/view/tpl/event.tpl +++ b/view/tpl/event.tpl @@ -2,7 +2,7 @@ <div class="event-wrapper"> <div class="event"> <div class="event-owner"> - {{if $event.item.author.xchan_name}}<a href="{{$event.item.author.xchan_url}}" ><img src="{{$event.item.author.xchan_photo_s}}" height="64" width="64" />{{$event.item.author.xchan_name}}</a>{{/if}} + {{if $event.item.author.xchan_name}}<a href="{{$event.item.author.xchan_url}}" ><img src="{{$event.item.author.xchan_photo_s}}">{{$event.item.author.xchan_name}}</a>{{/if}} </div> {{$event.html}} <div class="event-buttons"> diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index d193696b7..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'); @@ -64,40 +68,45 @@ }, eventRender: function(event, element, view) { + //console.log(view.name); if (event.item['author']['xchan_name']==null) return; switch(view.name){ case "month": - element.find(".fc-event-title").html( - "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format( + element.find(".fc-title").html( + "<img src='{0}' style='height:12px;width:12px;' title='{1}'> <span title='{3}{4}'>{2}</span>".format( event.item['author']['xchan_photo_s'], event.item['author']['xchan_name'], - event.title + event.title, + event.item.description ? event.item.description + "\r\n\r\n" : '', + event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : '' )); break; case "agendaWeek": - element.find(".fc-event-title").html( - "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format( + element.find(".fc-title").html( + "<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.item.desc, - event.item.location + event.title, + event.item.description ? event.item.description + "\r\n\r\n" : '', + event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : '' )); break; case "agendaDay": - element.find(".fc-event-title").html( - "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format( + element.find(".fc-title").html( + "<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.item.desc, - event.item.location + event.title, + event.item.description ? event.item.description + "\r\n\r\n" : '', + event.item.location ? aStr['location'] + ': ' + event.item.location.replace(/(<([^>]+)>)/ig,"") : '' )); break; } } - }) + }); // center on date var args=location.href.replace(baseurl,"").split("/"); @@ -113,6 +122,20 @@ var view = $('#events-calendar').fullCalendar('getView'); $('#title').text(view.title); + // shift the finish time date on start time date change automagically + var origsval = $('#id_start_text').val(); + $('#id_start_text').change(function() { + var origfval = $('#id_finish_text').val(); + if(origfval) { + var sval = $('#id_start_text').val(); + var diff = moment(sval).diff(origsval); + var fval = moment(origfval).add(diff, 'millisecond').format("YYYY-MM-DD HH:mm"); + $('#id_finish_text').val(fval); + origsval = sval; + } + }); + + // ACL $('#id_share').change(function() { if ($('#id_share').is(':checked')) { @@ -123,7 +146,6 @@ } }).trigger('change'); - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { diff --git a/view/tpl/event_item_content.tpl b/view/tpl/event_item_content.tpl new file mode 100644 index 000000000..76e0f4616 --- /dev/null +++ b/view/tpl/event_item_content.tpl @@ -0,0 +1,10 @@ +{{if $description}} +<div class="event-item-description"> + {{$description}} +</div> +{{/if}} +{{if $location}} +<div class="event-item-location"> + <span class="event-item-label">{{$location_label}}</span> <span class="event-item-location">{{$location}}</span> +</div> +{{/if}} diff --git a/view/tpl/event_item_header.tpl b/view/tpl/event_item_header.tpl new file mode 100755 index 000000000..9547676e9 --- /dev/null +++ b/view/tpl/event_item_header.tpl @@ -0,0 +1,11 @@ +<div class="event-item-title"> + <h3><i class="icon-calendar"></i> {{$title}}</h3> +</div> +<div class="event-item-start"> + <span class="event-item-label">{{$dtstart_label}}</span> <span class="dtstart" title="{{$dtstart_title}}">{{$dtstart_dt}}</span> +</div> +{{if $finish}} +<div class="event-item-start"> + <span class="event-item-label">{{$dtend_label}}</span> <span class="dtend" title="{{$dtend_title}}">{{$dtend_dt}}</span> +</div> +{{/if}} diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index b2de90da1..08c8aa64a 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,12 +1,10 @@ <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> @@ -16,19 +14,6 @@ <div id="form" class="section-content-tools-wrapper"{{if !$expandform}} style="display:none;"{{/if}}> {{$form}} </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> - </div> <div class="clear"></div> <div class="section-content-wrapper-np"> <div id="events-calendar"></div> diff --git a/view/tpl/events_side.tpl b/view/tpl/events_menu_side.tpl index b9a9062b1..b9a9062b1 100755 --- a/view/tpl/events_side.tpl +++ b/view/tpl/events_menu_side.tpl diff --git a/view/tpl/events_tools_side.tpl b/view/tpl/events_tools_side.tpl new file mode 100755 index 000000000..5e20511fc --- /dev/null +++ b/view/tpl/events_tools_side.tpl @@ -0,0 +1,15 @@ +<div class="widget"> + <h3>{{$title}}</h3> + <ul class="nav nav-pills nav-stacked"> + <li><a href="#" onclick="exportDate(); return false;"><i class="icon-download"></i> {{$export}}</a></li> + <li><a href="#" onclick="openClose('event-upload-form'); return false;"><i class="icon-upload"></i> {{$import}}</a></li> + </ul> + <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"> + <div class="form-group"> + <input id="event-upload-choose" type="file" name="userfile" /> + </div> + <button id="dbtn-submit" class="btn btn-primary btn-xs" type="submit" name="submit" >{{$submit}}</button> + </form> + </div> +</div> diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index 38cf8edbd..4243c2ea5 100755 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -22,6 +22,7 @@ 'submit' : "{{$submit}}", 'linkurl' : "{{$linkurl}}", 'leavethispage' : "{{$leavethispage}}", + 'location' : "{{$location}}", 't01' : "{{$t01}}", 't02' : "{{$t02}}", diff --git a/view/tpl/search_item.tpl b/view/tpl/search_item.tpl index b44e1c39e..b2689c7ba 100755 --- a/view/tpl/search_item.tpl +++ b/view/tpl/search_item.tpl @@ -7,6 +7,11 @@ {{$item.photo}} </div> {{/if}} + {{if $item.event}} + <div class="wall-event-item" id="wall-event-item-{{$item.id}}"> + {{$item.event}} + </div> + {{/if}} <div class="wall-item-head"> <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}}" id="wall-item-photo-wrapper-{{$item.id}}"> diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 2c71c64fb..af5f222fe 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -159,12 +159,12 @@ {{/foreach}} </select> </div> + {{/if}} {{include file="field_checkbox.tpl" field=$cal_first_day}} <div class="settings-submit-wrapper" > <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> </div> </div> - {{/if}} </div> </div> </div> |