diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/acl.js | 20 | ||||
-rw-r--r-- | view/js/autocomplete.js | 18 | ||||
-rw-r--r-- | view/js/main.js | 8 | ||||
-rw-r--r-- | view/js/mod_cloud.js | 2 | ||||
-rw-r--r-- | view/js/mod_connedit.js | 2 | ||||
-rw-r--r-- | view/js/mod_display.js | 7 | ||||
-rw-r--r-- | view/js/mod_network.js | 1 | ||||
-rw-r--r-- | view/js/mod_profiles.js | 4 | ||||
-rw-r--r-- | view/js/mod_settings.js | 13 |
9 files changed, 50 insertions, 25 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..313e501e2 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -60,12 +60,20 @@ 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 bbco_format(item) { + return "<div class='dropdown-item'>" + item + "</div>"; +} + function editor_replace(item) { if(typeof item.replace !== 'undefined') { return '$1$2' + item.replace; @@ -181,15 +189,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}); @@ -321,7 +330,8 @@ function string2bb(element) { else { return '\[' + element + '\] '; } - } + }, + template: bbco_format }; this.attr('autocomplete','off'); diff --git a/view/js/main.js b/view/js/main.js index 5de4aa9a2..38b9754a1 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').css('opacity', 1); } else { - $('#notifications-btn').css('color', 'grey').prop('disabled', true); + $('#notifications-btn').css('opacity', 0.5); $('#navbar-collapse-1').removeClass('in'); } @@ -695,7 +695,7 @@ function collapseHeight() { $(".wall-item-content, .directory-collapse").each(function() { var orgHeight = $(this).outerHeight(true); if(orgHeight > divmore_height) { - if(! $(this).hasClass('divmore')) { + if(! $(this).hasClass('divmore') && $(this).has('div.no-collapse').length == 0) { // check if we will collapse some content above the visible content and compensate the diff later if($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i) < 65) { @@ -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 { diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js index 8b8a3ba3f..8af90863e 100644 --- a/view/js/mod_cloud.js +++ b/view/js/mod_cloud.js @@ -91,7 +91,7 @@ function prepareHtml(f, i) { '<td><i class="fa ' + getIconFromType(f.type) + '" title="' + f.type + '"></i></td>' + '<td>' + f.name + '</td>' + '<td id="upload-progress-' + i + '"></td><td></td><td></td><td></td><td></td>' + - '<td class="hidden-xs">' + formatSizeUnits(f.size) + '</td><td class="hidden-xs"></td>' + + '<td class="d-none d-md-table-cell">' + formatSizeUnits(f.size) + '</td><td class="d-none d-md-table-cell"></td>' + '</tr>' + '<tr id="new-upload-progress-bar-' + i + '" class="new-upload">' + '<td id="upload-progress-bar-' + i + '" colspan="9" class="upload-progress-bar"></td>' + diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 4739c490c..7100e0d07 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -82,7 +82,7 @@ $(document).ready(function() { function doRemove() { var what = $(this).data('remove'); var element = $(this).parents('div.form-' + what); - var where = '#abook_edit_form' + $(this).data('id'); + var where = '#abook-edit-form' + $(this).data('id'); if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { $(where + ' .add-' + what).show() diff --git a/view/js/mod_display.js b/view/js/mod_display.js new file mode 100644 index 000000000..60a1cdaa8 --- /dev/null +++ b/view/js/mod_display.js @@ -0,0 +1,7 @@ +<script> +$(document).ready(function() { + $(".comment-edit-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); + // make auto-complete work in more places + $(".wall-item-comment-wrapper textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); +}); +</script> diff --git a/view/js/mod_network.js b/view/js/mod_network.js index cd36786df..2899bbacd 100644 --- a/view/js/mod_network.js +++ b/view/js/mod_network.js @@ -1,5 +1,4 @@ $(document).ready(function() { $("#search-text").contact_autocomplete(baseurl + '/search_ac','',true); - $('.jslider-scale ins').addClass('hidden-xs'); }); diff --git a/view/js/mod_profiles.js b/view/js/mod_profiles.js index acc9f9953..784f64458 100644 --- a/view/js/mod_profiles.js +++ b/view/js/mod_profiles.js @@ -38,7 +38,7 @@ $(document).ready(function() { var what = $(this).data('add'); var id = $(this).data('id'); var element = '#template-form-' + what; - var where = '#abook-edit-form'; + var where = '#profile-edit-form'; $(element + ' .remove-field').attr('data-id', id) @@ -58,7 +58,7 @@ $(document).ready(function() { function doRemove() { var what = $(this).data('remove'); var element = $(this).parents('div.form-' + what); - var where = '#abook_edit_form' + $(this).data('id'); + var where = '#profile-edit-form' + $(this).data('id'); if(what === 'vcard-org' || what === 'vcard-title' || what === 'vcard-note') { $(where + ' .add-' + what).show() diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 5c729fa48..f9faa3d5c 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -37,12 +37,19 @@ function setTheme(elm) { function previewTheme(elm) { theme = $(elm).val(); + var schema = $('#id_schema').val(); $.getJSON('theme_info/' + theme,function(data) { $('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" style="max-width:100%; max-height:300px" alt="' + theme + '"></a>'); $('#id_schema').empty(); - $(data.schemas).each(function(index,item) { - $('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema'); - }); + if(data.schemas.length) { + $(data.schemas).each(function(index,item) { + $('<option/>',{value:item['key'],text:item['val']}).appendTo('#id_schema'); + }); + $('#id_schema').val(schema ? schema : '---'); + } + else { + $('<option/>',{value:'',text:'No schemes available'}).appendTo('#id_schema'); + } $('#custom-settings-content .section-content-tools-wrapper').html(data.config); }); } |