diff options
Diffstat (limited to 'view/tpl')
-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 |
12 files changed, 91 insertions, 32 deletions
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> |