Merge pull request #9710 from MrPetovan/bug/9622-restore-autocomplete-sitewide

Restore auto-complete feature in comments forms
2022.09-rc
Michael Vogel 2020-12-28 07:02:17 +01:00 zatwierdzone przez GitHub
commit 00a2df54d0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 13 dodań i 13 usunięć

Wyświetl plik

@ -175,6 +175,17 @@ $(function() {
$(textarea).trigger('change');
});
$(".comment-edit-wrapper textarea, .wall-item-comment-wrapper textarea")
.editor_autocomplete(baseurl + '/search/acl')
.bbco_autocomplete('bbcode');
// Ensures asynchronously-added comment forms recognize mentions, tags and BBCodes as well
document.addEventListener("postprocess_liveupdate", function() {
$(".comment-edit-wrapper textarea, .wall-item-comment-wrapper textarea")
.editor_autocomplete(baseurl + '/search/acl')
.bbco_autocomplete('bbcode');
});
/* popup menus */
function close_last_popup_menu() {
if (last_popup_menu) {
@ -568,10 +579,6 @@ function updateConvItems(data) {
commentBusy = false;
$('body').css('cursor', 'auto');
}
/* autocomplete @nicknames */
$(".comment-edit-form textarea").editor_autocomplete(baseurl + '/search/acl');
/* autocomplete bbcode */
$(".comment-edit-form textarea").bbco_autocomplete('bbcode');
}
function liveUpdate(src) {

Wyświetl plik

@ -1,13 +1,6 @@
{{if $alternate}}
<link href='{{$alternate}}' rel='alternate' type='application/atom+xml'>
<link href="{{$alternate}}" rel="alternate" type="application/atom+xml">
{{/if}}
{{if $conversation}}
<link href='{{$conversation}}' rel='conversation' type='application/atom+xml'>
<link href="{{$conversation}}" rel="conversation" type="application/atom+xml">
{{/if}}
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").editor_autocomplete(baseurl + '/search/acl');
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").editor_autocomplete(baseurl + '/search/acl');
});
</script>