slider styling, remove obsolete bookmark prefix from js editing

This commit is contained in:
zotlabs 2019-01-04 22:31:12 -08:00
parent 921313f0c8
commit 5750baeadd
2 changed files with 3 additions and 5 deletions

View file

@ -73,7 +73,7 @@ li:hover .widget-nav-pills-icons {
justify-content: flex-center;
}
#main-range {
#main-range, #contact-range {
background-color: #EEF;
border-radius: 0.25rem;
width: 90%;

View file

@ -278,8 +278,6 @@ function insertbbcomment(comment, BBcode, id) {
if(typeof(insertFormatting) != 'undefined')
return(insertFormatting(comment, BBcode, id));
var urlprefix = ((BBcode == 'url') ? '#^' : '');
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == comment) {
tmpStr = "";
@ -292,11 +290,11 @@ function insertbbcomment(comment, BBcode, id) {
if (document.selection) {
textarea.focus();
selected = document.selection.createRange();
selected.text = urlprefix+"["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
selected.text = "["+BBcode+"]" + selected.text + "[/"+BBcode+"]";
} else if (textarea.selectionStart || textarea.selectionStart == "0") {
var start = textarea.selectionStart;
var end = textarea.selectionEnd;
textarea.value = textarea.value.substring(0, start) + urlprefix+"["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
textarea.value = textarea.value.substring(0, start) + "["+BBcode+"]" + textarea.value.substring(start, end) + "[/"+BBcode+"]" + textarea.value.substring(end, textarea.value.length);
}
return true;
}