diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-11-24 14:15:28 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-11-24 14:15:28 +0100 |
commit | 987619130b99bf4548d5d31ac453cdf48c818eff (patch) | |
tree | c9a00e4dbea487a93725d539c04d78fa1cadd38f /view/tpl | |
parent | e485ecb3b453a50a1974992b5ccf5122e154a5dc (diff) | |
download | volse-hubzilla-987619130b99bf4548d5d31ac453cdf48c818eff.tar.gz volse-hubzilla-987619130b99bf4548d5d31ac453cdf48c818eff.tar.bz2 volse-hubzilla-987619130b99bf4548d5d31ac453cdf48c818eff.zip |
some event heavy lifting - please test and report issues
Diffstat (limited to 'view/tpl')
-rwxr-xr-x | view/tpl/event.tpl | 24 | ||||
-rwxr-xr-x | view/tpl/event_form.tpl | 291 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 13 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 7 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 10 |
5 files changed, 146 insertions, 199 deletions
diff --git a/view/tpl/event.tpl b/view/tpl/event.tpl index 5dfc91ebe..c1793c3e7 100755 --- a/view/tpl/event.tpl +++ b/view/tpl/event.tpl @@ -1,16 +1,16 @@ {{foreach $events as $event}} <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}} - </div> - {{$event.html}} - <div class="event-buttons"> - {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" class="plink-event-link"><i class="icon-external-link btn btn-default" ></i></a>{{/if}} - {{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link"><i class="icon-pencil btn btn-default"></i></a>{{/if}} - {{if $event.drop}}<a href="{{$event.drop.0}}" title="{{$event.drop.1}}" class="drop-event-link"><i class="icon-trash btn btn-default"></i></a>{{/if}} - </div> - </div> - <div class="clear"></div> + <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}} + </div> + {{$event.html}} + <div class="event-buttons"> + {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" class="plink-event-link"><i class="icon-external-link btn btn-default" ></i></a>{{/if}} + {{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link"><i class="icon-pencil btn btn-default"></i></a>{{/if}} + {{if $event.drop}}<a href="{{$event.drop.0}}" title="{{$event.drop.1}}" class="drop-event-link"><i class="icon-trash btn btn-default"></i></a>{{/if}} + </div> + <div class="clear"></div> + </div> </div> {{/foreach}} diff --git a/view/tpl/event_form.tpl b/view/tpl/event_form.tpl index 15505397b..e74aabc68 100755 --- a/view/tpl/event_form.tpl +++ b/view/tpl/event_form.tpl @@ -1,177 +1,130 @@ -<div class="generic-content-wrapper-styled"> - -<h3>{{$title}}</h3> - -<p> -{{$desc}} -</p> - <form id="event-edit-form" action="{{$post}}" method="post" > -<input type="hidden" name="event_id" value="{{$eid}}" /> -<input type="hidden" name="event_hash" value="{{$event_hash}}" /> -<input type="hidden" name="xchan" value="{{$xchan}}" /> -<input type="hidden" name="mid" value="{{$mid}}" /> -<input type="hidden" name="type" value="{{$type}}" /> -<input type="hidden" name="preview" id="event-edit-preview" value="0" /> - -<div id="event-summary-text">{{$t_text}}</div> -<input type="text" id="event-summary" name="summary" value="{{$t_orig}}" />{{$required}} - -<div class="clear"></div> - -<div id="event-start-text">{{$s_text}}</div> - -{{$s_dsel}} - -<div class="clear"></div><br /> - - <div class='field checkbox'> - <label class="mainlabel" for='id_nofinish'>{{$n_text}}</label> - <div class="pull-right"><input type="checkbox" name='nofinish' id='id_nofinish' value="1" {{$n_checked}} onclick="showHideFinishDate(); return true;" > - <label class="switchlabel" for='id_nofinish'> <span class="onoffswitch-inner" data-on='' data-off='' ></span> - <span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span> - </div> - -<div id="event-nofinish-break"></div> - -<div id="event-finish-wrapper"> -<div id="event-finish-text">{{$f_text}}</div> -{{$f_dsel}} -</div> - -<div id="event-datetime-break"></div> - -{{include file="field_checkbox.tpl" field=$adjust}} - -<div id="event-adjust-break"></div> - - - -{{if $catsenabled}} -<div id="event-category-wrap"> - <input name="category" id="event-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="event-cats" style="display: block;" data-role="cat-tagsinput" /> -</div> -{{/if}} - - - -<div id="event-desc-text">{{$d_text}}</div> - -<textarea id="comment-edit-text-desc" class="comment-edit-text-full" name="desc" >{{$d_orig}}</textarea> -<div class="clear"></div> -<div id="comment-tools-desc" class="comment-tools" style="display: block;" > - <div id="comment-edit-bb-desc" class="btn-toolbar pull-left"> - <div class='btn-group'> - <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', 'desc'); return false;"> - <i class="icon-bold comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', 'desc'); return false;"> - <i class="icon-italic comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', 'desc'); return false;"> - <i class="icon-underline comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote','desc'); return false;"> - <i class="icon-quote-left comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', 'desc'); return false;"> - <i class="icon-terminal comment-icon"></i> - </button> - </div> - - <div class='btn-group'> - <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', 'desc'); return false;"> - <i class="icon-camera comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', 'desc'); return false;"> - <i class="icon-link comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', 'desc'); return false;"> - <i class="icon-facetime-video comment-icon"></i> - </button> - </div> - - </div> -</div> - -<div class="clear"></div> - -<div id="event-location-text">{{$l_text}}</div> - -<textarea id="comment-edit-text-loc" class="comment-edit-text-full" name="location">{{$l_orig}}</textarea> - -<div class="clear"></div> -<div id="comment-tools-loc" class="comment-tools" style="display: block;" > - <div id="comment-edit-bb-loc" class="btn-toolbar pull-left"> - <div class='btn-group'> - <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', 'loc'); return false;"> - <i class="icon-bold comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', 'loc'); return false;"> - <i class="icon-italic comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', 'loc'); return false;"> - <i class="icon-underline comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote','loc'); return false;"> - <i class="icon-quote-left comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', 'loc'); return false;"> - <i class="icon-terminal comment-icon"></i> - </button> - </div> - - <div class='btn-group'> - <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', 'loc'); return false;"> - <i class="icon-camera comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', 'loc'); return false;"> - <i class="icon-link comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', 'loc'); return false;"> - <i class="icon-facetime-video comment-icon"></i> - </button> - <button class="btn btn-default btn-xs" title="{{$mapper}}" onclick="insertbbcomment('{{$comment}}','map','loc'); return false;"> - <i class="icon-globe comment-icon"></i> - </button> + <input type="hidden" name="event_id" value="{{$eid}}" /> + <input type="hidden" name="event_hash" value="{{$event_hash}}" /> + <input type="hidden" name="xchan" value="{{$xchan}}" /> + <input type="hidden" name="mid" value="{{$mid}}" /> + <input type="hidden" name="type" value="{{$type}}" /> + <input type="hidden" name="preview" id="event-edit-preview" value="0" /> + + + {{include file="field_input.tpl" field=$summary}} + + {{$s_dsel}} + + {{$f_dsel}} + + {{include file="field_checkbox.tpl" field=$nofinish}} + + <div id="advanced" style="display:none"> + + {{include file="field_checkbox.tpl" field=$adjust}} + + {{if $catsenabled}} + <div id="event-category-text"><b>{{$c_text}}</b></div> + <div id="events-category-wrap"> + <input name="category" id="event-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" class="event-cats form-control" data-role="cat-tagsinput" /> + </div> + {{/if}} + + <div class="form-group"> + <div id="event-desc-text"><b>{{$d_text}}</b></div> + + <textarea id="comment-edit-text-desc" class="comment-edit-text-full" name="desc" >{{$d_orig}}</textarea> + + <div id="comment-tools-desc" class="comment-tools" style="display: block;" > + <div id="comment-edit-bb-desc" class="btn-toolbar pull-left"> + <div class='btn-group'> + <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', 'desc'); return false;"> + <i class="icon-bold comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', 'desc'); return false;"> + <i class="icon-italic comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', 'desc'); return false;"> + <i class="icon-underline comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote','desc'); return false;"> + <i class="icon-quote-left comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', 'desc'); return false;"> + <i class="icon-terminal comment-icon"></i> + </button> + </div> + <div class='btn-group'> + <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', 'desc'); return false;"> + <i class="icon-camera comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', 'desc'); return false;"> + <i class="icon-link comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', 'desc'); return false;"> + <i class="icon-facetime-video comment-icon"></i> + </button> + </div> + </div> + </div> + </div> + <div class="clear"></div> + <div class="form-group"> + <div id="event-location-text"><b>{{$l_text}}</b></div> + + <textarea id="comment-edit-text-loc" class="comment-edit-text-full" name="location">{{$l_orig}}</textarea> + + <div id="comment-tools-loc" class="comment-tools" style="display: block;" > + <div id="comment-edit-bb-loc" class="btn-toolbar pull-left"> + <div class='btn-group'> + <button class="btn btn-default btn-xs" title="{{$edbold}}" onclick="insertbbcomment('{{$comment}}','b', 'loc'); return false;"> + <i class="icon-bold comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$editalic}}" onclick="insertbbcomment('{{$comment}}','i', 'loc'); return false;"> + <i class="icon-italic comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$eduline}}" onclick="insertbbcomment('{{$comment}}','u', 'loc'); return false;"> + <i class="icon-underline comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edquote}}" onclick="insertbbcomment('{{$comment}}','quote','loc'); return false;"> + <i class="icon-quote-left comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edcode}}" onclick="insertbbcomment('{{$comment}}','code', 'loc'); return false;"> + <i class="icon-terminal comment-icon"></i> + </button> + </div> + <div class='btn-group'> + <button class="btn btn-default btn-xs" title="{{$edimg}}" onclick="insertbbcomment('{{$comment}}','img', 'loc'); return false;"> + <i class="icon-camera comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edurl}}" onclick="insertbbcomment('{{$comment}}','url', 'loc'); return false;"> + <i class="icon-link comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$edvideo}}" onclick="insertbbcomment('{{$comment}}','video', 'loc'); return false;"> + <i class="icon-facetime-video comment-icon"></i> + </button> + <button class="btn btn-default btn-xs" title="{{$mapper}}" onclick="insertbbcomment('{{$comment}}','map','loc'); return false;"> + <i class="icon-globe comment-icon"></i> + </button> + </div> + + </div> + </div> + </div> </div> - - </div> - - -</div> - - - -<br /> -<div class="clear event-form-location-end"></div> + <div class="clear"></div> -{{if ! $eid}} + {{if ! $eid}} + {{include file="field_checkbox.tpl" field=$share}} + {{$acl}} + {{/if}} - <div class='field checkbox'> - <label class="mainlabel" for='id_share'>{{$sh_text}}</label> - <div class="pull-right"><input type="checkbox" name='share' id='id_share' value="1" {{$sh_checked}} > - <label class="switchlabel" for='id_share'> <span class="onoffswitch-inner" data-on='' data-off='' ></span> - <span class="onoffswitch-switch"></span> </label></div><span class='field_help'></span> - </div> + <div class="clear"></div> - -<div id="event-share-break"></div> - - - -<button id="event-permissions-button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button> -{{$acl}} - -{{/if}} - -<div class="clear"></div> - -<button id="event-edit-preview-btn" class="btn btn-default" title="{{$preview}}" onclick="doEventPreview(); return false;"><i class="icon-eye-open" ></i></button> - -<input id="event-submit" type="submit" name="submit" value="{{$submit}}" /> + <button type="button" class="btn btn-default" onclick="openClose('advanced');">{{$advanced}}</button> + <div class="btn-group pull-right"> + <button id="event-edit-preview-btn" class="btn btn-default" type="button" title="{{$preview}}" onclick="doEventPreview(); return false;"><i class="icon-eye-open" ></i></button> + {{if ! $eid}} + <button id="dbtn-acl" class="btn btn-default" type="button" data-toggle="modal" data-target="#aclModal" title="{{$permissions}}"><i id="jot-perms-icon"></i></button> + {{/if}} + <button id="event-submit" class="btn btn-primary" type="submit" name="submit">{{$submit}}</button> + </div> </form> - -</div> diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index ae5f21234..0fc3da5bc 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -110,22 +110,13 @@ var view = $('#events-calendar').fullCalendar('getView'); $('#title').text(view.title); - - - }); -</script> - - -<script> - $(document).ready(function() { - $('#id_share').change(function() { if ($('#id_share').is(':checked')) { - $('#event-permissions-button').show(); + $('#dbtn-acl').show(); } else { - $('#event-permissions-button').hide(); + $('#dbtn-acl').hide(); } }).trigger('change'); diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index d481af2e9..b2de90da1 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,8 +1,8 @@ <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');"><i class="icon-cog"></i></button> - <button class="btn btn-success btn-xs" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button> + <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> @@ -13,6 +13,9 @@ <h2 id="title"></h2> <div class="clear"></div> </div> + <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> diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 75f6b0027..e7edb7e64 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -142,16 +142,16 @@ <div id="profile-rotator"></div> </div> <div id="profile-jot-submit-right" class="btn-group pull-right"> - {{if $showacl}} - <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> - <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>{{if $bang}} <i class="icon-exclamation jot-icons"></i>{{/if}} - </button> - {{/if}} {{if $preview}} <button class="btn btn-default btn-sm hidden-xs" onclick="preview_post();return false;" title="{{$preview}}"> <i class="icon-eye-open jot-icons" ></i> </button> {{/if}} + {{if $showacl}} + <button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> + <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>{{if $bang}} <i class="icon-exclamation jot-icons"></i>{{/if}} + </button> + {{/if}} <button id="dbtn-submit" class="btn btn-primary btn-sm" type="submit" tabindex=3 name="button-submit" >{{$share}}</button> </div> <div id="profile-jot-perms-end"></div> |