mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Check for existing element in openMenu()
- Removed useless val() call in the various insertFormatting() declarations
This commit is contained in:
parent
479180ca8e
commit
ecd86ec296
8 changed files with 8 additions and 9 deletions
10
js/main.js
10
js/main.js
|
@ -25,11 +25,17 @@
|
|||
}
|
||||
|
||||
function openMenu(theID) {
|
||||
document.getElementById(theID).style.display = "block"
|
||||
var el = document.getElementById(theID)
|
||||
if (el) {
|
||||
el.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function closeMenu(theID) {
|
||||
document.getElementById(theID).style.display = "none"
|
||||
var el = document.getElementById(theID)
|
||||
if (el) {
|
||||
el.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function decodeHtml(html) {
|
||||
|
|
|
@ -29,7 +29,6 @@ function insertFormatting(BBcode, id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -9,7 +9,6 @@ function insertFormatting(BBcode,id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -430,7 +430,6 @@ function insertFormatting(BBcode,id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -794,7 +794,6 @@ function insertFormatting(BBcode, id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -65,7 +65,6 @@ function insertFormatting(BBcode, id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -25,7 +25,6 @@ function insertFormatting(BBcode, id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
|
@ -42,7 +42,6 @@ function insertFormatting(BBcode, id) {
|
|||
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
|
|
Loading…
Reference in a new issue