diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/navbar_tucson.css | 3 | ||||
-rw-r--r-- | view/css/widgets.css | 17 | ||||
-rw-r--r-- | view/en-au/register_verify_member.tpl | 12 | ||||
-rw-r--r-- | view/en-gb/register_verify_member.tpl | 12 | ||||
-rw-r--r-- | view/en/register_verify_member.tpl | 7 | ||||
-rw-r--r-- | view/js/main.js | 261 | ||||
-rw-r--r-- | view/pdl/mod_go.pdl | 6 | ||||
-rw-r--r-- | view/theme/redbasic/php/theme_init.php | 3 | ||||
-rwxr-xr-x | view/tpl/admin_accounts.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/admin_site.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/atom_feed.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/comment_item.tpl | 8 | ||||
-rwxr-xr-x | view/tpl/connections.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/cropbody.tpl | 43 | ||||
-rwxr-xr-x | view/tpl/cropcover.tpl | 42 | ||||
-rwxr-xr-x | view/tpl/crophead.tpl | 7 | ||||
-rw-r--r-- | view/tpl/email_validation.tpl | 16 | ||||
-rw-r--r-- | view/tpl/go.tpl | 16 | ||||
-rw-r--r-- | view/tpl/hdr.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/hq.tpl | 10 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 11 | ||||
-rwxr-xr-x | view/tpl/navbar_tucson.tpl | 168 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 109 | ||||
-rwxr-xr-x | view/tpl/register.tpl | 4 | ||||
-rw-r--r-- | view/tpl/settings_permcats.tpl | 2 |
25 files changed, 414 insertions, 358 deletions
diff --git a/view/css/navbar_tucson.css b/view/css/navbar_tucson.css index 79f95fe63..e69de29bb 100644 --- a/view/css/navbar_tucson.css +++ b/view/css/navbar_tucson.css @@ -1,3 +0,0 @@ -#notifications { - display: none; -} diff --git a/view/css/widgets.css b/view/css/widgets.css index 76e829b04..a32ac045b 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -179,6 +179,23 @@ a.wikilist { overflow: auto; } +.notifications-textinput input { + font-family: FontAwesome, sans-serif; +} + +.notifications-textinput { + padding: .75rem 0.85rem; +} + +.notifications-textinput-clear { + padding: .5rem; + line-height: 1; + position: absolute; + top: .75rem; + right: 1rem; + cursor: pointer; +} + .notification-content.collapsing { overflow: hidden; } diff --git a/view/en-au/register_verify_member.tpl b/view/en-au/register_verify_member.tpl index d1e34be67..9bdd7fa51 100644 --- a/view/en-au/register_verify_member.tpl +++ b/view/en-au/register_verify_member.tpl @@ -10,7 +10,12 @@ Login with the password you chose at registration. We need to verify your email address in order to give you full access. -If you registered this account, please visit the following link: +Your validation code is + +{{$hash}} + + +If you registered this account, please enter the validation code when requested or visit the following link: {{$siteurl}}/regver/allow/{{$hash}} @@ -23,3 +28,8 @@ To deny the request and remove the account, please visit: Thank you. + +-- +Terms Of Service: +{{$siteurl}}/help/TermsOfService + diff --git a/view/en-gb/register_verify_member.tpl b/view/en-gb/register_verify_member.tpl index d1e34be67..9bdd7fa51 100644 --- a/view/en-gb/register_verify_member.tpl +++ b/view/en-gb/register_verify_member.tpl @@ -10,7 +10,12 @@ Login with the password you chose at registration. We need to verify your email address in order to give you full access. -If you registered this account, please visit the following link: +Your validation code is + +{{$hash}} + + +If you registered this account, please enter the validation code when requested or visit the following link: {{$siteurl}}/regver/allow/{{$hash}} @@ -23,3 +28,8 @@ To deny the request and remove the account, please visit: Thank you. + +-- +Terms Of Service: +{{$siteurl}}/help/TermsOfService + diff --git a/view/en/register_verify_member.tpl b/view/en/register_verify_member.tpl index 71f0964d4..9bdd7fa51 100644 --- a/view/en/register_verify_member.tpl +++ b/view/en/register_verify_member.tpl @@ -10,7 +10,12 @@ Login with the password you chose at registration. We need to verify your email address in order to give you full access. -If you registered this account, please visit the following link: +Your validation code is + +{{$hash}} + + +If you registered this account, please enter the validation code when requested or visit the following link: {{$siteurl}}/regver/allow/{{$hash}} diff --git a/view/js/main.js b/view/js/main.js index 77b8e91e7..02b0f125c 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -23,6 +23,17 @@ var mediaPlaying = false; var contentHeightDiff = 0; var liveRecurse = 0; var savedTitle = ''; +var initialLoad = true; + +// Clear the session storage if we switch channel or log out +var cache_uid = ''; +if(sessionStorage.getItem('uid') !== null) { + cache_uid = sessionStorage.getItem('uid'); +} +if(cache_uid !== localUser.toString()) { + sessionStorage.clear(); + sessionStorage.setItem('uid', localUser.toString()); +} $.ajaxSetup({cache: false}); @@ -54,11 +65,24 @@ $(document).ready(function() { updateInit(); - $('a[rel^="#"]').click(function(e){ - manage_popup_menu(this, e); - return; + $('a.notification-link').click(function(e){ + var notifyType = $(this).data('type'); + + if(! $('#nav-' + notifyType + '-sub').hasClass('show')) { + loadNotificationItems(notifyType); + sessionStorage.setItem('notification_open', notifyType); + } + else { + sessionStorage.removeItem('notification_open'); + } }); + if(sessionStorage.getItem('notification_open') !== null) { + var notifyType = sessionStorage.getItem('notification_open'); + $('#nav-' + notifyType + '-sub').addClass('show'); + loadNotificationItems(notifyType); + } + // Allow folks to stop the ajax page updates with the pause/break key $(document).keydown(function(event) { if(event.keyCode == '8') { @@ -88,7 +112,9 @@ $(document).ready(function() { var e = document.getElementById('content-complete'); if(e) - pageHasMoreContent = false; + pageHasMoreContent = false; + + initialLoad = false; }); @@ -282,22 +308,6 @@ function viewsrc(id) { $.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' }); } -function qCommentInsert(obj, id) { - var tmpStr = $("#comment-edit-text-" + id).val(); - if(tmpStr == aStr.comment) { - tmpStr = ''; - $("#comment-edit-text-" + id).addClass("expanded"); - openMenu("comment-edit-submit-wrapper-" + id); - } - var ins = $(obj).val(); - ins = ins.replace('<','<'); - ins = ins.replace('>','>'); - ins = ins.replace('&','&'); - ins = ins.replace('"','"'); - $("#comment-edit-text-" + id).val(tmpStr + ins); - $(obj).val(''); -} - function showHideComments(id) { if( $('#collapsed-comments-' + id).is(':visible')) { $('#collapsed-comments-' + id + ' .autotime').timeago('dispose'); @@ -356,73 +366,111 @@ function markItemRead(itemId) { $('.unseen-wall-indicator-'+itemId).hide(); } -function manage_popup_menu(w,e) { - menu = $( $(w).attr('rel') ); +function notificationsUpdate(cached_data) { + var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : ''); + + if(cached_data !== undefined) { + handleNotifications(cached_data); + } + else { + $.get(pingCmd,function(data) { + + // Put the object into storage + sessionStorage.setItem('notifications_cache', JSON.stringify(data)); + + if(data.invalid == 1) { + window.location.href=window.location.href; + } + + handleNotifications(data); - /* notification menus are loaded dynamically - * - here we find a rel tag to figure out what type of notification to load */ + $.jGrowl.defaults.closerTemplate = '<div>[ ' + aStr.closeAll + ']</div>'; - var loader_source = $(menu).attr('rel'); + $(data.notice).each(function() { + $.jGrowl(this.message, { sticky: true, theme: 'notice' }); + }); - if(typeof(loader_source) != 'undefined' && loader_source.length) { - notify_popup_loader(loader_source); + $(data.info).each(function(){ + $.jGrowl(this.message, { sticky: false, theme: 'info', life: 10000 }); + }); + }); } + + var notifyType = null; + if($('.notification-content.show').length) { + notifyType = $('.notification-content.show').data('type'); + } + if(notifyType !== null) { + loadNotificationItems(notifyType); + } + + if(timer) clearTimeout(timer); + timer = setTimeout(updateInit,updateInterval); } -function notificationsUpdate() { - var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : ''); +function handleNotifications(data) { + if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) { + $('.notifications-btn').css('opacity', 1); + $('#no_notifications').hide(); + } + else { + $('.notifications-btn').css('opacity', 0.5); + $('#navbar-collapse-1').removeClass('show'); + $('#no_notifications').show(); + } - $.get(pingCmd,function(data) { + if(data.home || data.intros || data.register || data.mail || data.notify || data.files) { + $('.notifications-btn-icon').removeClass('fa-exclamation-circle'); + $('.notifications-btn-icon').addClass('fa-exclamation-triangle'); + } + if(!data.home && !data.intros && !data.register && !data.mail && !data.notify && !data.files) { + $('.notifications-btn-icon').removeClass('fa-exclamation-triangle'); + $('.notifications-btn-icon').addClass('fa-exclamation-circle'); + } - if(data.invalid == 1) { - window.location.href=window.location.href; - } + $.each(data, function(index, item) { + //do not process those + var arr = ['notice', 'info', 'invalid']; + if(arr.indexOf(index) !== -1) + return; - if(data.network || data.home || data.intros || data.register || data.mail || data.all_events || data.notify || data.files || data.pubs) { - $('.notifications-btn').css('opacity', 1); - $('#no_notifications').hide(); - } - else { - $('.notifications-btn').css('opacity', 0.5); - $('#navbar-collapse-1').removeClass('show'); - $('#no_notifications').show(); + if(item == 0) { + $('.' + index + '-button').fadeOut(); + } else { + $('.' + index + '-button').fadeIn(); + $('.' + index + '-update').html(item); } + }); +} - if(data.home || data.intros || data.register || data.mail || data.notify || data.files) { - $('.notifications-btn-icon').removeClass('fa-exclamation-circle'); - $('.notifications-btn-icon').addClass('fa-exclamation-triangle'); - } - if(!data.home && !data.intros && !data.register && !data.mail && !data.notify && !data.files) { - $('.notifications-btn-icon').removeClass('fa-exclamation-triangle'); - $('.notifications-btn-icon').addClass('fa-exclamation-circle'); - } +function handleNotificationsItems(notifyType, data) { + var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); + var notify_menu = $("#nav-" + notifyType + "-menu"); - $.each(data, function(index, item) { - //do not process those - var arr = ['notice', 'info', 'invalid']; - if(arr.indexOf(index) !== -1) - return; + notify_menu.html(''); - if(item == 0) { - $('.' + index + '-button').fadeOut(); - } else { - $('.' + index + '-button').fadeIn(); - $('.' + index + '-update').html(item); - } - }); + $(data).each(function() { + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top); + notify_menu.append(html); + }); - $.jGrowl.defaults.closerTemplate = '<div>[ ' + aStr.closeAll + ']</div>'; + datasrc2src('#notifications .notification img[data-src]'); - $(data.notice).each(function() { - $.jGrowl(this.message, { sticky: true, theme: 'notice' }); - }); + if($('#tt-' + notifyType + '-only').hasClass('active')) + $('#nav-' + notifyType + '-menu [data-thread_top=false]').hide(); - $(data.info).each(function(){ - $.jGrowl(this.message, { sticky: false, theme: 'info', life: 10000 }); - }); - }) - if(timer) clearTimeout(timer); - timer = setTimeout(updateInit,updateInterval); + if($('#cn-' + notifyType + '-input').length) { + var filter = $('#cn-' + notifyType + '-input').val().toString().toLowerCase(); + if(filter) { + $('#nav-' + notifyType + '-menu .notification').each(function(i, el){ + var cn = $(el).data('contact_name').toString().toLowerCase(); + if(cn.indexOf(filter) === -1) + $(el).addClass('d-none'); + else + $(el).removeClass('d-none'); + }); + } + } } function contextualHelp() { @@ -687,6 +735,11 @@ function updateInit() { // if($('#live-cards').length) { src = 'cards'; } // if($('#live-articles').length) { src = 'articles'; } + if (initialLoad && (sessionStorage.getItem('notifications_cache') !== null)) { + var cached_data = JSON.parse(sessionStorage.getItem('notifications_cache')); + notificationsUpdate(cached_data); + } + if(! src) { notificationsUpdate(); } @@ -716,6 +769,9 @@ function liveUpdate(notify_id) { return; } + if(timer) + clearTimeout(timer); + if(livetime !== null) livetime = null; @@ -772,7 +828,7 @@ function liveUpdate(notify_id) { // else data was valid - reset the recursion counter liveRecurse = 0; - if(typeof notify_id !== 'undefined') { + if(typeof notify_id !== 'undefined' && notify_id !== 'undefined') { $.post( "hq", { @@ -876,54 +932,35 @@ function justifyPhotosAjax(id) { $('#' + id).justifiedGallery('norewind').on('jg.complete', function(e){ justifiedGalleryActive = false; }); } -function notify_popup_loader(notifyType) { +function loadNotificationItems(notifyType) { + var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : ''); - /* notifications template - different for navbar and notifications widget */ - var navbar_notifications_tpl= unescape($("#navbar-notifications-template[rel=template]").html()); - var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); - var notifications_all = unescape($('<div>').append( $("#nav-" + notifyType + "-see-all").clone() ).html()); //outerHtml hack - var notifications_mark = unescape($('<div>').append( $("#nav-" + notifyType + "-mark-all").clone() ).html()); //outerHtml hack - var notifications_tt_only = unescape($('<div>').append( $("#tt-" + notifyType + "-only").clone() ).html()); //outerHtml hack - var notifications_empty = unescape($("#nav-" + notifyType + "-menu").html()); + var clicked = $('[data-type=\'' + notifyType + '\']').data('clicked'); - var notify_menu = $("#nav-" + notifyType + "-menu"); + if((clicked === undefined) && (sessionStorage.getItem(notifyType + '_notifications_cache') !== null)) { + var cached_data = JSON.parse(sessionStorage.getItem(notifyType + '_notifications_cache')); + handleNotificationsItems(notifyType, cached_data); + $('[data-type=\'' + notifyType + '\']').data('clicked',true); + console.log('updating ' + notifyType + ' notifications from cache...'); + } + else { + var cached_data = []; + } - var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : ''); + console.log('updating ' + notifyType + ' notifications...'); $.get(pingExCmd, function(data) { - - if(data.invalid == 1) { + if(data.invalid == 1) { window.location.href=window.location.href; } - $("#navbar-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only); - $("#nav-" + notifyType + "-menu").html(notifications_all + notifications_mark + notifications_tt_only); - - $("." + notifyType + "-update").html(data.notify.length); - - $(data.notify).each(function() { - html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top); - $("#navbar-" + notifyType + "-menu").append(html); - html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top); - $("#nav-" + notifyType + "-menu").append(html); - }); - - $(".dropdown-menu img[data-src], .notification img[data-src]").each(function(i, el){ - // Replace data-src attribute with src attribute for every image - $(el).attr('src', $(el).data("src")); - $(el).removeAttr("data-src"); - }); - - if($('#tt-' + notifyType + '-only').hasClass('active')) - $('#nav-' + notifyType + '-menu [data-thread_top=false]').hide(); - }); - - - setTimeout(function() { - if(notify_menu.hasClass('show')) { - console.log('updating ' + notifyType + ' notifications...'); - setTimeout(notify_popup_loader, updateInterval, notifyType); + if(JSON.stringify(cached_data[0]) === JSON.stringify(data.notify[0])) { + console.log(notifyType + ' notifications cache up to date - update deferred'); } - }, 1000); + else { + handleNotificationsItems(notifyType, data.notify); + sessionStorage.setItem(notifyType + '_notifications_cache', JSON.stringify(data.notify)); + } + }); } // Since our ajax calls are asynchronous, we will give a few diff --git a/view/pdl/mod_go.pdl b/view/pdl/mod_go.pdl new file mode 100644 index 000000000..c34898dd5 --- /dev/null +++ b/view/pdl/mod_go.pdl @@ -0,0 +1,6 @@ +[region=aside] +[widget=fullprofile][/widget] +[/region] +[region=right_aside] +[widget=notifications][/widget] +[/region] diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index b12d80ea5..73ae8f6d2 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -8,8 +8,7 @@ head_add_css('/library/datetimepicker/jquery.datetimepicker.css'); head_add_css('/library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css'); require_once('view/php/theme_init.php'); -head_add_js('/library/popper/popper.min.js'); -head_add_js('/library/bootstrap/js/bootstrap.min.js'); +head_add_js('/library/bootstrap/js/bootstrap.bundle.min.js'); head_add_js('/library/bootbox/bootbox.min.js'); head_add_js('/library/bootstrap-tagsinput/bootstrap-tagsinput.js'); head_add_js('/library/datetimepicker/jquery.datetimepicker.js'); diff --git a/view/tpl/admin_accounts.tpl b/view/tpl/admin_accounts.tpl index 3535363a0..d6c9591fd 100755 --- a/view/tpl/admin_accounts.tpl +++ b/view/tpl/admin_accounts.tpl @@ -41,7 +41,7 @@ </tbody> </table> <div class="selectall"><a href="#" onclick="return toggle_selectall('pending_ckbx');">{{$select_all}}</a></div> - <div class="submit"><input type="submit" name="page_users_deny" value="{{$deny}}"> <input type="submit" name="page_users_approve" value="{{$approve}}"></div> + <div class="submit"><input type="submit" name="page_accounts_deny" value="{{$deny}}"> <input type="submit" name="page_accounts_approve" value="{{$approve}}"></div> {{else}} <p>{{$no_pending}}</p> {{/if}} @@ -80,7 +80,7 @@ </tbody> </table> <div class="selectall"><a href="#" onclick="return toggle_selectall('users_ckbx');">{{$select_all}}</a></div> - <div class="submit"><input type="submit" name="page_users_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_users_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div> + <div class="submit"><input type="submit" name="page_accounts_block" value="{{$block}}/{{$unblock}}"> <input type="submit" name="page_accounts_delete" value="{{$delete}}" onclick="return confirm_delete_multi()"></div> {{else}} NO USERS?!? {{/if}} diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index 97c14b6e3..0eabe620d 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -74,6 +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}} <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> @@ -82,6 +83,7 @@ {{include file="field_checkbox.tpl" field=$feed_contacts}} {{include file="field_checkbox.tpl" field=$force_publish}} {{include file="field_checkbox.tpl" field=$disable_discover_tab}} + {{include file="field_checkbox.tpl" field=$site_firehose}} <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> diff --git a/view/tpl/atom_feed.tpl b/view/tpl/atom_feed.tpl index b1e92cdbf..8dc145ae9 100755 --- a/view/tpl/atom_feed.tpl +++ b/view/tpl/atom_feed.tpl @@ -13,7 +13,7 @@ <id>{{$feed_id}}</id> <title>{{$feed_title}}</title> - <generator uri="http://hubzilla.org" version="{{$version}}">{{$red}}</generator> + <generator uri="{{$generator_uri}}" version="{{$version}}">{{$generator}}</generator> <link rel="license" href="http://creativecommons.org/licenses/by/3.0/" /> {{if $profile_page}} <link rel="alternate" type="text/html" href="{{$profile_page}}" /> diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 62530c1de..3b51971ec 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -19,14 +19,6 @@ </div> {{/if}} <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text" placeholder="{{$comment}}" name="body" ondragenter="linkdropper(event);" ondragleave="linkdropexit(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" ></textarea> - {{if $qcomment}} - <select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" > - <option value=""></option> - {{foreach $qcomment as $qc}} - <option value="{{$qc}}">{{$qc}}</option> - {{/foreach}} - </select> - {{/if}} <div id="comment-tools-{{$id}}" class="pt-2 comment-tools"> <div id="comment-edit-bb-{{$id}}" class="btn-toolbar pull-left"> <div class="btn-group mr-2"> diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl index cfb7ae67e..32973353e 100755 --- a/view/tpl/connections.tpl +++ b/view/tpl/connections.tpl @@ -5,7 +5,7 @@ <i class="fa fa-search"></i> {{$label}} </button> <button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$sort}}"> - <i class="fa fa-sort"></i> + <i class="fa fa-filter"></i> </button> <div class="dropdown-menu dropdown-menu-right"> {{foreach $tabs as $menu}} @@ -25,7 +25,7 @@ </div> </form> </div> - <div id="connections-wrapper clearfix"> + <div class="connections-wrapper clearfix"> {{foreach $contacts as $contact}} {{include file="connection_template.tpl"}} {{/foreach}} diff --git a/view/tpl/cropbody.tpl b/view/tpl/cropbody.tpl index 01d9a24a0..d35546ec6 100755 --- a/view/tpl/cropbody.tpl +++ b/view/tpl/cropbody.tpl @@ -6,36 +6,27 @@ <img src="{{$image_url}}" id="croppa" class="imgCrop" alt="{{$title}}" /> </div> <div id="cropimage-preview-wrapper" > -<div id="previewWrap" ></div> +<div id="previewWrap" class="crop-preview" style="height: 300px; width: 300px; max-width: 300px; max-height: 300px; overflow: hidden;"></div> </div> <script type="text/javascript" language="javascript"> - function onEndCrop( coords, dimensions ) { - $( 'x1' ).value = coords.x1; - $( 'y1' ).value = coords.y1; - $( 'x2' ).value = coords.x2; - $( 'y2' ).value = coords.y2; - $( 'width' ).value = dimensions.width; - $( 'height' ).value = dimensions.height; - } - - Event.observe( window, 'load', function() { - new Cropper.ImgWithPreview( - 'croppa', - { - previewWrap: 'previewWrap', - minWidth: 300, - minHeight: 300, - maxWidth: 1024, - maxHeight: 1024, - ratioDim: { x: 100, y:100 }, - displayOnInit: true, - onEndCrop: onEndCrop - } - ); - } - ); + +var image = document.getElementById('croppa'); +var cropper = new Cropper(image, { + aspectRatio: 1 / 1, + viewMode: 1, + preview: '.crop-preview', + crop: function(e) { + $( 'x1' ).value = e.detail.x; + $( 'y1' ).value = e.detail.y; + $( 'x2' ).value = e.detail.x + e.detail.width; + $( 'y2' ).value = e.detail.y + e.detail.height; + $( 'width' ).value = e.detail.scaleX; + $( 'height' ).value = e.detail.scaleY; + + } +}); </script> diff --git a/view/tpl/cropcover.tpl b/view/tpl/cropcover.tpl index 04b96a603..8888a967a 100755 --- a/view/tpl/cropcover.tpl +++ b/view/tpl/cropcover.tpl @@ -6,36 +6,26 @@ <img src="{{$image_url}}" id="croppa" class="imgCrop" alt="{{$title}}" /> </div> <div id="cropimage-preview-wrapper" > -<div id="previewWrap" ></div> +<div id="previewWrap" class="crop-preview" style="width: 320px; height: 116px; max-width: 320px; max-height: 116px; overflow: hidden"></div> </div> <script type="text/javascript" language="javascript"> - function onEndCrop( coords, dimensions ) { - $( 'x1' ).value = coords.x1; - $( 'y1' ).value = coords.y1; - $( 'x2' ).value = coords.x2; - $( 'y2' ).value = coords.y2; - $( 'width' ).value = dimensions.width; - $( 'height' ).value = dimensions.height; - } - - Event.observe( window, 'load', function() { - new Cropper.ImgWithPreview( - 'croppa', - { - previewWrap: 'previewWrap', - minWidth: 240, - minHeight: 87, - maxWidth: 320, - maxHeight: 116, - ratioDim: { x: 100, y:36 }, - displayOnInit: true, - onEndCrop: onEndCrop - } - ); - } - ); +var image = document.getElementById('croppa'); +var cropper = new Cropper(image, { + aspectRatio: 2.75 / 1, + viewMode: 1, + preview: '.crop-preview', + crop: function(e) { + $( 'x1' ).value = e.detail.x; + $( 'y1' ).value = e.detail.y; + $( 'x2' ).value = e.detail.x + e.detail.width; + $( 'y2' ).value = e.detail.y + e.detail.height; + $( 'width' ).value = e.detail.scaleX; + $( 'height' ).value = e.detail.scaleY; + + } +}); </script> diff --git a/view/tpl/crophead.tpl b/view/tpl/crophead.tpl index 48f375426..a5a80c187 100755 --- a/view/tpl/crophead.tpl +++ b/view/tpl/crophead.tpl @@ -1,4 +1,3 @@ - <script type="text/javascript" src="library/cropper/lib/prototype.js" language="javascript"></script> - <script type="text/javascript" src="library/cropper/lib/scriptaculous.js?load=effects,builder,dragdrop" language="javascript"></script> - <script type="text/javascript" src="library/cropper/cropper.js" language="javascript"></script> - <link rel="stylesheet" href="library/cropper/cropper.css" type="text/css" /> +<script type="text/javascript" src="library/cropperjs/dist/cropper.js" language="javascript"></script> +<link rel="stylesheet" href="library/cropperjs/dist/cropper.css" type="text/css" /> + diff --git a/view/tpl/email_validation.tpl b/view/tpl/email_validation.tpl new file mode 100644 index 000000000..f049a040f --- /dev/null +++ b/view/tpl/email_validation.tpl @@ -0,0 +1,16 @@ +<h2>{{$title}}</h2> + +<div class="descriptive-paragraph" style="font-size: 1.2em;"><p>{{$desc}}</p></div> + +<form action="email_validation" method="post"> +{{include file="field_input.tpl" field=$token}} + +<div class="pull-right"> + <a href="email_resend/{{$email}}" class="btn btn-warning">{{$resend}}</a> +</div> +<div class="submit-wrapper" > + <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> +</div> +</form> +<div class="clear"></div> + diff --git a/view/tpl/go.tpl b/view/tpl/go.tpl new file mode 100644 index 000000000..f0f9ee79e --- /dev/null +++ b/view/tpl/go.tpl @@ -0,0 +1,16 @@ +<h2>{{$title}}</h2> + +<div class="descriptive-text"> + <p>{{$m}}</p> + <p>{{$m1}}</p> +</div> + +{{if $options}} +<ul class="nav nav-pills flex-column"> +{{foreach $options as $k => $v}} + <li class="nav-item"><a href="{{$k}}" class="nav-link">{{$v}}</a></li> +{{/foreach}} +</ul> +{{/if}} + + diff --git a/view/tpl/hdr.tpl b/view/tpl/hdr.tpl index 29137c740..e69de29bb 100644 --- a/view/tpl/hdr.tpl +++ b/view/tpl/hdr.tpl @@ -1,3 +0,0 @@ -<div id="navbar-notifications-template" rel="template" style="display:none;"> - <a class="dropdown-item clearfix dropdown-notification {5}" href="{0}" title="{2} {3}"><img class="menu-img-3" data-src="{1}"><span class="contactname">{2}</span><span class="dropdown-sub-text">{3}<br>{4}</span></a> -</div>
\ No newline at end of file diff --git a/view/tpl/hq.tpl b/view/tpl/hq.tpl index fce11ff83..099d892bb 100755 --- a/view/tpl/hq.tpl +++ b/view/tpl/hq.tpl @@ -1,13 +1,3 @@ -{{if $no_messages}} -<div class="alert alert-warning alert-dismissible fade show" role="alert"> - <button type="button" class="close" data-dismiss="alert" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - <h3>{{$no_messages_label.0}}</h3> - <br> - {{$no_messages_label.1}} -</div> -{{/if}} <div id="jot-popup"> {{$editor}} </div> diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index ffaa4e208..0ffc8b349 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -110,10 +110,21 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { + /* enable tinymce on focus and click */ $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); + $('#id_mimetype').on('load', jotSetMime); + $('#id_mimetype').on('change', jotSetMime); + + function jotSetMime() { + var mtype = $('#id_mimetype').val(); + if(mtype == 'text/bbcode') + $('#profile-jot-submit-left').show(); + else + $('#profile-jot-submit-left').hide(); + } $('#invisible-wall-file-upload').fileupload({ url: 'wall_attach/{{$nickname}}', diff --git a/view/tpl/navbar_tucson.tpl b/view/tpl/navbar_tucson.tpl index 08fc40656..2c9570938 100755 --- a/view/tpl/navbar_tucson.tpl +++ b/view/tpl/navbar_tucson.tpl @@ -16,12 +16,9 @@ {{/if}} </div> {{/if}} - - - {{if $userinfo}} -<div class="dropdown usermenu"> - <div class="fakelink" data-toggle="dropdown"> +<div class="dropdown"> + <div class="fakelink usermenu" data-toggle="dropdown"> <img id="avatar" src="{{$userinfo.icon}}" alt="{{$userinfo.name}}"> <i class="fa fa-caret-down"></i> </div> @@ -31,7 +28,7 @@ <a class="dropdown-item{{if $usermenu.2}} active{{/if}}" href="{{$usermenu.0}}" title="{{$usermenu.3}}" role="menuitem" id="{{$usermenu.4}}">{{$usermenu.1}}</a> {{/foreach}} {{if $nav.manage}} - <a class="dropdown-item{{if $sel.active == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> + <a class="dropdown-item{{if $sel.name == Manage}} active{{/if}}" href="{{$nav.manage.0}}" title="{{$nav.manage.3}}" role="menuitem" id="{{$nav.manage.4}}">{{$nav.manage.1}}</a> {{/if}} {{if $nav.channels}} {{foreach $nav.channels as $chan}} @@ -43,7 +40,11 @@ {{/if}} {{if $nav.settings}} <div class="dropdown-divider"></div> - <a class="dropdown-item{{if $sel.active == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> + <a class="dropdown-item{{if $sel.name == Settings}} active{{/if}}" href="{{$nav.settings.0}}" title="{{$nav.settings.3}}" role="menuitem" id="{{$nav.settings.4}}">{{$nav.settings.1}}</a> + {{/if}} + {{if $nav.admin}} + <div class="dropdown-divider"></div> + <a class="dropdown-item{{if $sel.name == Admin}} active{{/if}}" href="{{$nav.admin.0}}" title="{{$nav.admin.3}}" role="menuitem" id="{{$nav.admin.4}}">{{$nav.admin.1}}</a> {{/if}} {{if $nav.logout}} <div class="dropdown-divider"></div> @@ -51,7 +52,6 @@ {{/if}} </div> {{/if}} - {{if ! $is_owner}} <div class="dropdown-menu" role="menu" aria-labelledby="avatar"> <a class="dropdown-item" href="{{$nav.rusermenu.0}}" role="menuitem">{{$nav.rusermenu.1}}</a> @@ -59,129 +59,37 @@ </div> {{/if}} </div> +{{if $sel.name}} +<div id="nav-app-link-wrapper" class="navbar-nav mr-auto"> + <a id="nav-app-link" href="{{$url}}" class="nav-link text-truncate"> + {{$sel.name}} + {{if $sitelocation}} + <br><small>{{$sitelocation}}</small> + {{/if}} + </a> +</div> {{/if}} - - - -{{if $navbar_apps}} -<ul class="navbar-nav mr-auto d-none d-xl-flex"> -{{foreach $navbar_apps as $navbar_app}} -<li> -{{$navbar_app}} -</li> -{{/foreach}} -</ul> {{/if}} - - <div class="navbar-toggler-right"> - {{if $nav.help.6}} <button id="context-help-btn" class="navbar-toggler border-0" type="button" onclick="contextualHelp(); return false;"> <i class="fa fa-question-circle"></i> </button> {{/if}} - - <button id="expand-aside" type="button" class="navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1"> + <button id="expand-aside" type="button" class="d-lg-none navbar-toggler border-0" data-toggle="offcanvas" data-target="#region_1"> <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" data-toggle="collapse" data-target="#navbar-collapse-1"> - <i id="notifications-btn-icon-1" class="fa fa-exclamation notifications-btn-icon"></i> + <button id="notifications-btn-1" type="button" class="navbar-toggler border-0 text-white notifications-btn"> + <i id="notifications-btn-icon-1" class="fa fa-exclamation-circle notifications-btn-icon"></i> </button> {{/if}} - <button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2"> <i class="fa fa-bars"></i> </button> </div> - - - - - <div class="collapse navbar-collapse" id="navbar-collapse-1"> - <ul class="navbar-nav mr-auto"> - {{if $nav.network}} - <li class="nav-item dropdown network-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.network.3}}" id="{{$nav.network.4}}" data-toggle="dropdown" rel="#navbar-network-menu"> - <i class="fa fa-fw fa-th"></i> - <span class="badge badge-pill badge-secondary network-update"></span> - </a> - <div id="navbar-network-menu" class="dropdown-menu" rel="network"> - <a class="dropdown-item" id="nav-network-see-all" href="{{$nav.network.all.0}}">{{$nav.network.all.1}}</a> - <a class="dropdown-item" id="nav-network-mark-all" href="#" onclick="markRead('network'); return false;">{{$nav.network.mark.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.home}} - <li class="nav-item dropdown home-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.home.3}}" id="{{$nav.home.4}}" data-toggle="dropdown" rel="#navbar-home-menu"> - <i class="fa fa-fw fa-home"></i> - <span class="badge badge-pill badge-danger home-update"></span> - </a> - <div id="navbar-home-menu" class="dropdown-menu" rel="home"> - <a class="dropdown-item" id="nav-home-see-all" href="{{$nav.home.all.0}}">{{$nav.home.all.1}}</a> - <a class="dropdown-item" id="nav-home-mark-all" href="#" onclick="markRead('home'); return false;">{{$nav.home.mark.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.messages}} - <li class="nav-item dropdown mail-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.messages.3}}" id="{{$nav.messages.4}}" data-toggle="dropdown" rel="#navbar-mail-menu"> - <i class="fa fa-fw fa-envelope"></i> - <span class="badge badge-pill badge-danger mail-update"></span> - </a> - <div id="navbar-mail-menu" class="dropdown-menu" rel="messages"> - <a class="dropdown-item" id="nav-messages-see-all" href="{{$nav.messages.all.0}}">{{$nav.messages.all.1}}</a> - <a class="dropdown-item" id="nav-messages-mark-all" href="#" onclick="markRead('messages'); return false;">{{$nav.messages.mark.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.all_events}} - <li class="nav-item dropdown all_events-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.all_events.3}}" id="{{$nav.all_events.4}}" data-toggle="dropdown" rel="#navbar-all_events-menu"> - <i class="fa fa-fw fa-calendar"></i> - <span class="badge badge-pill badge-secondary all_events-update"></span> - </a> - <div id="navbar-all_events-menu" class="dropdown-menu" rel="all_events"> - <a class="dropdown-item" id="nav-all_events-see-all" href="{{$nav.all_events.all.0}}">{{$nav.all_events.all.1}}</a> - <a class="dropdown-item" id="nav-all_events-mark-all" href="#" onclick="markRead('all_events'); return false;">{{$nav.all_events.mark.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.intros}} - <li class="nav-item dropdown intros-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.intros.3}}" id="{{$nav.intros.4}}" data-toggle="dropdown" rel="#navbar-intros-menu"> - <i class="fa fa-fw fa-users"></i> - <span class="badge badge-pill badge-danger intros-update"></span> - </a> - <div id="navbar-intros-menu" class="dropdown-menu" rel="intros"> - <a class="dropdown-item" id="nav-intros-see-all" href="{{$nav.intros.all.0}}">{{$nav.intros.all.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.notifications}} - <li class="nav-item dropdown notify-button" style="display: none;"> - <a class="nav-link" href="#" title="{{$nav.notifications.1}}" id="{{$nav.notifications.4}}" data-toggle="dropdown" rel="#navbar-notify-menu"> - <i class="fa fa-fw fa-exclamation"></i> - <span class="badge badge-pill badge-danger notify-update"></span> - </a> - <div id="navbar-notify-menu" class="dropdown-menu" rel="notify"> - <a class="dropdown-item" id="nav-notify-see-all" href="{{$nav.notifications.all.0}}">{{$nav.notifications.all.1}}</a> - <a class="dropdown-item" id="nav-notify-mark-all" href="#" onclick="markRead('notify'); return false;">{{$nav.notifications.mark.1}}</a> - {{$emptynotifications}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - </li> - {{/if}} - {{if $nav.login && !$userinfo}} <li class="nav-item d-none d-xl-flex"> {{if $nav.loginmenu.1.4}} @@ -205,16 +113,11 @@ <a class="nav-link" href="{{$nav.alogout.0}}" title="{{$nav.alogout.3}}" id="{{$nav.alogout.4}}">{{$nav.alogout.1}}</a> </li> {{/if}} - </ul> + <div id="banner" class="navbar-text">{{$banner}}</div> - - - <div id="banner" class="navbar-text d-none d-xl-flex">{{$banner}}</div> - - - <ul id="nav-right" class="navbar-nav ml-auto d-none d-xl-flex"> + <ul id="nav-right" class="navbar-nav ml-auto"> <li class="nav-item collapse clearfix" id="nav-search"> <form class="form-inline" method="get" action="search" role="search"> <input class="form-control form-control-sm mt-1 mr-2" id="nav-search-text" type="text" value="" placeholder=" {{$help}}" name="search" title="{{$nav.search.3}}" onclick="this.submit();" onblur="closeMenu('nav-search'); openMenu('nav-search-btn');"/> @@ -236,7 +139,7 @@ <a class="nav-link text-white notifications-btn" href="#"><i id="notifications-btn-icon" class="fa fa-exclamation-circle notifications-btn-icon"></i></a> </li> {{/if}} - {{if $channel_apps.0}} + {{if $channel_menu && $channel_apps.0}} <li class="nav-item dropdown" id="channel-menu"> <a class="nav-link" href="#" data-toggle="dropdown"><img src="{{$channel_thumb}}" style="height:14px; width:14px;position:relative; top:-2px;" /></a> <div id="dropdown-menu" class="dropdown-menu dropdown-menu-right"> @@ -246,12 +149,32 @@ </div> </li> {{/if}} + {{if $navbar_apps}} + {{foreach $navbar_apps as $navbar_app}} + <li> + {{$navbar_app}} + </li> + {{/foreach}} + {{/if}} <li class="nav-item dropdown" id="app-menu"> <a class="nav-link" href="#" data-toggle="dropdown"><i class="fa fa-fw fa-bars"></i></a> <div id="dropdown-menu" class="dropdown-menu dropdown-menu-right"> + {{if $channel_apps.0 && ! $channel_menu}} + {{foreach $channel_apps as $channel_app}} + {{$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');"> + {{$sysapps_toggle}} + </div> + <div id="sys_apps" style="display:none;"> + {{/if}} {{foreach $nav_apps as $nav_app}} {{$nav_app}} {{/foreach}} + {{if $channel_apps.0 && ! $channel_menu}} + </div> + {{/if}} {{if $is_owner}} <div class="dropdown-divider"></div> <a class="dropdown-item" href="/apps"><i class="generic-icons-nav fa fa-fw fa-plus-circle"></i>{{$addapps}}</a> @@ -261,8 +184,6 @@ </li> </ul> </div> - - <div class="collapse d-lg-none" id="navbar-collapse-2"> <div class="navbar-nav mr-auto"> {{if $channel_apps.0}} @@ -274,6 +195,9 @@ </div> <div id="sys-apps-collapsed" style="display:none;"> {{/if}} + {{foreach $navbar_apps as $navbar_app}} + {{$navbar_app}} + {{/foreach}} {{foreach $nav_apps as $nav_app}} {{$nav_app|replace:'dropdown-item':'nav-link'}} {{/foreach}} diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 9d2e08c41..211e8e05b 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -21,7 +21,7 @@ }; }); - {{if $module == 'display' || $module == 'hq'}} + {{if $module == 'display' || $module == 'hq' || $startpage == 'hq'}} $(document).on('click', '.notification', function(e) { var b64mid = $(this).data('b64mid'); var notify_id = $(this).data('notify_id'); @@ -31,30 +31,42 @@ if(b64mid === 'undefined' && notify_id === 'undefined') return; - {{if $module == 'display'}} - history.pushState(stateObj, '', 'display/' + b64mid); - {{/if}} - {{if $module == 'hq'}} - history.pushState(stateObj, '', 'hq/' + b64mid); - {{/if}} - - {{if $module == 'hq'}} - if(b64mid !== 'undefined') { - {{else}} - if(path === 'display' && b64mid) { - {{/if}} + {{if $module != 'hq' && $startpage == 'hq'}} e.preventDefault(); + if(typeof notify_id !== 'undefined' && notify_id !== 'undefined') { + $.post( + "hq", + { + "notify_id" : notify_id + } + ); + } + window.location.href = 'hq/' + b64mid; + return; + {{else}} + {{if $module == 'display'}} + history.pushState(stateObj, '', 'display/' + b64mid); + {{/if}} - if(! page_load) { - if($(this).parent().attr('id') !== 'nav-pubs-menu') - $(this).fadeOut(); + {{if $module == 'hq'}} + history.pushState(stateObj, '', 'hq/' + b64mid); + {{/if}} - getData(b64mid, notify_id); - } + {{if $module == 'hq'}} + if(b64mid !== 'undefined') { + {{else}} + if(path === 'display' && b64mid) { + {{/if}} + e.preventDefault(); - if($('#notifications_wrapper').hasClass('fs')) - $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); - } + if(! page_load) { + getData(b64mid, notify_id); + } + + if($('#notifications_wrapper').hasClass('fs')) + $('#notifications_wrapper').prependTo('#' + notifications_parent).removeClass('fs'); + } + {{/if}} }); {{/if}} @@ -65,6 +77,33 @@ $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggle(); $(this).toggleClass('active sticky-top'); }); + $(document).on('click ', '#cn-{{$notification.type}}-input-clear', function(e) { + $('#cn-{{$notification.type}}-input').val(''); + $('#cn-{{$notification.type}}-only').removeClass('active sticky-top'); + $("#nav-{{$notification.type}}-menu .notification").removeClass('d-none'); + $('#cn-{{$notification.type}}-input-clear').addClass('d-none'); + }); + $(document).on('input', '#cn-{{$notification.type}}-input', function(e) { + var val = $('#cn-{{$notification.type}}-input').val().toString().toLowerCase(); + + if(val) { + $('#cn-{{$notification.type}}-only').addClass('active sticky-top'); + $('#cn-{{$notification.type}}-input-clear').removeClass('d-none'); + } + else { + $('#cn-{{$notification.type}}-only').removeClass('active sticky-top'); + $('#cn-{{$notification.type}}-input-clear').addClass('d-none'); + } + + $("#nav-{{$notification.type}}-menu .notification").each(function(i, el){ + var cn = $(el).data('contact_name').toString().toLowerCase(); + + if(cn.indexOf(val) === -1) + $(this).addClass('d-none'); + else + $(this).removeClass('d-none'); + }); + }); {{/if}} {{/foreach}} @@ -88,21 +127,21 @@ <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> </div> - <div id="notifications" class="navbar-nav" data-children=".nav-item"> - <div id="nav-notifications-template" rel="template"> - <a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}"> - <img class="menu-img-3" data-src="{1}"> - <span class="contactname">{2}</span> - <span class="dropdown-sub-text">{3}<br>{4}</span> - </a> - </div> + <div id="nav-notifications-template" rel="template"> + <a class="list-group-item clearfix notification {5}" href="{0}" title="{2} {3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}" data-contact_name="{2}"> + <img class="menu-img-3" data-src="{1}"> + <span class="contactname">{2}</span> + <span class="dropdown-sub-text">{3}<br>{4}</span> + </a> + </div> + <div id="notifications" class="navbar-nav"> {{foreach $notifications as $notification}} <div class="collapse {{$notification.type}}-button"> - <a class="list-group-item" href="#nav-{{$notification.type}}-menu" title="{{$notification.title}}" data-toggle="collapse" data-parent="#notifications" rel="#nav-{{$notification.type}}-menu"> + <a class="list-group-item notification-link" href="#" title="{{$notification.title}}" data-target="#nav-{{$notification.type}}-sub" data-toggle="collapse" data-type="{{$notification.type}}"> <i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}} <span class="float-right badge badge-{{$notification.severity}} {{$notification.type}}-update"></span> </a> - <div id="nav-{{$notification.type}}-menu" class="collapse notification-content" rel="{{$notification.type}}"> + <div id="nav-{{$notification.type}}-sub" class="collapse notification-content" data-parent="#notifications" data-type="{{$notification.type}}"> {{if $notification.viewall}} <a class="list-group-item text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}"> <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}} @@ -117,8 +156,14 @@ <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> <i class="fa fa-fw fa-filter"></i> {{$notification.filter.label}} </div> + <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> + <input id="cn-{{$notification.type}}-input" type="text" class="form-control form-control-sm" placeholder=" Filter by name"> + <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div> + </div> {{/if}} - {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> + <div id="nav-{{$notification.type}}-menu" class=""> + {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> + </div> </div> </div> {{/foreach}} diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl index 493dba4c8..335d5f979 100755 --- a/view/tpl/register.tpl +++ b/view/tpl/register.tpl @@ -12,7 +12,9 @@ {{/if}} {{if $registertext}} - <div id="register-text" class="descriptive-paragraph">{{$registertext}}</div> + <div class="section-content-info-wrapper"> + <div id="register-text" class="descriptive-paragraph">{{$registertext}}</div> + </div> {{/if}} {{if $invitations}} diff --git a/view/tpl/settings_permcats.tpl b/view/tpl/settings_permcats.tpl index f6bb9b036..bbbd41669 100644 --- a/view/tpl/settings_permcats.tpl +++ b/view/tpl/settings_permcats.tpl @@ -50,7 +50,7 @@ <table id="permcat-index"> {{foreach $permcats as $k => $v}} <tr class="permcat-row-{{$k}}"> - <td width="99%"><a href="settings/permcats/{{$k}}">{{$k}}</a></td> + <td width="99%"><a href="settings/permcats/{{$k}}">{{$v}}</a></td> <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('/settings/permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td> </tr> {{/foreach}} |