X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fjs%2Ftheme.js;h=d10639c8fe52f87d9bb21ef8f31ec5e1ed2429a9;hb=091193ad645b6583e0391399ccd528339fc95683;hp=859df01613a7deec6d41f2210da6d072495af0a0;hpb=39edd086e077dddc9f53310dc7ce0105f7cc5888;p=friendica.git diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 859df01613..d10639c8fe 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -372,11 +372,19 @@ function openClose(theID) { } function showHide(theID) { - if(document.getElementById(theID).style.display == "block") { - document.getElementById(theID).style.display = "none" + var elem = document.getElementById(theID); + var edit = document.getElementById("comment-edit-submit-wrapper-" + theID.match('[0-9$]+')); + + if ($(elem).is(':visible')) { + if (!$(edit).is(':visible')) { + edit.style.display = "block"; + } + else { + elem.style.display = "none"; + } } else { - document.getElementById(theID).style.display = "block" + elem.style.display = "block"; } } @@ -550,6 +558,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(); });