aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js')
-rw-r--r--view/js/acl.js4
-rw-r--r--view/js/autocomplete.js16
-rw-r--r--view/js/main.js6
-rw-r--r--view/js/mod_new_channel.js3
4 files changed, 26 insertions, 3 deletions
diff --git a/view/js/acl.js b/view/js/acl.js
index c8f7c7180..a5fae19bc 100644
--- a/view/js/acl.js
+++ b/view/js/acl.js
@@ -173,7 +173,7 @@ ACL.prototype.on_custom = function(event) {
that.deny_cid = [];
that.deny_gid = [];
- datasrc2src('#acl-list-content .acl-list-item img[data-src]');
+ datasrc2src('#acl-list-content .list-group-item img[data-src]');
that.update_view('custom');
that.on_submit();
@@ -399,7 +399,7 @@ ACL.prototype.get = function(start, count, search) {
ACL.prototype.populate = function(data) {
$(data.items).each(function(){
- html = "<div class='acl-list-item {4} {7} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
+ html = "<div class='list-group-item clearfix acl-list-item {4} {7} {5}' id='{2}{3}'>"+that.item_tpl+"</div>";
html = html.format(this.photo, this.name, this.type, this.xid, '', this.self, this.link, this.taggable);
if (this.uids !== undefined) {
that.group_uids[this.xid] = this.uids;
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 01def9900..2d017db18 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -74,6 +74,10 @@ function bbco_format(item) {
return "<div class='dropdown-item'>" + item + "</div>";
}
+function tag_format(item) {
+ return "<div class='dropdown-item'>" + '#' + item.text + "</div>";
+}
+
function editor_replace(item) {
if(typeof item.replace !== 'undefined') {
return '$1$2' + item.replace;
@@ -202,6 +206,16 @@ function string2bb(element) {
};
+ // Autocomplete hashtags
+ tags = {
+ match: /(^|\s)(\#)([^ \n]{2,})$/,
+ index: 3,
+ search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
+ replace: function(item) { return "$1$2" + item.text + ' '; },
+ template: tag_format
+ };
+
+
smilies = {
match: /(^|\s)(:[a-z_:]{2,})$/,
index: 2,
@@ -211,7 +225,7 @@ function string2bb(element) {
template: smiley_format
};
this.attr('autocomplete','off');
- this.textcomplete([contacts,forums,smilies], {className:'acpopup', zIndex:1020});
+ this.textcomplete([contacts,forums,smilies,tags], {className:'acpopup', zIndex:1020});
};
})( jQuery );
diff --git a/view/js/main.js b/view/js/main.js
index f6fe475d8..98a756fff 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -304,6 +304,12 @@ function insertCommentURL(comment, id) {
return true;
}
+function doFollowAuthor(url) {
+ $.get(url, function(data) { notificationsUpdate(); });
+ return true;
+}
+
+
function viewsrc(id) {
$.colorbox({href: 'viewsrc/' + id, maxWidth: '80%', maxHeight: '80%' });
}
diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js
index 7ae59032a..e78de2596 100644
--- a/view/js/mod_new_channel.js
+++ b/view/js/mod_new_channel.js
@@ -11,6 +11,9 @@
$("#help_name").html("");
zFormError("#help_name",data.error);
}
+ else {
+ $("#newchannel-submit-button").removeAttr('disabled');
+ }
$("#name-spinner").hide();
});
});