X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fhead.tpl;h=f5998703f27eafdd4b3e68e2ba95bea6c0ae7ffc;hb=255771f295f0a20557494ec6a5587bd5afc8b699;hp=f606f2f7e2dde6a0bdff17a11e9a9c4e19f1a4bf;hpb=153e7beb195afa19843f1c114b569c08ad4307a4;p=friendica.git diff --git a/view/head.tpl b/view/head.tpl old mode 100755 new mode 100644 index f606f2f7e2..f5998703f2 --- a/view/head.tpl +++ b/view/head.tpl @@ -7,7 +7,12 @@ - + + + + + + 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,14 +77,32 @@ $("#comment-edit-text-" + id).val(tmpStr + ins); } - function showHideComments(id) { - if( $('#collapsed-comments-' + id).is(':visible')) { - $('#collapsed-comments-' + id).hide(); - $('#hide-comments-' + id).html('$showmore'); + 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(''); + } + + window.showMore = "$showmore"; + window.showFewer = "$showfewer"; + + function showHideCommentBox(id) { + if( $('#comment-edit-form-' + id).is(':visible')) { + $('#comment-edit-form-' + id).hide(); } else { - $('#collapsed-comments-' + id).show(); - $('#hide-comments-' + id).html('$showfewer'); + $('#comment-edit-form-' + id).show(); } }