X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fhead.tpl;h=f5998703f27eafdd4b3e68e2ba95bea6c0ae7ffc;hb=d193093106fa98a452e23830c8387c69748c95ea;hp=722c79441465698acf0debaa8b38bcbb49a46281;hpb=286c230fa858b7b1fead9c3ff722f6b1b9478d01;p=friendica.git diff --git a/view/head.tpl b/view/head.tpl old mode 100755 new mode 100644 index 722c794414..f5998703f2 --- a/view/head.tpl +++ b/view/head.tpl @@ -8,6 +8,11 @@ + + + + + var updateInterval = $update_interval; + var localUser = {{ if $local_user }}$local_user{{ else }}false{{ endif }}; function confirmDelete() { return confirm("$delitem"); } function commentOpen(obj,id) { @@ -36,16 +42,22 @@ 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(); openMenu("comment-edit-submit-wrapper-" + id); + return true; } + return false; } function commentClose(obj,id) { if(obj.value == '') { obj.value = '$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; } @@ -65,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(); } }