not able to delete set_location

This commit is contained in:
Mike Macgirvin 2023-01-11 05:53:00 +11:00
parent 3fda761f81
commit eb0a773b1d
4 changed files with 24 additions and 10 deletions

4
.jshintrc Normal file
View file

@ -0,0 +1,4 @@
{
"esversion": 8,
"asi": true
}

View file

@ -112,6 +112,9 @@ class Channel
PConfig::Set(local_channel(),'system', 'set_location', $lat . ',' . $lon);
}
}
else {
PConfig::Set(local_channel(),'system', 'set_location', '');
}
$pageflags = $channel['channel_pageflags'];
$existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0);

View file

@ -1666,8 +1666,12 @@ function loadText(textRegion,data) {
function addeditortext(data) {
if(plaintext == 'none') {
let currentText = $("#profile-jot-text").val();
$("#profile-jot-text").val(currentText + data);
let textarea = document.getElementById('profile-jot-text');
if (textarea) {
textarea.value = currentText + data
let evt = new CustomEvent('input');
textarea.dispatchEvent(evt);
}
}
}

View file

@ -183,13 +183,15 @@ let postSaveTimer = null;
$("#profile-jot-text").addClass('jot-expanded');
$("#profile-jot-summary").addClass('jot-expanded');
// let bodytextarea = document.querySelector('#profile-jot-text');
// if (typeof bodytextarea != "undefined") {
// bodytextarea.addEventListener('input', function handlechange(event) {
// imagewatcher(event)
// });
// }
/*
let bodytextarea = document.querySelector('#profile-jot-text');
if (typeof bodytextarea != "undefined") {
bodytextarea.addEventListener('input', function handlechange(event) {
imagewatcher(event)
});
}
*/
{{if $bbco_autocomplete}}
$("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode
$("#profile-jot-summary").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode
@ -217,7 +219,8 @@ let postSaveTimer = null;
}
function imagewatcher(event) {
console.log(event.target.value);
let imgfind = /\[[iz]mg.*?alt="(.*?)".*?](.*?)\[/.exec(event.target.value)
console.log(imgfind);
}
function enableOnUser(){
if(editor)