diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/js/autocomplete.js | 2 | ||||
-rw-r--r-- | view/js/main.js | 32 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 5 | ||||
-rw-r--r-- | view/theme/redbasic/schema/dark.css | 41 | ||||
-rw-r--r-- | view/tpl/app.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 6 | ||||
-rwxr-xr-x | view/tpl/conv_list.tpl | 6 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 4 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 2 | ||||
-rw-r--r-- | view/tpl/privacy_groups.tpl | 1 |
10 files changed, 63 insertions, 40 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 6b77f0631..278a0a176 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -216,8 +216,6 @@ function string2bb(element) { }); textcomplete.register([contacts,forums,smilies,tags]); }); - - }; })( jQuery ); diff --git a/view/js/main.js b/view/js/main.js index a69bcfa64..ee11ab1c6 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -44,6 +44,17 @@ $(document).ready(function() { $(document).on('click', '.conversation-settings-link', getConversationSettings); $(document).on('click', '#settings_module_ajax_submit', postConversationSettings); + $(document).on('click focus', '.comment-edit-form textarea', function(e) { + if(! this.autocomplete_handled) { + /* autocomplete @nicknames */ + $(this).editor_autocomplete(baseurl+"/acl?f=&n=1"); + /* autocomplete bbcode */ + $(this).bbco_autocomplete('bbcode'); + + this.autocomplete_handled = true; + } + }); + var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);'); jQuery.timeago.settings.strings = { @@ -239,7 +250,11 @@ function handle_comment_form(e) { },10000); }); - function commentSaveChanges(convId,isFinal = false) { + function commentSaveChanges(convId, isFinal) { + + if(typeof isFinal === 'undefined') + isFinal = false; + if(auto_save_draft) { tmp = $('#' + emptyCommentElm).val(); if(tmp) { @@ -453,6 +468,9 @@ function notificationsUpdate(cached_data) { $.get(pingCmd,function(data) { // Put the object into storage + if(! data) + return; + sessionStorage.setItem('notifications_cache', JSON.stringify(data)); var fnotifs = []; @@ -751,11 +769,6 @@ function updateConvItems(mode,data) { mediaPlaying = false; }); - /* autocomplete @nicknames */ - $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); - /* autocomplete bbcode */ - $(".comment-edit-form textarea").bbco_autocomplete('bbcode'); - var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; })); var bimgcount = bimgs.length; @@ -888,7 +901,12 @@ function liveUpdate(notify_id) { if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; } - if(($('.comment-edit-text.expanded').length) || (in_progress) || (mediaPlaying)) { + // if auto updates are enabled and a comment box is open, + // prevent live updates until the comment is submitted + + var lockUpdates = (($('.comment-edit-text.expanded').length && (! bParam_static)) ? true : false); + + if(lockUpdates || in_progress || mediaPlaying) { if(livetime) { clearTimeout(livetime); } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index f2c1b7a48..18c3db665 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1803,3 +1803,8 @@ dl.bb-dl > dd > li { .hover-fx-show:hover .hover-fx-hide { opacity: 1; } + +/* default highlighted text if not specified by schema: */ +span.default-highlight { + background-color: yellow; +} diff --git a/view/theme/redbasic/schema/dark.css b/view/theme/redbasic/schema/dark.css index e958d9ee7..bf55fec72 100644 --- a/view/theme/redbasic/schema/dark.css +++ b/view/theme/redbasic/schema/dark.css @@ -322,20 +322,6 @@ a, a:visited, a:link, .fakelink, .fakelink:visited, .fakelink:link { .text-dark { color: #aaa !important; } -a.text-dark:focus, a.text-dark:hover { - color: #ddd !important; -} - -.badge-warning { - background-color: #ffc927; -} -.badge-warning a.text-dark { - color: #333 !important; -} -.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover { - color: red !important; - text-decoration: none; -} .group-selected, .fileas-selected, .categories-selected, .search-selected, a.active { color: #fff !important; @@ -492,10 +478,25 @@ pre { background-color: #222; } -/* change color of [hl] tag: */ -div.wall-item-body span /*strong:only-of-type */{ - color: #1212b6; - padding: 2px 3px; -/* font-weight: 500; */ - white-space: nowrap; + +/* category badge fix: */ +a.text-dark:focus, a.text-dark:hover { + color: #ddd !important; +} + +.badge-warning { +/* background-color: #ffc927; */ +} +.badge-warning a.text-dark { + color: #333 !important; +} +.badge-warning a.text-dark:focus, .badge-warning a.text-dark:hover { + color: red !important; + text-decoration: none; +} + +/* fix color for highlithed text */ +span.default-highlight { + color: #333; + border-radius: 4px; } diff --git a/view/tpl/app.tpl b/view/tpl/app.tpl index 6013f9548..cacbf7e64 100644 --- a/view/tpl/app.tpl +++ b/view/tpl/app.tpl @@ -31,8 +31,8 @@ <a class="dropdown-item{{if $app.active}} active{{/if}}" href="{{$app.url}}">{{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}</a> {{/if}} {{if $order}} -<a href="{{$hosturl}}appman/{{$app.guid}}/moveup" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-up"></i></a> -<a href="{{$hosturl}}appman/{{$app.guid}}/movedown" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-down"></i></a> +<a href="{{$hosturl}}appman/{{$app.guid}}/moveup{{if $pinned}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-up"></i></a> +<a href="{{$hosturl}}appman/{{$app.guid}}/movedown{{if $pinned}}/nav_pinned_app{{else}}/nav_featured_app{{/if}}" class="btn btn-outline-secondary btn-sm" style="margin-bottom: 5px;"><i class="generic-icons-nav fa fa-fw fa-arrow-down"></i></a> {{if $icon}}<i class="generic-icons-nav fa fa-fw fa-{{$icon}}"></i>{{else}}<img src="{{$app.photo}}" width="16" height="16" style="margin-right:9px;"/>{{/if}}{{$app.name}}<br> {{/if}} diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 7dddf9c01..69e09b272 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -9,12 +9,12 @@ <div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" > <div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}"> {{if $item.photo}} - <div class="wall-photo-item" id="wall-photo-item-{{$item.id}}"> + <div class="wall-photo-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-photo-item-{{$item.id}}"> {{$item.photo}} </div> {{/if}} {{if $item.event}} - <div class="wall-event-item" id="wall-event-item-{{$item.id}}"> + <div class="wall-event-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-event-item-{{$item.id}}"> {{$item.event}} </div> {{/if}} @@ -26,7 +26,7 @@ <hr class="m-0"> {{/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="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment && !$item.photo}} 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}}"> <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" /> diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl index c6da3d8a4..28e120d17 100755 --- a/view/tpl/conv_list.tpl +++ b/view/tpl/conv_list.tpl @@ -9,12 +9,12 @@ <div class="wall-item-outside-wrapper{{if $item.is_comment}} comment{{/if}}{{if $item.previewing}} preview{{/if}}" id="wall-item-outside-wrapper-{{$item.id}}" > <div class="clearfix wall-item-content-wrapper{{if $item.is_comment}} comment{{/if}}" id="wall-item-content-wrapper-{{$item.id}}"> {{if $item.photo}} - <div class="wall-photo-item" id="wall-photo-item-{{$item.id}}"> + <div class="wall-photo-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-photo-item-{{$item.id}}"> {{$item.photo}} </div> {{/if}} {{if $item.event}} - <div class="wall-event-item" id="wall-event-item-{{$item.id}}"> + <div class="wall-event-item{{if $item.is_new && !$item.title}} wall-item-head-new rounded-top{{/if}}" id="wall-event-item-{{$item.id}}"> {{$item.event}} </div> {{/if}} @@ -26,7 +26,7 @@ <hr class="m-0"> {{/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="p-2 clearfix wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment && !$item.photo}} 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}}"> <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> diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index 2670ba9e7..b286b6071 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -219,7 +219,7 @@ var activeCommentText = ''; } function linkdropper(event) { - var linkFound = event.dataTransfer.types.contains("text/uri-list"); + var linkFound = ((event.dataTransfer.types.indexOf("text/uri-list") > -1) ? true : false); if(linkFound) { event.preventDefault(); var editwin = '#' + event.target.id; @@ -256,7 +256,7 @@ var activeCommentText = ''; commentwin = ((editwin.indexOf('comment') >= 0) ? true : false); if(commentwin) { var commentid = editwin.substring(editwin.lastIndexOf('-') + 1); - commentOpen(document.getElementById(event.target.id),commentid); + $("#comment-edit-text-" + commentid).addClass("expanded"); } } diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 98047f1d9..bc7f80906 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -24,7 +24,7 @@ }); window.onpopstate = function(e) { - if(e.state !== null) + if(e.state !== null && e.state.b64mid !== bParam_mid) getData(e.state.b64mid, ''); }; }); diff --git a/view/tpl/privacy_groups.tpl b/view/tpl/privacy_groups.tpl index b4e27ef2c..327a15aee 100644 --- a/view/tpl/privacy_groups.tpl +++ b/view/tpl/privacy_groups.tpl @@ -8,6 +8,7 @@ <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{include file="field_input.tpl" field=$gname}} {{include file="field_checkbox.tpl" field=$public}} + {{$pgrp_extras}} <button type="submit" name="submit" class="btn btn-sm btn-primary float-right">{{$submit}}</button> </form> </div> |