aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorjeroenpraat <jeroenpraat@xs4all.nl>2014-06-05 20:48:03 +0000
committerjeroenpraat <jeroenpraat@xs4all.nl>2014-06-05 20:48:03 +0000
commit359814eee7a1a5de0af5a096aed8adf974608099 (patch)
treeac0ef3bfbea925d3cd75b5daa8565f735839dcec /view
parent6ccf6455c4691ca2e90403ff9fbaa21b86512190 (diff)
parentfed8b6b5664bdebaf1389bbf6269fc42af1f3c50 (diff)
downloadvolse-hubzilla-359814eee7a1a5de0af5a096aed8adf974608099.tar.gz
volse-hubzilla-359814eee7a1a5de0af5a096aed8adf974608099.tar.bz2
volse-hubzilla-359814eee7a1a5de0af5a096aed8adf974608099.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js33
-rw-r--r--view/theme/redbasic/js/redbasic.js31
-rwxr-xr-xview/tpl/comment_item.tpl2
3 files changed, 34 insertions, 32 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 2f695c77e..871b683d5 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1,5 +1,38 @@
function confirmDelete() { return confirm(aStr['delitem']); }
+
+ function commentOpenUI(obj,id) {
+
+ $(document).unbind( "click.commentOpen", handler );
+
+ var handler = function() {
+ if(obj.value == aStr['comment']) {
+ obj.value = '';
+ $("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty");
+ $("#comment-tools-" + id).show();
+ }
+ };
+
+ $(document).bind( "click.commentOpen", handler );
+
+ }
+
+ function commentCloseUI(obj,id) {
+
+ $(document).unbind( "click.commentClose", handler );
+
+ var handler = function() {
+ if(obj.value == '') {
+ obj.value = aStr['comment'];
+ $("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
+ $("#comment-tools-" + id).hide();
+ }
+ };
+
+ $(document).bind( "click.commentClose", handler );
+
+ }
+
function commentOpen(obj,id) {
if(obj.value == aStr['comment']) {
obj.value = '';
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index 5a9d2f390..4f70752c0 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -1,34 +1,3 @@
-function commentOpenRedbasic(obj,id) {
-
- $(document).unbind( "click.commentOpen", handler );
-
- var handler = function() {
- if(obj.value == aStr['comment']) {
- obj.value = '';
- $("#comment-edit-text-" + id).addClass("comment-edit-text-full").removeClass("comment-edit-text-empty");
- $("#comment-tools-" + id).show();
- }
- };
-
- $(document).bind( "click.commentOpen", handler );
-
-}
-
-function commentCloseRedbasic(obj,id) {
-
- $(document).unbind( "click.commentClose", handler );
-
- var handler = function() {
- if(obj.value == '') {
- obj.value = aStr['comment'];
- $("#comment-edit-text-" + id).removeClass("comment-edit-text-full").addClass("comment-edit-text-empty");
- $("#comment-tools-" + id).hide();
- }
- };
-
- $(document).bind( "click.commentClose", handler );
-
-}
$(document).ready(function() {
diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl
index 13c827b77..423d13d88 100755
--- a/view/tpl/comment_item.tpl
+++ b/view/tpl/comment_item.tpl
@@ -10,7 +10,7 @@
<input type="hidden" name="return" value="{{$return_path}}" />
<input type="hidden" name="jsreload" value="{{$jsreload}}" />
<input type="hidden" name="preview" id="comment-preview-inp-{{$id}}" value="0" />
- <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpenRedbasic(this,{{$id}});" onBlur="commentCloseRedbasic(this,{{$id}});" >{{$comment}}</textarea>
+ <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpenUI(this,{{$id}});" onBlur="commentCloseUI(this,{{$id}});" >{{$comment}}</textarea>
{{if $qcomment}}
<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" >
<option value=""></option>