aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-05-20 17:33:06 +0200
committermarijus <mario@mariovavti.com>2014-05-20 17:33:06 +0200
commitc530a7a9366b1c89a63fc1782ec620db992efc3b (patch)
tree3fc623a4c7d675e99f80c00a99d919ee8c117c0b /view/js/main.js
parent6d01707a724504a34b8e84e87c6601a046de9739 (diff)
downloadvolse-hubzilla-c530a7a9366b1c89a63fc1782ec620db992efc3b.tar.gz
volse-hubzilla-c530a7a9366b1c89a63fc1782ec620db992efc3b.tar.bz2
volse-hubzilla-c530a7a9366b1c89a63fc1782ec620db992efc3b.zip
some work on comment_item.tpl
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js30
1 files changed, 17 insertions, 13 deletions
diff --git a/view/js/main.js b/view/js/main.js
index fa32df424..a4cbed064 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -6,21 +6,25 @@
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
- openMenu("comment-edit-submit-wrapper-" + id);
+ openMenu("comment-tools-" + id);
return true;
}
return false;
}
+
function commentClose(obj,id) {
- if(obj.value == '') {
- obj.value = aStr['comment'];
- $("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
- $("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
- $("#mod-cmnt-wrap-" + id).hide();
- closeMenu("comment-edit-submit-wrapper-" + id);
- return true;
- }
- return false;
+ $(document).on('click', function() {
+ if(obj.value == '') {
+ obj.value = aStr['comment'];
+ $("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
+ $("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
+ $("#mod-cmnt-wrap-" + id).hide();
+ closeMenu("comment-tools-" + id);
+ return true;
+ }
+ return false;
+ });
+
}
function showHideCommentBox(id) {
@@ -32,14 +36,13 @@
}
}
-
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
if(tmpStr == '$comment') {
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);
+ openMenu("comment-tools-" + id);
}
var ins = $(obj).html();
ins = ins.replace('&lt;','<');
@@ -62,7 +65,7 @@
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);
+ openMenu("comment-tools-" + id);
$("#comment-edit-text-" + id).val(tmpStr);
}
@@ -748,6 +751,7 @@ function updateConvItems(mode,data) {
$("#comment-edit-form-" + id).serialize(),
function(data) {
if(data.success) {
+ $("#comment-edit-preview-" + id).hide();
$("#comment-edit-wrapper-" + id).hide();
$("#comment-edit-text-" + id).val('');
var tarea = document.getElementById("comment-edit-text-" + id);