diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/acl.js | 20 | ||||
-rw-r--r-- | view/js/autocomplete.js | 11 | ||||
-rw-r--r-- | view/js/main.js | 6 |
3 files changed, 22 insertions, 15 deletions
diff --git a/view/js/acl.js b/view/js/acl.js index 4dd60d303..e016158e9 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -333,20 +333,20 @@ ACL.prototype.update_view = function(value) { type = itemid[0]; id = itemid.substr(1); - btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-default"); - bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-default"); + btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-outline-success"); + bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-outline-danger"); switch(type) { case "g": var uclass = ""; if (that.allow_gid.indexOf(id)>=0) { - btshow.removeClass("btn-default").addClass("btn-success"); - bthide.removeClass("btn-danger").addClass("btn-default"); + btshow.removeClass("btn-outline-success").addClass("btn-success"); + bthide.removeClass("btn-danger").addClass("btn-outline-danger"); uclass="groupshow"; } if (that.deny_gid.indexOf(id)>=0) { - btshow.removeClass("btn-success").addClass("btn-default"); - bthide.removeClass("btn-default").addClass("btn-danger"); + btshow.removeClass("btn-success").addClass("btn-outline-success"); + bthide.removeClass("btn-outline-danger").addClass("btn-danger"); uclass = "grouphide"; } $(that.group_uids[id]).each(function(i, v) { @@ -366,13 +366,13 @@ ACL.prototype.update_view = function(value) { case "c": if (that.allow_cid.indexOf(id)>=0){ if(!$(this).hasClass("grouphide") ) { - btshow.removeClass("btn-default").addClass("btn-success"); - bthide.removeClass("btn-danger").addClass("btn-default"); + btshow.removeClass("btn-outline-success").addClass("btn-success"); + bthide.removeClass("btn-danger").addClass("btn-outline-danger"); } } if (that.deny_cid.indexOf(id)>=0){ - btshow.removeClass("btn-success").addClass("btn-default"); - bthide.removeClass("btn-default").addClass("btn-danger"); + btshow.removeClass("btn-success").addClass("btn-outline-success"); + bthide.removeClass("btn-outline-danger").addClass("btn-danger"); $(this).removeClass("groupshow"); } } diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 5a616b6fc..e33f6192b 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -60,12 +60,16 @@ function contact_format(item) { var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick); if(typeof desc === 'undefined') desc = ''; if(desc) desc = ' ('+desc+')'; - return "<div class='{0}' title='{4}'><img class='dropdown-menu-img-sm' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span><div class='clear'></div></div>".format(item.taggable, item.photo, item.name, desc, item.link); + return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span></div>".format(item.taggable, item.photo, item.name, desc, item.link); } else return "<div>" + item.text + "</div>"; } +function smiley_format(item) { + return "<div class='dropdown-item'>" + item.icon + ' ' + item.text + "</div>"; +} + function editor_replace(item) { if(typeof item.replace !== 'undefined') { return '$1$2' + item.replace; @@ -181,15 +185,16 @@ function string2bb(element) { index: 3, search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); }, replace: editor_replace, - template: contact_format, + template: contact_format }; smilies = { match: /(^|\s)(:[a-z_:]{2,})$/, index: 2, 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; }, + //template: function(item) { return item.icon + item.text; }, replace: function(item) { return "$1" + item.text + ' '; }, + template: smiley_format }; this.attr('autocomplete','off'); this.textcomplete([contacts,smilies], {className:'acpopup', zIndex:1020}); diff --git a/view/js/main.js b/view/js/main.js index db7ad110b..150f517a9 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -369,10 +369,10 @@ function NavUpdate() { updateCountsOnly = false; if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify) { - $('#notifications-btn').css('color', 'white').prop('disabled', false); + $('#notifications-btn').removeClass('text-muted').addClass('text-white'); } else { - $('#notifications-btn').css('color', 'grey').prop('disabled', true); + $('#notifications-btn').removeClass('text-white').addClass('text-muted'); $('#navbar-collapse-1').removeClass('in'); } @@ -939,6 +939,8 @@ function notify_popup_loader(notifyType) { window.location.href=window.location.href; } + console.log(data); + if(data.notify.length == 0){ $("#nav-" + notifyType + "-menu").html(aStr[nothingnew]); } else { |