X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fjs%2Ftheme.js;h=edbe713c6713ad7abf51f11bce2db37c7e61b9af;hb=6cf50a14fae25210a0cdb617c29d549abcfde9ac;hp=859df01613a7deec6d41f2210da6d072495af0a0;hpb=c118c03a70ad783a5cc75c1be80d594eae6ca954;p=friendica.git diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 859df01613..edbe713c67 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -372,11 +372,13 @@ function openClose(theID) { } function showHide(theID) { - if(document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" + var elem = document.getElementById(theID); + + if( $(elem).is(':visible') ) { + elem.style.display = "none"; } else { - document.getElementById(theID).style.display = "block" + elem.style.display = "block"; } } @@ -550,6 +552,10 @@ function filter_replace(item) { this.attr('autocomplete','off'); var a = this.textcomplete([contacts], {className:'accontacts', appendTo: '#contact-list'}); + if(autosubmit) { + a.on('textComplete:select', function(e,value,strategy) {submit_form(this);}); + } + a.on('textComplete:select', function(e, value, strategy) { $(".dropdown-menu.textcomplete-dropdown.media-list").show(); });