diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/conversation.css | 2 | ||||
-rw-r--r-- | view/css/widgets.css | 18 | ||||
-rw-r--r-- | view/tpl/alt_pager.tpl | 4 | ||||
-rw-r--r-- | view/tpl/connections.tpl | 2 | ||||
-rw-r--r-- | view/tpl/follow.tpl | 2 | ||||
-rw-r--r-- | view/tpl/notes.tpl | 103 | ||||
-rw-r--r-- | view/tpl/notifications_widget.tpl | 69 | ||||
-rw-r--r-- | view/tpl/peoplefind.tpl | 2 | ||||
-rw-r--r-- | view/tpl/searchbox.tpl | 4 | ||||
-rw-r--r-- | view/tpl/wiki.tpl | 2 |
10 files changed, 152 insertions, 56 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css index dbb930fc7..88081c2c6 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -313,7 +313,7 @@ code { } code.inline-code { - padding: 0px 4px; + padding: 0.2em; display: inline; } diff --git a/view/css/widgets.css b/view/css/widgets.css index a67c10ed2..b78725919 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -41,13 +41,23 @@ li:hover .widget-nav-pills-icons { /* notes */ #note-text { - border: 1px solid rgba(0,0,0,.125); - padding: 5px; + padding: 7px 10px; width: 100%; resize: vertical; min-height: 250px; - overflow: auto; - outline: none; + overflow-y: auto; + overflow-x: hidden; +} + +#note-text-html { + padding: 7px 10px; + height: 250px; + width: 100%; + resize: vertical; + min-height: 250px; + overflow-y: auto; + overflow-x: hidden; + } /* saved searches */ diff --git a/view/tpl/alt_pager.tpl b/view/tpl/alt_pager.tpl index b46dc7662..94fa93401 100644 --- a/view/tpl/alt_pager.tpl +++ b/view/tpl/alt_pager.tpl @@ -1,4 +1,4 @@ <div class="pager"> -{{if $has_less}}<a href="{{$url}}&page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}} -{{if $has_more}}{{if $has_less}} | {{/if}}<a href="{{$url}}&page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}} +{{if $has_less}}<a href="{{$url}}?page={{$prevpage}}" class="pager-prev">{{$less}}</a>{{/if}} +{{if $has_more}}{{if $has_less}} | {{/if}}<a href="{{$url}}?page={{$nextpage}}" class="pager-next">{{$more}}</a>{{/if}} </div> diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl index f6ee1b1db..1719a6522 100644 --- a/view/tpl/connections.tpl +++ b/view/tpl/connections.tpl @@ -19,7 +19,7 @@ <form action="{{$cmd}}" method="get" id="mimimi" name="contacts-search-form"> <div class="input-group mb-3"> <input type="text" name="search" id="contacts-search" class="form-control" onfocus="this.select();" value="{{$search}}" placeholder="{{$desc}}" /> - <button id="contacts-search-submit" class="btn btn-sm btn-outline-secondary" type="submit"><i class="fa fa-fw fa-search"></i></button> + <button id="contacts-search-submit" class="btn btn-outline-secondary" type="submit"><i class="fa fa-fw fa-search"></i></button> </div> </form> </div> diff --git a/view/tpl/follow.tpl b/view/tpl/follow.tpl index 53325fdce..7adbc03ec 100644 --- a/view/tpl/follow.tpl +++ b/view/tpl/follow.tpl @@ -3,7 +3,7 @@ <form action="follow" method="post" /> <div class="input-group"> <input class="form-control" type="text" name="url" title="{{$hint}}" placeholder="{{$desc}}" /> - <button class="btn btn-sm btn-success" type="submit" name="submit" value="{{$follow}}" title="{{$follow}}"><i class="fa fa-fw fa-plus"></i></button> + <button class="btn btn-success" type="submit" name="submit" value="{{$follow}}" title="{{$follow}}"><i class="fa fa-fw fa-plus"></i></button> </div> </form> {{if $abook_usage_message}} diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index 0ae0604ef..3273b4145 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,37 +1,122 @@ {{if $app}} <div id="personal-notes" class="generic-content-wrapper{{if $hidden}} d-none{{/if}}"> - <div class="section-title-wrapper"> + <div class="section-title-wrapper clearfix"> + <div class="float-end rounded border border-secondary m-1 ps-1 pe-1 text-muted small note-mode" title="Double click into note for edit mode">Read mode</div> <h2>{{$banner}}</h2> </div> - <div class="section-content-wrapper"> + <div class="section-content-wrapper-np"> {{else}} <div id="personal-notes" class="widget{{if $hidden}} d-none{{/if}}"> - <h3>{{$banner}}</h3> + <div class="float-end rounded border border-secondary mb-1 ps-1 pe-1 text-muted small note-mode" title="Double click note for edit mode">Read mode</div> + <h3 class="float-start">{{$banner}}</h3> {{/if}} - <textarea name="note_text" id="note-text" class="{{if $app}}form-control border-0{{/if}}">{{$text}}</textarea> + <textarea name="note_text" id="note-text" class="form-control{{if $app}} border-0{{else}} p-1{{/if}}" style="display: none;">{{$text}}</textarea> + <div id="note-text-html" class="{{if !$app}}border rounded p-1{{/if}}">{{$html}}</div> <script> var noteSaveTimer = null; var noteText = $('#note-text'); + var noteTextHTML = $('#note-text-html'); + var noteMode = $('.note-mode'); + var noteEditing = false; + + noteText.bbco_autocomplete('bbcode'); $(document).on('focusout',"#note-text",function(e){ if(noteSaveTimer) clearTimeout(noteSaveTimer); + + noteEditing = false; notePostFinal(); noteSaveTimer = null; + setNoteMode(noteMode, 'saving'); }); - $(document).on('focusin',"#note-text",function(e){ - noteSaveTimer = setTimeout(noteSaveChanges,10000); + $(document).on('dblclick',"#note-text-html",function(e){ + noteEditing = 1; + noteText.show().focusin(); + noteText.height(noteTextHTML.outerHeight()); + noteText.scrollTop(noteTextHTML.scrollTop()); + noteTextHTML.hide(); + setNoteMode(noteMode, 'edit'); + + $(document).one('click', function(e) { + if (e.target.id !== 'note-text') { + noteTextHTML.show(); + noteTextHTML.height(noteText.outerHeight()); + noteTextHTML.scrollTop(noteText.scrollTop()); + noteText.hide(); + setNoteMode(noteMode, 'read'); + } + }); + + $(document).one('click', '#note-text', function(e){ + noteEditing = 2; + setNoteMode(noteMode, 'editing'); + noteSaveTimer = setTimeout(noteSaveChanges,10000); + }); + }); + + function notePostFinal() { - $.post('notes/sync', { 'note_text' : $('#note-text').val() }); + $.post( + 'notes/sync', + { + 'note_text' : noteText.val() + }, + function (data) { + noteTextHTML.html(data.html); + noteTextHTML.show(); + noteTextHTML.height(noteText.outerHeight()); + noteTextHTML.scrollTop(noteText.scrollTop()); + noteText.hide(); + setNoteMode(noteMode, 'saved'); + } + ); } function noteSaveChanges() { - $.post('notes', { 'note_text' : $('#note-text').val() }); - noteSaveTimer = setTimeout(noteSaveChanges,10000); + $.post('notes', { 'note_text' : noteText.val() }); + noteSaveTimer = setTimeout(noteSaveChanges, 10000); } + + function setNoteMode (obj, mode) { + switch(mode) { + case 'edit': + obj.removeClass('border-secondary border-success text-muted text-success') + obj.addClass('border-danger text-danger') + obj.html('Edit mode'); + break; + case 'editing': + obj.removeClass('border-secondary border-success text-muted text-success') + obj.addClass('border-danger text-danger') + obj.html('Editing...'); + break; + case 'saving': + obj.removeClass('border-secondary border-danger text-muted text-danger') + obj.addClass('border-success text-success') + obj.html('Saving...'); + break; + case 'saved': + obj.removeClass('border-secondary border-danger text-muted text-danger') + obj.addClass('border-success text-success') + obj.html('Saved'); + setTimeout(function () { + if(noteEditing) { + setNoteMode(noteMode, noteEditing === 1 ? 'edit' : 'editing'); + } + else { + setNoteMode(noteMode, 'read'); + } + }, 3000); + break; + case 'read': + default: + obj.removeClass('border-success border-danger text-success text-danger').addClass('border-secondary text-muted').html('Read mode'); + } + } + </script> {{if $app}} </div> diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 4ef98e2f9..fcadf71e5 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -315,6 +315,7 @@ } else { $('.' + type + '-update').html('0'); + $('#nav-' + type + '-sub').removeClass('show'); $('.' + type + '-button').fadeOut(function() { sse_setNotificationsStatus(); }); @@ -490,9 +491,10 @@ var fcount = Number($('.' + n[1] + '-update').html()); fcount--; $('.' + n[1] + '-update').html(fcount); - if(fcount < 1) + if(fcount < 1) { $('.' + n[1] + '-button').fadeOut(); - + $('#nav-' + n[1] + '-sub').removeClass('show'); + } var count = Number($(this).find('.bg-secondary').html()); count--; $(this).find('.bg-secondary').html(count); @@ -538,43 +540,42 @@ <i class="fa fa-{11} text-muted"></i> </a> </div> - <div id="notifications" class="border border-bottom-0 rounded navbar-nav collapse"> + <div id="notifications" class="border border-top-0 rounded navbar-nav collapse"> {{foreach $notifications as $notification}} - <div class="rounded list-group list-group-flush collapse {{$notification.type}}-button"> + <div class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse {{$notification.type}}-button"> <a id="notification-link-{{$notification.type}}" class="collapsed list-group-item fakelink notification-link" href="#" title="{{$notification.title}}" data-bs-target="#nav-{{$notification.type}}-sub" data-bs-toggle="collapse" data-sse_type="{{$notification.type}}"> <i class="fa fa-fw fa-{{$notification.icon}}"></i> {{$notification.label}} <span class="float-end badge bg-{{$notification.severity}} {{$notification.type}}-update"></span> </a> - <div id="nav-{{$notification.type}}-sub" class="list-group list-group-flush border-bottom collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}"> - {{if $notification.viewall}} - <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}"> - <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}} - </a> - {{/if}} - {{if $notification.markall}} - <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;"> - <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}} - </div> - {{/if}} - {{if $notification.filter}} - {{if $notification.filter.posts_label}} - <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> - <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}} - </div> - {{/if}} - {{if $notification.filter.name_label}} - <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> - <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div> - <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}"> - <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div> - </div> - {{/if}} - {{/if}} - <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div> - <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;"> - {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> - </div> - + </div> + <div id="nav-{{$notification.type}}-sub" class="border border-start-0 border-end-0 border-bottom-0 list-group list-group-flush collapse notification-content" data-bs-parent="#notifications" data-sse_type="{{$notification.type}}"> + {{if $notification.viewall}} + <a class="list-group-item text-decoration-none text-dark" id="nav-{{$notification.type}}-see-all" href="{{$notification.viewall.url}}"> + <i class="fa fa-fw fa-external-link"></i> {{$notification.viewall.label}} + </a> + {{/if}} + {{if $notification.markall}} + <div class="list-group-item cursor-pointer" id="nav-{{$notification.type}}-mark-all" onclick="markRead('{{$notification.type}}'); return false;"> + <i class="fa fa-fw fa-check"></i> {{$notification.markall.label}} + </div> + {{/if}} + {{if $notification.filter}} + {{if $notification.filter.posts_label}} + <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> + <i class="fa fa-fw fa-filter"></i> {{$notification.filter.posts_label}} + </div> + {{/if}} + {{if $notification.filter.name_label}} + <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> + <div class="text-muted notifications-textinput-filter"><i class="fa fa-fw fa-filter"></i></div> + <input id="cn-{{$notification.type}}-input" type="text" class="notification-filter form-control form-control-sm" placeholder="{{$notification.filter.name_label}}"> + <div id="cn-{{$notification.type}}-input-clear" class="text-muted notifications-textinput-clear d-none"><i class="fa fa-times"></i></div> + </div> + {{/if}} + {{/if}} + <div id="nav-{{$notification.type}}-menu" class="list-group list-group-flush"></div> + <div id="nav-{{$notification.type}}-loading" class="list-group-item" style="display: none;"> + {{$loading}}<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span> </div> </div> {{/foreach}} diff --git a/view/tpl/peoplefind.tpl b/view/tpl/peoplefind.tpl index 2ede221f3..1dc02e4c3 100644 --- a/view/tpl/peoplefind.tpl +++ b/view/tpl/peoplefind.tpl @@ -3,7 +3,7 @@ <form action="directory" method="post" /> <div class="input-group mb-3"> <input class="form-control" type="text" name="search" title="{{$hint}}{{if $advanced_search}}{{$advanced_hint}}{{/if}}" placeholder="{{$desc}}" /> - <button class="btn btn-sm btn-outline-secondary" type="submit" name="submit"><i class="fa fa-fw fa-search"></i></button> + <button class="btn btn-outline-secondary" type="submit" name="submit"><i class="fa fa-fw fa-search"></i></button> </div> </form> <ul class="nav nav-pills flex-column"> diff --git a/view/tpl/searchbox.tpl b/view/tpl/searchbox.tpl index ec855dc5c..c6bbcee82 100644 --- a/view/tpl/searchbox.tpl +++ b/view/tpl/searchbox.tpl @@ -2,9 +2,9 @@ <input type="hidden" name="f" value="" /> <div id="{{$id}}" class="input-group"> <input class="form-control" type="text" name="search" id="search-text" value="{{$s}}" onclick="this.submit();" /> - <button type="submit" name="submit" class="btn btn-sm btn-outline-secondary" id="search-submit" value="{{$search_label}}"><i class="fa fa-search"></i></button> + <button type="submit" name="submit" class="btn btn-outline-secondary" id="search-submit" value="{{$search_label}}"><i class="fa fa-search"></i></button> {{if $savedsearch}} - <button type="submit" name="searchsave" class="btn btn-sm btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="fa fa-floppy-o"></i></button> + <button type="submit" name="searchsave" class="btn btn-outline-secondary" id="search-save" value="{{$save_label}}"><i class="fa fa-floppy-o"></i></button> {{/if}} </div> </form> diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index bf3f64508..640678ae8 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -67,7 +67,7 @@ <div id="id_{{$commitMsg.0}}_wrapper" class="field input" style="display: none"> <div class="input-group"> <input class="form-control" name="{{$commitMsg.0}}" id="id_{{$commitMsg.0}}" type="text" value="{{$commitMsg.2}}"{{if $commitMsg.5}} {{$commitMsg.5}}{{/if}}> - <button id="save-page" type="button" class="btn btn-sm btn-primary disabled">Save</button> + <button id="save-page" type="button" class="btn btn-primary disabled">Save</button> </div> </div> {{/if}} |