X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fhead.tpl;h=42bd92f4ce497d42d271c9cba19cf4f709be211b;hb=1c4bea295fd639f4f8c218020b38d28f7b0d4470;hp=f606f2f7e2dde6a0bdff17a11e9a9c4e19f1a4bf;hpb=a33031634efef94c0985cd2517f10ccd36b40b5f;p=friendica.git diff --git a/view/head.tpl b/view/head.tpl old mode 100755 new mode 100644 index f606f2f7e2..42bd92f4ce --- a/view/head.tpl +++ b/view/head.tpl @@ -7,7 +7,7 @@ - + var updateInterval = $update_interval; + var localUser = {{ if $local_user }}$local_user{{ else }}false{{ endif }}; function confirmDelete() { return confirm("$delitem"); } function commentOpen(obj,id) { if(obj.value == '$comment') { obj.value = ''; - obj.className = "comment-edit-text-full"; + $("#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); + return true; } + return false; } function commentClose(obj,id) { if(obj.value == '') { obj.value = '$comment'; - obj.className="comment-edit-text-empty"; + $("#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; } @@ -63,6 +72,23 @@ $("#comment-edit-text-" + id).val(tmpStr + ins); } + function qCommentInsert(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); + } + var ins = $(obj).val(); + ins = ins.replace('<','<'); + ins = ins.replace('>','>'); + ins = ins.replace('&','&'); + ins = ins.replace('"','"'); + $("#comment-edit-text-" + id).val(tmpStr + ins); + $(obj).val(''); + } + function showHideComments(id) { if( $('#collapsed-comments-' + id).is(':visible')) { $('#collapsed-comments-' + id).hide(); @@ -74,6 +100,15 @@ } } + function showHideCommentBox(id) { + if( $('#comment-edit-form-' + id).is(':visible')) { + $('#comment-edit-form-' + id).hide(); + } + else { + $('#comment-edit-form-' + id).show(); + } + } +