diff options
Diffstat (limited to 'view/tpl')
32 files changed, 490 insertions, 134 deletions
diff --git a/view/tpl/admin_settings_features.tpl b/view/tpl/admin_settings_features.tpl index 2d5cf7e0b..86f978e08 100644 --- a/view/tpl/admin_settings_features.tpl +++ b/view/tpl/admin_settings_features.tpl @@ -9,12 +9,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-collapse"> + <a data-toggle="collapse" data-target="#{{$g}}-settings-content" href="#" aria-expanded="true" aria-controls="{{$g}}-settings-collapse"> {{$f.0}} </a> </h3> </div> - <div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} in{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title"> + <div id="{{$g}}-settings-content" class="panel-collapse collapse{{if $g == 'general'}} show{{/if}}" data-parent="#settings" role="tabpanel" aria-labelledby="{{$g}}-settings-title"> <div class="section-content-tools-wrapper"> {{foreach $f.1 as $fcat}} {{include file="field_checkbox.tpl" field=$fcat.0}} diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 78e3ee245..7e99b2c86 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -55,7 +55,7 @@ {{include file="field_select.tpl" field=$language}} {{include file="field_select.tpl" field=$theme}} - {{include file="field_select.tpl" field=$theme_mobile}} + {{* include file="field_select.tpl" field=$theme_mobile *}} {{include file="field_input.tpl" field=$frontpage}} {{include file="field_checkbox.tpl" field=$mirror_frontpage}} {{include file="field_checkbox.tpl" field=$login_on_homepage}} @@ -74,7 +74,7 @@ {{include file="field_select.tpl" field=$access_policy}} {{include file="field_input.tpl" field=$location}} {{include file="field_input.tpl" field=$sellpage}} - {{include file="field_input.tpl" field=$firstpage}} + {{include file="field_input.tpl" field=$first_page}} <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> @@ -101,6 +101,7 @@ {{include file="field_input.tpl" field=$maxloadavg}} {{include file="field_input.tpl" field=$abandon_days}} {{include file="field_input.tpl" field=$default_expire_days}} + {{include file="field_input.tpl" field=$active_expire_days}} <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl index ad3caff88..1f0addc95 100644 --- a/view/tpl/cloud_directory.tpl +++ b/view/tpl/cloud_directory.tpl @@ -1,5 +1,5 @@ <div id="cloud-drag-area" class="section-content-wrapper-np"> - {{if $tiles}} +{{if $tiles}} <table id="cloud-index"> <tr id="new-upload-progress-bar-1"></tr> {{* this is needed to append the upload files in the right order *}} </table> @@ -36,7 +36,7 @@ </div> {{/foreach}} <div class="clear"></div> - {{else}} +{{else}} <table id="cloud-index"> <tr> <th width="1%"></th> @@ -80,5 +80,5 @@ {{/foreach}} </table> - {{/if}} +{{/if}} </div> diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl index 307dc8956..642fb1866 100644 --- a/view/tpl/cloud_header.tpl +++ b/view/tpl/cloud_header.tpl @@ -6,7 +6,7 @@ <a href="/sharedwithme" class="btn btn-sm btn-outline-secondary"><i class="fa fa-cloud-download"></i> {{$shared}}</a> {{/if}} <button id="files-create-btn" class="btn btn-sm btn-primary" onclick="openClose('files-mkdir-tools'); closeMenu('files-upload-tools');"><i class="fa fa-folder-o"></i> {{$create}}</button> - <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-arrow-circle-o-up"></i> {{$upload}}</button> + <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-plus-circle"></i> {{$upload}}</button> {{/if}} </div> diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 3b51971ec..23594677c 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -1,3 +1,6 @@ + <script> + var auto_save_draft = {{$auto_save_draft}}; + </script> {{if $threaded}} <div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-{{$id}}" style="display: block;"> {{else}} diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl index 32973353e..0bf88b818 100755 --- a/view/tpl/connections.tpl +++ b/view/tpl/connections.tpl @@ -9,7 +9,7 @@ </button> <div class="dropdown-menu dropdown-menu-right"> {{foreach $tabs as $menu}} - <a class="dropdown-item" href="{{$menu.url}}">{{$menu.label}}</a> + <a class="dropdown-item {{$menu.sel}}" href="{{$menu.url}}">{{$menu.label}}</a> {{/foreach}} </div> </div> diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index e9f507f1e..a408a83d2 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -27,9 +27,18 @@ {{/if}} {{/if}} <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}"> - <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > + <div class="wall-item-info " id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> - <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a> + <img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" /> + {{if $item.thread_author_menu}} + <i class="fa fa-caret-down wall-item-photo-caret"></i> + <div class="dropdown-menu"> + {{foreach $item.thread_author_menu as $mitem}} + <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a> + {{/foreach}} + + </div> + {{/if}} </div> </div> {{if $item.lock}} @@ -40,7 +49,7 @@ {{/if}} <div class="wall-item-author"> {{if $item.previewing}}<span class="preview-indicator"><i class="fa fa-eye" title="{{$item.preview_lbl}}"></i></span> {{/if}} - <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}} + <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link u-url"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}} </div> <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}"> {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i> {{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i> {{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}, </span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}} <i class="fa fa-pencil"></i>{{/if}} {{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}} @@ -58,32 +67,9 @@ {{/if}} {{if $item.has_tags}} <div class="p-2 wall-item-tools clearfix"> - <div class="body-tags"> <span class="tag">{{$item.mentions}} {{$item.tags}} {{$item.categories}} {{$item.folders}}</span> </div> - {{** - {{if $item.mentions}} - <div class="body-tags" id="item-mentions"> - <span class="tag">{{$item.mentions}}</span> - </div> - {{/if}} - {{if $item.tags}} - <div class="body-tags" id="item-tags"> - <span class="tag">{{$item.tags}}</span> - </div> - {{/if}} - {{if $item.categories}} - <div class="body-tags" id="item-categories"> - <span class="tag p-category">{{$item.categories}}</span> - </div> - {{/if}} - {{if $item.folders}} - <div class="body-tags" id="item-folders"> - <span class="tag">{{$item.folders}}</span> - </div> - {{/if}} - **}} </div> {{/if}} <div class="p-2 clearfix wall-item-tools"> @@ -179,7 +165,7 @@ <a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a> {{/if}} {{if $item.star}} - <a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a> + <a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw{{if $item.star.isstarred}} starred fa-star{{else}} unstarred fa-star-o{{/if}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a> {{/if}} {{if $item.thread_action_menu}} {{foreach $item.thread_action_menu as $mitem}} @@ -189,13 +175,8 @@ {{if $item.drop.dropping}} <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a> {{/if}} - {{if $item.thread_author_menu}} - <div class="dropdown-divider"></div> - {{foreach $item.thread_author_menu as $mitem}} - <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a> - {{/foreach}} - {{/if}} {{if $item.edpost && $item.dreport}} + <div class="dropdown-divider"></div> <a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a> {{/if}} </div> @@ -204,7 +185,12 @@ </div> {{if $item.responses || $item.attachments}} - <div class="wall-item-tools-left{{if ($item.responses.count > 1) || ($item.responses.count && $item.attachments)}} btn-group{{/if}}"> + <div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}"> + {{if $item.star && $item.star.isstarred}} + <div class="btn-group" id="star-button-{{$item.id}}"> + <button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar({{$item.id}});"><i class="fa fa-star"></i></button> + </div> + {{/if}} {{if $item.attachments}} <div class="btn-group"> <button type="button" class="btn btn-outline-secondary btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="fa fa-paperclip"></i></button> diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index 97fd50d01..f94a2f24f 100755 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -29,7 +29,16 @@ <div class="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}"> <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> - <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a> + <img src="{{$item.thumb}}" class="fakelink wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" data-toggle="dropdown" /></a> + {{if $item.thread_author_menu}} + <i class="fa fa-caret-down wall-item-photo-caret"></i> + <div class="dropdown-menu"> + {{foreach $item.thread_author_menu as $mitem}} + <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a> + {{/foreach}} + + </div> + {{/if}} </div> </div> {{if $item.lock}} @@ -39,7 +48,7 @@ </div> {{/if}} <div class="wall-item-author"> - <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}} + <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link u-url"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.via}} <a href="{{$item.owner_url}}" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}} </div> <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}"> {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i> {{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i> {{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}, </span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}} <i class="fa fa-pencil"></i>{{/if}} {{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}} @@ -59,28 +68,6 @@ <div class="body-tags"> <span class="tag">{{$item.mentions}} {{$item.tags}} {{$item.categories}} {{$item.folders}}</span> </div> - {{** - {{if $item.mentions}} - <div class="body-tags" id="item-mentions"> - <span class="tag">{{$item.mentions}}</span> - </div> - {{/if}} - {{if $item.tags}} - <div class="body-tags" id="item-tags"> - <span class="tag">{{$item.tags}}</span> - </div> - {{/if}} - {{if $item.categories}} - <div class="body-tags" id="item-categories"> - <span class="tag p-category">{{$item.categories}}</span> - </div> - {{/if}} - {{if $item.folders}} - <div class="body-tags" id="item-folders"> - <span class="tag">{{$item.folders}}</span> - </div> - {{/if}} - **}} </div> {{/if}} <div class="p-2 clearfix wall-item-tools"> @@ -171,7 +158,7 @@ <a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a> {{/if}} {{if $item.star}} - <a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a> + <a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw{{if $item.star.isstarred}} starred fa-star{{else}} unstarred fa-star-o{{/if}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a> {{/if}} {{if $item.thread_action_menu}} {{foreach $item.thread_action_menu as $mitem}} @@ -181,12 +168,7 @@ {{if $item.drop.dropping}} <a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a> {{/if}} - {{if $item.thread_author_menu}} <div class="dropdown-divider"></div> - {{foreach $item.thread_author_menu as $mitem}} - <a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a> - {{/foreach}} - {{/if}} {{if $item.edpost && $item.dreport}} <a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a> {{/if}} @@ -195,7 +177,12 @@ </div> </div> <div id="like-rotator-{{$item.id}}" class="like-rotator"></div> - <div class="wall-item-tools-left{{if $item.unseen_comments || $item.like_count || $item.dislike_count || $item.attachments}} btn-group{{/if}}"> + <div class="wall-item-tools-left btn-group" id="wall-item-tools-left-{{$item.id}}"> + {{if $item.star && $item.star.isstarred}} + <div class="btn-group" id="star-button-{{$item.id}}"> + <button type="button" class="btn btn-outline-secondary btn-sm wall-item-like" onclick="dostar({{$item.id}});"><i class="fa fa-star"></i></button> + </div> + {{/if}} {{if $item.attachments}} <div class="btn-group"> <button type="button" class="btn btn-outline-secondary btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="fa fa-paperclip"></i></button> diff --git a/view/tpl/cover_photo.tpl b/view/tpl/cover_photo.tpl index cbcf46320..92efcdf02 100755 --- a/view/tpl/cover_photo.tpl +++ b/view/tpl/cover_photo.tpl @@ -1,12 +1,96 @@ +<script> + var initializeEmbedPhotoDialog = function () { + $('.embed-photo-selected-photo').each(function (index) { + $(this).removeClass('embed-photo-selected-photo'); + }); + getPhotoAlbumList(); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('show'); + }; + + var choosePhotoFromAlbum = function (album) { + $.post("embedphotos/album", {name: album}, + function(data) { + if (data['status']) { + $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); + $('#embedPhotoModalBodyAlbumDialog').html('\ + <div><div class="nav nav-pills flex-column">\n\ + <li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\ + <i class="fa fa-chevron-left"></i> \n\ + {{$modaldiffalbum}}\n\ + </a>\n\ + </li>\n\ + </div><br></div>') + $('#embedPhotoModalBodyAlbumDialog').append(data['content']); + $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { + evt.preventDefault(); + var image = document.getElementById(evt.target.id); + if (typeof($(image).parent()[0]) !== 'undefined') { + var imageparent = document.getElementById($(image).parent()[0].id); + $(imageparent).toggleClass('embed-photo-selected-photo'); + var href = $(imageparent).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function(ddata) { + if (ddata['status']) { + window.location.href = 'cover_photo/use/' + ddata['resource_id']; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } + }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + var getPhotoAlbumList = function () { + $.post("embedphotos/albumlist", {}, + function(data) { + if (data['status']) { + var albums = data['albumlist']; //JSON.parse(data['albumlist']); + $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); + $('#embedPhotoModalBodyAlbumList').html('<ul class="nav nav-pills flex-column"></ul>'); + for(var i=0; i<albums.length; i++) { + var albumName = albums[i].text; + var jsAlbumName = albums[i].jstext; + var albumLink = '<li class="nav-item">'; + albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>'; + albumLink += '</li>'; + $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); + } + $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; +</script> + <div id="profile-photo-content" class="generic-content-wrapper"> <div class="section-title-wrapper"> <h2>{{$title}}</h2> </div> <div class="section-content-wrapper"> - + {{if $existing}} + <img class="cover-photo-review" style="max-width: 100%;" src="{{$existing.url}}" alt="{{t('Cover Photo')}}" /> + {{/if}} <form enctype="multipart/form-data" action="cover_photo" method="post"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - <div id="profile-photo-upload-wrapper"> <label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label> diff --git a/view/tpl/generic_addon_settings.tpl b/view/tpl/generic_addon_settings.tpl index bf39b2aea..875c97feb 100644 --- a/view/tpl/generic_addon_settings.tpl +++ b/view/tpl/generic_addon_settings.tpl @@ -1,12 +1,16 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="{{$addon.0}}-settings"> <h3> - <a title="{{$addon.2}}" data-toggle="collapse" data-parent="#settings" href="#{{$addon.0}}-settings-content" aria-controls="{{$addon.0}}-settings-content"> + <a title="{{$addon.2}}" data-toggle="collapse" data-target="#{{$addon.0}}-settings-content" href="#" aria-controls="{{$addon.0}}-settings-content"> + {{if $addon.1|substr:0:1 === '<'}} {{$addon.1}} + {{else}} + <i class="fa fa-gear"></i> {{$addon.1}} + {{/if}} </a> </h3> </div> - <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings"> + <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings" data-parent="#settings"> <div class="section-content-tools-wrapper"> {{$content}} {{if $addon.0}} diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c1dab52d5..df67e9b2d 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -560,3 +560,96 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del } }); </script> + + +<script> + var postSaveTimer = null; + + function postSaveChanges(action, type) { + if({{$auto_save_draft}}) { + + var doctype = $('#jot-webpage').val(); + var postid = '-' + doctype + '-' + $('#jot-postid').val(); + + if(action != 'clean') { + localStorage.setItem("post_title" + postid, $("#jot-title").val()); + localStorage.setItem("post_body" + postid, $("#profile-jot-text").val()); + if($("#jot-category").length) + localStorage.setItem("post_category + postid", $("#jot-category").val()); + } + + if(action == 'start') { + postSaveTimer = setTimeout(function () { + postSaveChanges('start'); + },10000); + } + + if(action == 'stop') { + clearTimeout(postSaveTimer); + postSaveTimer = null; + } + + if(action == 'clean') { + clearTimeout(postSaveTimer); + postSaveTimer = null; + localStorage.removeItem("post_title" + postid); + localStorage.removeItem("post_body" + postid); + localStorage.removeItem("post_category" + postid); + } + } + + } + + $(document).ready(function() { + + var cleaned = false; + + if({{$auto_save_draft}}) { + var doctype = $('#jot-webpage').val(); + var postid = '-' + doctype + '-' + $('#jot-postid').val(); + var postTitle = localStorage.getItem("post_title" + postid); + var postBody = localStorage.getItem("post_body" + postid); + var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category" + postid) : ''); + var openEditor = false; + + if(postTitle) { + $('#jot-title').val(postTitle); + openEditor = true; + } + if(postBody) { + $('#profile-jot-text').val(postBody); + openEditor = true; + } + if(postCategory) { + var categories = postCategory.split(','); + categories.forEach(function(cat) { + $('#jot-category').tagsinput('add', cat); + }); + openEditor = true; + } + if(openEditor) { + initEditor(); + } + } else { + postSaveChanges('clean'); + } + + $(document).on('submit', '#profile-jot-form', function() { + postSaveChanges('clean'); + cleaned = true; + }); + + $(document).on('focusout',"#profile-jot-wrapper",function(e){ + if(! cleaned) + postSaveChanges('stop'); + }); + + $(document).on('focusin',"#profile-jot-wrapper",function(e){ + postSaveTimer = setTimeout(function () { + postSaveChanges('start'); + },10000); + }); + + + }); +</script> diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index bc9339d4c..9aa330c40 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -21,8 +21,8 @@ <input type="hidden" name="media_str" id="jot-media" value="" /> <input type="hidden" name="source" id="jot-source" value="{{$source}}" /> <input type="hidden" name="coord" id="jot-coord" value="" /> - <input type="hidden" name="post_id" value="{{$post_id}}" /> - <input type="hidden" name="webpage" value="{{$webpage}}" /> + <input type="hidden" id="jot-postid" name="post_id" value="{{$post_id}}" /> + <input type="hidden" id="jot-webpage" name="webpage" value="{{$webpage}}" /> <input type="hidden" name="preview" id="jot-preview" value="0" /> <input type="hidden" id="jot-consensus" name="consensus" value="{{if $consensus}}{{$consensus}}{{else}}0{{/if}}" /> <input type="hidden" id="jot-nocomment" name="nocomment" value="{{if $nocomment}}{{$nocomment}}{{else}}0{{/if}}" /> diff --git a/view/tpl/navbar_default.tpl b/view/tpl/navbar_default.tpl index b0b3198c6..7bc8df8d5 100755 --- a/view/tpl/navbar_default.tpl +++ b/view/tpl/navbar_default.tpl @@ -80,7 +80,7 @@ <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> </button> {{if $localuser || $nav.pubs}} - <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white notifications-btn"> + <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> </button> {{/if}} @@ -91,7 +91,7 @@ <div class="collapse navbar-collapse" id="navbar-collapse-1"> <ul class="navbar-nav mr-auto"> {{if $nav.login && !$userinfo}} - <li class="nav-item d-none d-xl-flex"> + <li class="nav-item d-lg-flex"> {{if $nav.loginmenu.1.4}} <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login"> {{$nav.loginmenu.1.1}} @@ -104,12 +104,12 @@ </li> {{/if}} {{if $nav.register}} - <li class="nav-item {{$nav.register.2}} d-none d-xl-flex"> + <li class="nav-item {{$nav.register.2}} d-lg-flex"> <a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a> </li> {{/if}} {{if $nav.alogout}} - <li class="nav-item {{$nav.alogout.2}} d-none d-xl-flex"> + <li class="nav-item {{$nav.alogout.2}} d-lg-flex"> <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> </li> {{/if}} @@ -164,7 +164,7 @@ {{$channel_app}} {{/foreach}} <div class="dropdown-divider"></div> - <div class="dropdown-header sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> + <div class="dropdown-header text-black-50 sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> {{$sysapps_toggle}} </div> <div id="sys_apps" style="display:none;"> @@ -190,7 +190,7 @@ {{foreach $channel_apps as $channel_app}} {{$channel_app|replace:'dropdown-item':'nav-link'}} {{/foreach}} - <div class="dropdown-header sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> + <div class="dropdown-header text-white-50 sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> {{$sysapps_toggle}} </div> <div id="sys-apps-collapsed" style="display:none;"> diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl index b0b3198c6..362b261c5 100755 --- a/view/tpl/navbar_tucson.tpl +++ b/view/tpl/navbar_tucson.tpl @@ -80,7 +80,7 @@ <i class="fa fa-arrow-circle-right" id="expand-aside-icon"></i> </button> {{if $localuser || $nav.pubs}} - <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white notifications-btn"> + <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 notifications-btn"> <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> </button> {{/if}} @@ -91,7 +91,7 @@ <div class="collapse navbar-collapse" id="navbar-collapse-1"> <ul class="navbar-nav mr-auto"> {{if $nav.login && !$userinfo}} - <li class="nav-item d-none d-xl-flex"> + <li class="nav-item d-lg-flex"> {{if $nav.loginmenu.1.4}} <a class="nav-link" href="#" title="{{$nav.loginmenu.1.3}}" id="{{$nav.loginmenu.1.4}}" data-toggle="modal" data-target="#nav-login"> {{$nav.loginmenu.1.1}} @@ -104,12 +104,12 @@ </li> {{/if}} {{if $nav.register}} - <li class="nav-item {{$nav.register.2}} d-none d-xl-flex"> + <li class="nav-item {{$nav.register.2}} d-lg-flex"> <a class="nav-link" href="{{$nav.register.0}}" title="{{$nav.register.3}}" id="{{$nav.register.4}}">{{$nav.register.1}}</a> </li> {{/if}} {{if $nav.alogout}} - <li class="nav-item {{$nav.alogout.2}} d-none d-xl-flex"> + <li class="nav-item {{$nav.alogout.2}} d-none d-lg-flex"> <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> </li> {{/if}} @@ -164,7 +164,7 @@ {{$channel_app}} {{/foreach}} <div class="dropdown-divider"></div> - <div class="dropdown-header sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> + <div class="dropdown-header text-black-50 sys-apps-toggle" onclick="$('#dropdown-menu').click(function(e) { e.stopPropagation(); }); openClose('sys_apps');"> {{$sysapps_toggle}} </div> <div id="sys_apps" style="display:none;"> @@ -190,7 +190,7 @@ {{foreach $channel_apps as $channel_app}} {{$channel_app|replace:'dropdown-item':'nav-link'}} {{/foreach}} - <div class="dropdown-header sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> + <div class="dropdown-header text-white-50 sys-apps-toggle" onclick="openClose('sys-apps-collapsed');"> {{$sysapps_toggle}} </div> <div id="sys-apps-collapsed" style="display:none;"> diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 18250cf97..215fddd08 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -1,3 +1,4 @@ +{{if $notifications}} <script> var notifications_parent; @@ -121,8 +122,6 @@ } </script> - -{{if $notifications}} <div id="notifications_wrapper"> <div id="no_notifications" class="d-xl-none"> {{$no_notifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> diff --git a/view/tpl/oauth2testvehicle.tpl b/view/tpl/oauth2testvehicle.tpl new file mode 100644 index 000000000..ce46b58c0 --- /dev/null +++ b/view/tpl/oauth2testvehicle.tpl @@ -0,0 +1,21 @@ +<h1>OAuth 2.0 Test Vehicle</h1> + +{{foreach $endpoints as $ept}} +<div class="oath2test-form-box"> +<form action="{{$baseurl}}/{{$ept.0}}/" method="{{$ept.4}}"> + <h3>{{$ept.3}}</h3> + {{$baseurl}}/{{$ept.0}}/?{{foreach $ept.1 as $field}}{{$field.0}}={{$field.1}}&<input type="hidden" name="{{$field.0}}" value="{{$field.1}}" />{{/foreach}} + <br> + <button type="submit" name="{{$ept.2}}_submit" value="submit" class="btn btn-med" title="">Submit</button> + <span style="display: {{if $ept.5}}inline{{else}}none{{/if}}; font-size: 2em;"> <i class="fa fa-check"></i></span> +</form> + </div> +{{/foreach}} +<div> + <h3>API response</h3> + <pre style="display: inline-block; overflow-x: auto; white-space: nowrap; width: 100%;"> + <code> + {{$api_response}} + </code> + </pre> +</div>
\ No newline at end of file diff --git a/view/tpl/oauth_authorize.tpl b/view/tpl/oauth_authorize.tpl index 2b7afa80e..72701ce52 100755 --- a/view/tpl/oauth_authorize.tpl +++ b/view/tpl/oauth_authorize.tpl @@ -2,9 +2,15 @@ <div class='oauthapp'> <img src='{{$app.icon}}'> - <h4>{{$app.name}}</h4> -</div> -<h3>{{$authorize}}</h3> -<form method="POST"> -<div class="settings-submit-wrapper"><input class="settings-submit" type="submit" name="oauth_yes" value="{{$yes}}" /></div> -</form> + <h3>{{$app.name}}</h3> + <p class="descriptive-paragraph">{{$authorize}}</p> + <form method="POST"> + <div class="settings-submit-wrapper"> + <input type="hidden" name="client_id" value="{{$client_id}}" /> + <input type="hidden" name="redirect_uri" value="{{$redirect_uri}}" /> + <input type="hidden" name="state" value="{{$state}}" /> + <button class="btn btn-lg btn-danger" name="authorize" value="deny" type="submit">{{$no}}</button> + <button class="btn btn-lg btn-success" name="authorize" value="allow" type="submit">{{$yes}}</button> + </div> + </form> +</div>
\ No newline at end of file diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl index 5f420f6d0..b4d9ef19f 100755 --- a/view/tpl/peoplefind.tpl +++ b/view/tpl/peoplefind.tpl @@ -10,7 +10,7 @@ </form> <ul class="nav nav-pills flex-column"> {{if $similar}}<li class="nav-item"><a class="nav-link" href="match" >{{$similar}}</a></li>{{/if}} - {{if $loggedin}}<li class="nav-item"><a class="nav-link" href="directory?suggest=1" >{{$suggest}}</a></li>{{/if}} + {{if $loggedin}}<li class="nav-item"><a class="nav-link" href="directory?f=&suggest=1" >{{$suggest}}</a></li>{{/if}} <li class="nav-item"><a class="nav-link" href="randprof" >{{$random}}</a></li> {{if $loggedin}}{{if $inv}}<li class="nav-item"><a class="nav-link" href="invite" >{{$inv}}</a></li>{{/if}}{{/if}} </ul> diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index 678e790ac..de59809f4 100755 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -9,7 +9,7 @@ <i class="fa fa-pencil btn btn-outline-secondary btn-sm" title="{{$album_edit.0}}" onclick="openClose('photo-album-edit-wrapper'); closeMenu('photo-upload-form');"></i> {{/if}} {{if $can_post}} - <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-arrow-circle-o-up"></i> {{$upload.0}}</button> + <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-plus-circle"></i> {{$upload.0}}</button> {{/if}} </div> </div> diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl index a9574aade..d24b362f8 100755 --- a/view/tpl/photos_recent.tpl +++ b/view/tpl/photos_recent.tpl @@ -2,7 +2,7 @@ <div class="section-title-wrapper"> <div class="pull-right"> {{if $can_post}} - <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-arrow-circle-o-up"></i> {{$upload.0}}</button> + <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-plus-circle"></i> {{$upload.0}}</button> {{/if}} </div> <h2>{{$title}}</h2> diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 05137479f..c967fa02c 100755 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -4,7 +4,7 @@ <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-cog"></i> {{$tools_label}} </button> - <div class="dropdown-menu"> + <div class="dropdown-menu dropdown-menu-right"> <a class="dropdown-item" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="fa fa-fw fa-user"></i> {{$profpic}}</a> {{if $is_default}} <a class="dropdown-item" href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="fa fa-fw fa-picture-o"></i> {{$coverpic}}</a> @@ -15,7 +15,7 @@ <a class="dropdown-item" href="thing" id="profile-edit-thing-link" title="{{$addthing}}"><i class="fa fa-fw fa-plus-circle"></i> {{$addthing}}</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a> - {{if $profile_clone_link}} + {{if $multi_profiles}} <div class="dropdown-divider"></div> <a class="dropdown-item" href="{{$profile_clone_link}}" id="profile-edit-clone-link" title="{{$cr_prof}}">{{$cl_prof}}</a> {{/if}} @@ -49,14 +49,18 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="personal"> <h3> - <a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#personal-collapse" aria-expanded="true" aria-controls="personal-collapse"> + <a data-toggle="collapse" data-target="#personal-collapse" href="#" aria-expanded="true" aria-controls="personal-collapse"> {{$personal}} </a> </h3> </div> - <div id="personal-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="personal"> + <div id="personal-collapse" class="panel-collapse collapse show" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="personal"> <div class="section-content-tools-wrapper"> + {{if $multi_profiles}} {{include file="field_input.tpl" field=$profile_name}} + {{else}} + <input type="hidden" name="{{$profile_name.0}}" value="{{$profile_name.2}}"> + {{/if}} {{include file="field_input.tpl" field=$name}} @@ -215,12 +219,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="location"> <h3> - <a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#location-collapse" aria-expanded="true" aria-controls="location-collapse"> + <a data-toggle="collapse" data-target="#location-collapse" href="#" aria-expanded="true" aria-controls="location-collapse"> {{$location}} </a> </h3> </div> - <div id="location-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="location"> + <div id="location-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="location"> <div class="section-content-tools-wrapper"> {{if $fields.address}} {{include file="field_input.tpl" field=$address}} @@ -260,12 +264,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="relation"> <h3> - <a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#relation-collapse" aria-expanded="true" aria-controls="relation-collapse"> + <a data-toggle="collapse" data-target="#relation-collapse" href="#" aria-expanded="true" aria-controls="relation-collapse"> {{$relation}} </a> </h3> </div> - <div id="relation-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="relation"> + <div id="relation-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="relation"> <div class="section-content-tools-wrapper"> {{if $fields.marital }} <div id="profile-edit-marital-wrapper" class="form-group field" > @@ -307,12 +311,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="miscellaneous"> <h3> - <a data-toggle="collapse" data-parent="#profile-edit-wrapper" href="#miscellaneous-collapse" aria-expanded="true" aria-controls="miscellaneous-collapse"> + <a data-toggle="collapse" data-target="#miscellaneous-collapse" href="#" aria-expanded="true" aria-controls="miscellaneous-collapse"> {{$miscellaneous}} </a> </h3> </div> - <div id="miscellaneous-collapse" class="panel-collapse collapse" role="tabpanel" aria-labelledby="miscellaneous"> + <div id="miscellaneous-collapse" class="panel-collapse collapse" data-parent="#profile-edit-wrapper" role="tabpanel" aria-labelledby="miscellaneous"> <div class="section-content-tools-wrapper"> {{if $fields.homepage}} {{include file="field_input.tpl" field=$homepage}} diff --git a/view/tpl/profile_photo.tpl b/view/tpl/profile_photo.tpl index edde6af3f..e48d05330 100755 --- a/view/tpl/profile_photo.tpl +++ b/view/tpl/profile_photo.tpl @@ -1,3 +1,89 @@ +<script> + var initializeEmbedPhotoDialog = function () { + $('.embed-photo-selected-photo').each(function (index) { + $(this).removeClass('embed-photo-selected-photo'); + }); + getPhotoAlbumList(); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('show'); + }; + + var choosePhotoFromAlbum = function (album) { + $.post("embedphotos/album", {name: album}, + function(data) { + if (data['status']) { + $('#embedPhotoModalLabel').html("{{$modalchooseimages}}"); + $('#embedPhotoModalBodyAlbumDialog').html('\ + <div><div class="nav nav-pills flex-column">\n\ + <li class="nav-item"><a class="nav-link" href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\ + <i class="fa fa-chevron-left"></i> \n\ + {{$modaldiffalbum}}\n\ + </a>\n\ + </li>\n\ + </div><br></div>') + $('#embedPhotoModalBodyAlbumDialog').append(data['content']); + $('#embedPhotoModalBodyAlbumDialog').click(function (evt) { + evt.preventDefault(); + var image = document.getElementById(evt.target.id); + if (typeof($(image).parent()[0]) !== 'undefined') { + var imageparent = document.getElementById($(image).parent()[0].id); + $(imageparent).toggleClass('embed-photo-selected-photo'); + var href = $(imageparent).attr('href'); + $.post("embedphotos/photolink", {href: href}, + function(ddata) { + if (ddata['status']) { + var pf = $('#profile-photo-profiles').val(); + var prof = ((typeof pf !== 'undefined') ? '?f=&pf=' + pf : ''); + window.location.href = 'profile_photo/use/' + ddata['resource_id'] + prof; + } else { + window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']); + } + return false; + }, + 'json'); + $('#embedPhotoModalBodyAlbumDialog').html(''); + $('#embedPhotoModalBodyAlbumDialog').off('click'); + $('#embedPhotoModal').modal('hide'); + } + }); + + $('#embedPhotoModalBodyAlbumListDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; + + var getPhotoAlbumList = function () { + $.post("embedphotos/albumlist", {}, + function(data) { + if (data['status']) { + var albums = data['albumlist']; //JSON.parse(data['albumlist']); + $('#embedPhotoModalLabel').html("{{$modalchoosealbum}}"); + $('#embedPhotoModalBodyAlbumList').html('<ul class="nav nav-pills flex-column"></ul>'); + for(var i=0; i<albums.length; i++) { + var albumName = albums[i].text; + var jsAlbumName = albums[i].jstext; + var albumLink = '<li class="nav-item">'; + albumLink += '<a class="nav-link" href="#" onclick="choosePhotoFromAlbum(\'' + jsAlbumName + '\'); return false;">' + albumName + '</a>'; + albumLink += '</li>'; + $('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink); + } + $('#embedPhotoModalBodyAlbumDialog').addClass('d-none'); + $('#embedPhotoModalBodyAlbumListDialog').removeClass('d-none'); + } else { + window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']); + } + return false; + }, + 'json'); + }; +</script> + + <div id="profile-photo-content" class="generic-content-wrapper"> <div class="section-title-wrapper"> <h2>{{$title}}</h2> diff --git a/view/tpl/profile_tabs.tpl b/view/tpl/profile_tabs.tpl index 72e98ae82..e77da23f3 100644 --- a/view/tpl/profile_tabs.tpl +++ b/view/tpl/profile_tabs.tpl @@ -1,4 +1,5 @@ -<div class="dropdown-header"><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div> +<div class="dropdown-header text-white-50 d-lg-none" ><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div> +<div class="dropdown-header text-black-50 d-none d-lg-block"><img src="{{$thumb}}" class="menu-img-1">{{$name}}</div> {{foreach $tabs as $tab}} <a class="dropdown-item{{if $tab.sel}} {{$tab.sel}}{{/if}}" href="{{$tab.url}}"{{if $tab.title}} title="{{$tab.title}}"{{/if}}><i class="fa fa-fw fa-{{$tab.icon}} generic-icons-nav"></i>{{$tab.label}}</a> {{/foreach}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 0f42a6e8a..d258f1992 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -11,12 +11,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="basic-settings"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#basic-settings-collapse"> + <a data-toggle="collapse" data-target="#basic-settings-collapse" href="#"> {{$h_basic}} </a> </h3> </div> - <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings"> + <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings" data-parent="#settings"> <div class="section-content-tools-wrapper"> {{include file="field_input.tpl" field=$username}} {{include file="field_select_grouped.tpl" field=$timezone}} @@ -37,12 +37,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="privacy-settings"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#privacy-settings-collapse"> + <a data-toggle="collapse" data-target="#privacy-settings-collapse" href="#"> {{$h_prv}} </a> </h3> </div> - <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings"> + <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-parent="#settings"> <div class="section-content-tools-wrapper"> {{include file="field_select_grouped.tpl" field=$role}} <div id="advanced-perm" style="display:{{if $permissions_set}}none{{else}}block{{/if}};"> @@ -96,12 +96,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="notification-settings"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse"> + <a data-toggle="collapse" data-target="#notification-settings-collapse" href="#"> {{$h_not}} </a> </h3> </div> - <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings"> + <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings" data-parent="#settings"> <div class="section-content-tools-wrapper"> <div id="settings-notifications"> @@ -138,11 +138,14 @@ {{include file="field_intcheckbox.tpl" field=$vnotify7}} {{include file="field_intcheckbox.tpl" field=$vnotify8}} {{include file="field_intcheckbox.tpl" field=$vnotify9}} - {{include file="field_intcheckbox.tpl" field=$vnotify11}} + {{if $vnotify11}} + {{include file="field_intcheckbox.tpl" field=$vnotify11}} + {{/if}} {{include file="field_intcheckbox.tpl" field=$vnotify12}} {{if $vnotify13}} {{include file="field_intcheckbox.tpl" field=$vnotify13}} {{/if}} + {{include file="field_intcheckbox.tpl" field=$vnotify14}} {{include file="field_intcheckbox.tpl" field=$always_show_in_notices}} {{include file="field_input.tpl" field=$evdays}} </div> @@ -160,12 +163,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="miscellaneous-settings"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#miscellaneous-settings-collapse" aria-expanded="true" aria-controls="miscellaneous-settings-collapse"> + <a data-toggle="collapse" data-target="#miscellaneous-settings-collapse" href="#" aria-expanded="true" aria-controls="miscellaneous-settings-collapse"> {{$lbl_misc}} </a> </h3> </div> - <div id="miscellaneous-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="miscellaneous-settings"> + <div id="miscellaneous-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="miscellaneous-settings" data-parent="#settings" > <div class="section-content-tools-wrapper"> {{if $profselect}} <label for="contact-profile-selector">{{$profseltxt}}</label> diff --git a/view/tpl/settings_addons.tpl b/view/tpl/settings_addons.tpl index 2a925f1f7..27cfa238a 100755 --- a/view/tpl/settings_addons.tpl +++ b/view/tpl/settings_addons.tpl @@ -1,8 +1,8 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> - <div class="descriptive-text pull-right">{{$descrip}}</div> <h2>{{$title}}</h2> </div> + <div class="section-content-info-wrapper">{{$descrip}}</div> <form action="settings/featured" method="post" autocomplete="off"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> <div class="panel-group" id="settings" role="tablist"> diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index b0751eb5f..7600038ea 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -10,12 +10,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="theme-settings-title"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#theme-settings-content" aria-expanded="true" aria-controls="theme-settings-content"> + <a data-toggle="collapse" data-target="#theme-settings-content" href="#" aria-expanded="true" aria-controls="theme-settings-content"> {{$d_tset}} </a> </h3> </div> - <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings"> + <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings" data-parent="#settings" > <div class="section-content-tools-wrapper"> {{if $theme}} {{include file="field_themeselect.tpl" field=$theme}} @@ -33,12 +33,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="custom-settings-title"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#custom-settings-content" aria-expanded="true" aria-controls="custom-settings-content"> + <a data-toggle="collapse" data-target="#custom-settings-content" href="" aria-expanded="true" aria-controls="custom-settings-content"> {{$d_ctset}} </a> </h3> </div> - <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings"> + <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings" data-parent="#settings" > <div class="section-content-tools-wrapper"> {{if $theme_config}} {{$theme_config}} @@ -49,12 +49,12 @@ <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="content-settings-title"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#content-settings-content" aria-expanded="true" aria-controls="content-settings-content"> + <a data-toggle="collapse" data-target="#content-settings-content" href="" aria-expanded="true" aria-controls="content-settings-content"> {{$d_cset}} </a> </h3> </div> - <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings"> + <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings" data-parent="#settings"> <div class="section-content-wrapper"> {{include file="field_input.tpl" field=$ajaxint}} {{include file="field_input.tpl" field=$itemspage}} diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index dfe049a7a..998199c8e 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -1,20 +1,42 @@ +<script> + $(document).ready(function() { + $('#id_techlevel').change(function() { + var techlvl = $('#id_techlevel').val(); + window.location.href='{{$baseurl}}/settings/features?f=&techlevel=' + techlvl; + }); + }); +</script> + <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <h2>{{$title}}</h2> </div> <form action="settings/features" method="post" autocomplete="off"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + {{if ! $techlock}} + <div class="section-content-tools-wrapper"> + {{include file="field_select.tpl" field=$techlevel}} + </div> + {{else}} + <input type="hidden" name="techlevel" value="{{$techlevel.2}}" /> + {{/if}} + + {{if $hiddens}} + {{foreach $hiddens as $k => $v}} + <input type="hidden" name="feature_{{$k}}" value="{{$v}}" /> + {{/foreach}} + {{/if}} <div class="panel-group" id="settings" role="tablist" aria-multiselectable="true"> {{foreach $features as $g => $f}} <div class="panel"> <div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title"> <h3> - <a data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-collapse"> + <a data-toggle="collapse" data-target="#{{$g}}-settings-content" href="#" aria-expanded="true" aria-controls="{{$g}}-settings-collapse"> {{$f.0}} </a> </h3> </div> - <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title"> + <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title" data-parent="#settings"> <div class="section-content-tools-wrapper"> {{foreach $f.1 as $fcat}} {{include file="field_checkbox.tpl" field=$fcat}} diff --git a/view/tpl/settings_nick_set.tpl b/view/tpl/settings_nick_set.tpl index 76fe7cd8d..4dbe58d82 100755 --- a/view/tpl/settings_nick_set.tpl +++ b/view/tpl/settings_nick_set.tpl @@ -1,5 +1,5 @@ <div id="settings-nick-wrapper" class="section-content-info-wrapper"> -<div id="settings-nickname-desc">{{$desc}} <strong>'{{$nickname}}@{{$basepath}}'</strong></div> +<div id="settings-nickname-desc">{{$desc}} <strong>{{$nickname}}</strong></div> {{if $davpath}} <br> <div id="settings-dav-desc">{{$davdesc}} <strong>'{{$davpath}}'</strong></div> diff --git a/view/tpl/settings_oauth2.tpl b/view/tpl/settings_oauth2.tpl new file mode 100755 index 000000000..882d34ea9 --- /dev/null +++ b/view/tpl/settings_oauth2.tpl @@ -0,0 +1,35 @@ +<div class="generic-content-wrapper"> +<div class="section-title-wrapper"> + <h2>{{$title}}</h2> +</div> + +<div class="section-content-tools-wrapper"> +<form action="settings/oauth2" method="post" autocomplete="off"> +<input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + + <div id="profile-edit-links"> + <ul> + <li> + <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth2/add">{{$add}}</a> + </li> + </ul> + </div> + + {{foreach $apps as $app}} + <div class='oauthapp'> + {{if $app.client_id}}<h4>{{$app.client_id}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}} + {{if $app.my}} + {{if $app.oauth_token}} + <div class="settings-submit-wrapper" ><button class="settings-submit" type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div> + {{/if}} + {{/if}} + {{if $app.my}} + <a href="{{$baseurl}}/settings/oauth2/edit/{{$app.client_id}}" title="{{$edit}}"><i class="fa fa-pencil btn btn-outline-secondary"></i></a> + <a href="{{$baseurl}}/settings/oauth2/delete/{{$app.client_id}}?t={{$form_security_token}}" title="{{$delete}}"><i class="fa fa-trash-o btn btn-outline-secondary"></i></a> + {{/if}} + </div> + {{/foreach}} + +</form> +</div> +</div> diff --git a/view/tpl/settings_oauth2_edit.tpl b/view/tpl/settings_oauth2_edit.tpl new file mode 100755 index 000000000..399c64977 --- /dev/null +++ b/view/tpl/settings_oauth2_edit.tpl @@ -0,0 +1,21 @@ +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <h2>{{$title}}</h2> + </div> +<div class="section-content-tools-wrapper"> +<form method="POST"> +<input type='hidden' name='form_security_token' value='{{$form_security_token}}'> +{{include file="field_input.tpl" field=$name}} +{{include file="field_input.tpl" field=$secret}} +{{include file="field_input.tpl" field=$redirect}} +{{include file="field_input.tpl" field=$grant}} +{{include file="field_input.tpl" field=$scope}} + +<div class="settings-submit-wrapper" > +<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" /> +<input type="submit" name="cancel" class="settings-submit" value="{{$cancel}}" /> +</div> + +</form> +</div> +</div> diff --git a/view/tpl/settings_oauth_edit.tpl b/view/tpl/settings_oauth_edit.tpl index b94dec48a..e44b44723 100755 --- a/view/tpl/settings_oauth_edit.tpl +++ b/view/tpl/settings_oauth_edit.tpl @@ -5,7 +5,6 @@ <div class="section-content-tools-wrapper"> <form method="POST"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - {{include file="field_input.tpl" field=$name}} {{include file="field_input.tpl" field=$key}} {{include file="field_input.tpl" field=$secret}} diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 2be323deb..6ca4b0c77 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -15,6 +15,7 @@ </div> </div> {{/if}} + <button type="button" class="btn btn-outline-secondary btn-sm" title="{{$sharePage}}" onclick="window.location.href='rpost?f=&body={{$shareLink}}';"><i class="fa fa-fw fa-share"></i></button> <button id="fullscreen-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(); adjustFullscreenEditorHeight();"><i class="fa fa-expand"></i></button> <button id="inline-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(false); adjustInlineEditorHeight()"><i class="fa fa-compress"></i></button> </div> |