Show
Ignore:
Timestamp:
04/24/08 21:16:21 (19 months ago)
Author:
bchoate
Message:

Updates to blog-side javascript regarding user state and permissions. BugId:79077,69644,67754,69814,79258,62643. Fixed declarations for conditional tags. BugId:79476. Display auth'd user nickname rather than name from comment object. BugId:79475

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-36/default_templates/comments.mtml

    r1976 r2062  
    1 <mt:ignore><!-- Display comments for the entry/page or commenting form if entry/page is accepting comments --></mt:ignore> 
     1<mt:ignore> 
     2<!-- Display comments for the entry/page or commenting form if entry/page is accepting comments --> 
     3</mt:ignore> 
    24<MTIfCommentsActive> 
    35<div id="comments" class="comments"> 
    46 
    57 
    6     <mt:ignore><!-- Display comments --></mt:ignore> 
     8    <mt:ignore> 
     9    <!-- Display comments --> 
     10    </mt:ignore> 
    711    <MTComments> 
    812        <MTCommentsHeader> 
    9     <h2 class="comments-header"><$MTEntryCommentCount singular="<__trans phrase="1 Comment">" plural="<__trans phrase="# Comments">"$></h2> 
     13    <h2 class="comments-header"><$MTEntryCommentCount singular="<__trans phrase="1 Comment">" plural="<__trans phrase="# Comments">" none="<__trans phrase="No Comments">"$></h2> 
    1014    <div class="comments-content"> 
    1115        </MTCommentsHeader> 
    12         <div class="comment<mt:IfCommentParent> comment-reply</mt:IfCommentParent>"<MTIfArchiveTypeEnabled archive_type="Individual"> id="comment-<$MTCommentID$>"</MTIfArchiveTypeEnabled>> 
     16        <div class="comment<mt:IfCommentParent> comment-reply</mt:IfCommentParent>" id="comment-<$MTCommentID$>"> 
    1317            <div class="inner"> 
    1418                <div class="comment-header"> 
     
    1620                        <span class="byline"> 
    1721                            <mt:IfCommentParent> 
    18                                 <__trans phrase="[_1] replied to <a href="[_2]">comment from [_3]</a>" params="<MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> <span class="vcard author"><$MTCommentAuthorLink default_name="Anonymous" show_email="0"$></span>%%<mt:CommentParent>#comment-<$MTCommentID$></mt:CommentParent>%%<mt:CommentParent><$MTCommentAuthor$></mt:CommentParent>"> 
     22                                <__trans phrase="[_1] replied to <a href="[_2]">comment from [_3]</a>" params="<MTIf tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIf> <span class="vcard author"><$MTCommentAuthorLink$></span>%%<mt:CommentParent>#comment-<$MTCommentID$></mt:CommentParent>%%<mt:CommentParent><$MTCommentAuthor$></mt:CommentParent>"> 
    1923                            <mt:else> 
    20                                 <MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> <span class="vcard author"><$MTCommentAuthorLink default_name="Anonymous" show_email="0"$></span> 
     24                                <$MTCommentAuthorIdentity$> 
     25                                <span class="vcard author"><$MTCommentAuthorLink$></span> 
    2126                            </mt:IfCommentParent> 
    22                             | <a href="#comment-<$MTCommentID$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a> 
     27                            | <a href="#comment-<$MTCommentID$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate relative="js"$></abbr></a> 
    2328                            <MTIfCommentsAccepted> | <$MTCommentReplyLink$></MTIfCommentsAccepted> 
    2429                        </span> 
     
    3641 
    3742 
    38     <mt:ignore><!-- Display commenting form if entry/page is accepting comments --></mt:ignore> 
     43    <mt:ignore> 
     44    <!-- Display commenting form if entry/page is accepting comments --> 
     45    </mt:ignore> 
    3946    <MTIfCommentsAccepted> 
    4047    <div class="comments-open" id="comments-open"> 
     
    4249        <div class="comments-open-content"> 
    4350 
     51        <mt:ignore> 
     52        <!-- Display greeting for users if blog allows users to register locally --> 
     53        </mt:ignore> 
     54            <div id="comment-greeting"></div> 
    4455 
    45         <mt:ignore><!-- Display greeting for users if blog allows users to register locally --></mt:ignore> 
    46         <MTIfRegistrationAllowed> 
    47             <div id="comment-form-external-auth"> 
    48                 <script type="text/javascript"> 
    49                 /* <![CDATA[ */ 
    50                 writeCommenterGreeting(commenter_name, <$MTEntryID$>, <$MTEntryBlogID$>, commenter_id, commenter_url); 
    51                 /* ]]> */ 
    52                 </script> 
    53             </div> 
    54         </MTIfRegistrationAllowed> 
    55  
    56  
    57             <form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="if (this.bakecookie.checked) rememberMe(this)"> 
     56            <form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="return mtCommentOnSubmit(this)"> 
    5857                <input type="hidden" name="static" value="1" /> 
    5958                <input type="hidden" name="entry_id" value="<$MTEntryID$>" /> 
    6059                <input type="hidden" name="__lang" value="<$MTBlogLanguage$>" /> 
    61                 <input type="hidden" name="parent_id" value="<MTIf name="comment_preview_template"><$MTCommentParentID$></MTIf>" id="comment-parent-id" /> 
     60                <input type="hidden" name="parent_id" value="<$MTCommentParentID$>" id="comment-parent-id" /> 
     61                <input type="hidden" name="armor" value="1" /> 
     62                <input type="hidden" name="preview" value="" /> 
    6263                <div id="comments-open-data"> 
    6364                    <div id="comment-form-name"> 
     
    7475                    </div> 
    7576                    <div id="comment-form-remember-me"> 
    76                         <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="if (!this.checked) forgetMe(document.comments_form)" value="1" /> 
     77                        <input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="mtRememberMeOnClick(this)" value="1" accesskey="r" /> 
    7778                        <label for="comment-bake-cookie"><__trans phrase="Remember personal info?"></label> 
    7879                    </div> 
    79                     <div id="comment-form-reply"> 
    80                         <input type="checkbox" id="comment-reply" name="comment_reply" value="" onclick="setCommentParentID();" /> 
    81                         <label for="comment-reply" id="comment-reply-label"></label> 
    82                     </div> 
     80                </div> 
     81                <div id="comment-form-reply" style="display:none"> 
     82                    <input type="checkbox" id="comment-reply" name="comment_reply" value="" onclick="mtSetCommentParentID()" /> 
     83                    <label for="comment-reply" id="comment-reply-label"></label> 
    8384                </div> 
    8485                <div id="comments-open-text"> 
    85                     <label for="comment-text"><__trans phrase="Comments"> <MTIfAllowCommentHTML><__trans phrase="(You may use HTML tags for style)"></MTIfAllowCommentHTML></label> 
     86                    <label for="comment-text"><__trans phrase="Comments"> 
     87                    <MTIfAllowCommentHTML><__trans phrase="(You may use HTML tags for style)"></MTIfAllowCommentHTML></label> 
    8688                    <textarea id="comment-text" name="text" rows="15" cols="50"></textarea> 
    8789                </div> 
    88                 <MTIfNonEmpty tag="MTCaptchaFields"> 
    89                 <MTIfCommentsAccepted><MTIfRegistrationAllowed><MTElse><$MTCaptchaFields$></MTIfRegistrationAllowed></MTIfCommentsAccepted> 
    90                 <div id="comments-open-captcha"> 
    91                 </div> 
    92                 </MTIfNonEmpty> 
     90                <div id="comments-open-captcha"></div> 
    9391                <div id="comments-open-footer"> 
    94                     <input type="submit" accesskey="v" name="preview" id="comment-preview" value="<__trans phrase="Preview">" /> 
     92                    <input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="<__trans phrase="Preview">" onclick="this.form.preview.value='1';" /> 
    9593                    <input type="submit" accesskey="s" name="post" id="comment-submit" value="<__trans phrase="Submit">" /> 
    9694                </div>