Use placeholder attribute for Comment message

- Remove global aStr.comment
- Remove global window.commentEmptyText
- Remove head.tpl $comment parameter
This commit is contained in:
Hypolite Petovan 2017-01-08 02:13:55 +11:00
parent b6ce646d71
commit b50f1f970f
20 changed files with 37 additions and 59 deletions

View file

@ -376,8 +376,7 @@ function itemFiler(id) {
* Comments
*/
function commentOpen(obj,id) {
if(obj.value == window.commentEmptyText) {
obj.value = "";
if (obj.value == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
@ -385,8 +384,7 @@ function commentOpen(obj,id) {
}
}
function commentClose(obj,id) {
if(obj.value == "") {
obj.value = window.commentEmptyText;
if (obj.value == "") {
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide();
@ -397,8 +395,7 @@ function commentClose(obj,id) {
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == window.commentEmptyText) {
tmpStr = "";
if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
@ -413,8 +410,7 @@ function commentInsert(obj,id) {
function qCommentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == window.commentEmptyText) {
tmpStr = "";
if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);