aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/autocomplete.js46
-rw-r--r--view/theme/redbasic/css/style.css6
-rwxr-xr-xview/tpl/build_query.tpl2
-rw-r--r--view/tpl/notifications_widget.tpl2
4 files changed, 40 insertions, 16 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 54eb03e13..6b77f0631 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -163,7 +163,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^|\s)(@\!*)([^ \n]{2,})$/,
+ match: /(^|\s)(@\!*)([^ \n]{3,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
@@ -195,12 +195,12 @@ function string2bb(element) {
smilies = {
- match: /(^|\s)(:[a-z_:]{2,})$/,
+ match: /(^|\s)(:[a-z0-9_:]{2,})$/,
index: 2,
cache: true,
- search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
- //template: function(item) { return item.icon + item.text; },
+ search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term.substr(1)) !== -1 ? entry : null; })); }); },
replace: function(item) { return "$1" + item.text + ' '; },
+ context: function(text) { return text.toLowerCase(); },
template: smiley_format
};
this.attr('autocomplete','off');
@@ -209,8 +209,12 @@ function string2bb(element) {
$(this).each(function() {
var editor = new Textarea(this);
- var textcomplete = new Textcomplete(editor);
- textcomplete.register([contacts,forums,smilies,tags], {className:'acpopup', zIndex:1020});
+ var textcomplete = new Textcomplete(editor, {
+ dropdown: {
+ maxCount: 100
+ }
+ });
+ textcomplete.register([contacts,forums,smilies,tags]);
});
@@ -264,8 +268,12 @@ function string2bb(element) {
$(this).each(function() {
var editor = new Textarea(this);
- textcomplete = new Textcomplete(editor);
- textcomplete.register([contacts,forums,tags], {className:'acpopup', maxCount:100, zIndex: 1020, appendTo:'nav'});
+ textcomplete = new Textcomplete(editor, {
+ dropdown: {
+ maxCount: 100
+ }
+ });
+ textcomplete.register([contacts,forums,tags]);
});
textcomplete.on('selected', function() { this.editor.el.form.submit(); });
@@ -299,8 +307,12 @@ function string2bb(element) {
$(this).each(function() {
var editor = new Textarea(this);
- textcomplete = new Textcomplete(editor);
- textcomplete.register([contacts], {className:'acpopup', zIndex:1020});
+ textcomplete = new Textcomplete(editor, {
+ dropdown: {
+ maxCount: 100
+ }
+ });
+ textcomplete.register([contacts]);
});
if(autosubmit)
@@ -338,8 +350,12 @@ function string2bb(element) {
$(this).each(function() {
var editor = new Textarea(this);
- textcomplete = new Textcomplete(editor);
- textcomplete.register([names], {className:'acpopup', zIndex:1020});
+ textcomplete = new Textcomplete(editor, {
+ dropdown: {
+ maxCount: 100
+ }
+ });
+ textcomplete.register([names]);
});
if(autosubmit)
@@ -358,8 +374,8 @@ function string2bb(element) {
return;
if(type=='bbcode') {
- var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
- var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr', ];
+ var open_close_elements = ['bold', 'italic', 'underline', 'overline', 'strike', 'superscript', 'subscript', 'quote', 'code', 'open', 'spoiler', 'summary', 'map', 'nobb', 'list', 'checklist', 'ul', 'ol', 'dl', 'li', 'table', 'tr', 'th', 'td', 'center', 'color', 'font', 'size', 'zrl', 'zmg', 'rpost', 'qr', 'observer', 'observer.language','embed', 'highlight', 'url', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
+ var open_elements = ['observer.baseurl', 'observer.address', 'observer.photo', 'observer.name', 'observer.webname', 'observer.url', '*', 'hr' ];
var elements = open_close_elements.concat(open_elements);
}
@@ -420,7 +436,7 @@ function string2bb(element) {
$(this).each(function() {
var editor = new Textarea(this);
var textcomplete = new Textcomplete(editor);
- textcomplete.register([bbco], {className:'acpopup', zIndex:1020});
+ textcomplete.register([bbco]);
});
this.keypress(function(e){
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 4f0658477..489d71735 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1474,6 +1474,12 @@ blockquote {
background-color: $item_colour;
}
+.textcomplete-dropdown {
+ max-height: 300px;
+ max-width: 250px;
+ overflow: auto;
+}
+
.dropdown-item.active {
color: #fff;
background-color: #007bff;
diff --git a/view/tpl/build_query.tpl b/view/tpl/build_query.tpl
index 2c55a8140..fcb22b605 100755
--- a/view/tpl/build_query.tpl
+++ b/view/tpl/build_query.tpl
@@ -31,6 +31,7 @@
var bParam_verb = "{{$verb}}";
var bParam_net = "{{$net}}";
var bParam_pf = "{{$pf}}";
+ var bParam_unseen = "{{$unseen}}";
function buildCmd() {
var udargs = ((page_load) ? "/load" : "");
@@ -62,6 +63,7 @@
if(bParam_net != "") bCmd = bCmd + "&net=" + bParam_net;
if(bParam_page != 1) bCmd = bCmd + "&page=" + bParam_page;
if(bParam_pf != 0) bCmd = bCmd + "&pf=" + bParam_pf;
+ if(bParam_unseen != 0) bCmd = bCmd + "&unseen=" + bParam_unseen;
return(bCmd);
}
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 9b3d7487e..f43d82301 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -143,7 +143,7 @@
<div id="nav-notifications-forums-template" rel="template">
<a class="list-group-item clearfix notification notification-forum" href="{0}" title="{3}" data-b64mid="{6}" data-notify_id="{7}" data-thread_top="{8}" data-contact_name="{2}">
<span class="float-right badge badge-{{$notification.severity}}">{9}</span>
- <img class="menu-img-1" src="{1}">
+ <img class="menu-img-1" data-src="{1}">
<span class="">{2}</span>
<i class="fa fa-{10} text-muted"></i>
</a>