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/comment_preview.mtml

    r1923 r2062  
    55    <title><$MTBlogName encode_html="1"$>: <__trans phrase="Previewing your Comment"></title> 
    66    <$mt:include module="<__trans phrase="HTML Head">"$> 
     7    <script type="text/javascript"> 
     8    /* <![CDATA[ */ 
     9    var is_preview = true; 
     10    /* ]]> */ 
     11    </script> 
    712    <script type="text/javascript" src="<$MTLink template="javascript"$>"></script> 
    813</head> 
    9 <body id="<$mt:BlogTemplateSetID$>" class="mt-comment-preview <$MTVar name="page_layout"$>" onload="individualArchivesOnLoad(commenter_name)"> 
     14<body id="<$mt:BlogTemplateSetID$>" class="mt-comment-preview <$MTVar name="page_layout"$>" onload="mtEntryOnLoad()"> 
    1015    <div id="container"> 
    1116        <div id="container-inner"> 
     
    2732 
    2833<mt:ignore><!-- Comment Preview --></mt:ignore> 
    29                             <div class="comment"<MTIfArchiveTypeEnabled archive_type="Individual"> id="comment-<$MTCommentID$>"</MTIfArchiveTypeEnabled>> 
     34                            <div class="comment" id="comment-<$MTCommentID$>"> 
    3035                                <div class="inner"> 
    3136                                    <div class="comment-header"> 
     
    3338                                            <span class="byline"> 
    3439                                                <mt:IfCommentParent> 
    35                                                     <__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>"> 
     40                                                    <__trans phrase="[_1] replied to <a href="[_2]">comment from [_3]</a>" params="<$MTCommentAuthorIdentity$> <span class="vcard author"><$MTCommentAuthorLink$></span>%%<mt:CommentParent>#comment-<$MTCommentID$></mt:CommentParent>%%<mt:CommentParent><$MTCommentAuthor$></mt:CommentParent>"> 
    3641                                                <mt:else> 
    37                                                     <MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> <span class="vcard author"><$MTCommentAuthorLink default_name="Anonymous" show_email="0"$></span> 
     42                                                    <$MTCommentAuthorIdentity$> 
     43                                                    <span class="vcard author"><$MTCommentAuthorLink$></span> 
    3844                                                </mt:IfCommentParent> 
    3945                                                | <a href="#comment-<$MTCommentID$>"><abbr class="published" title="<$MTCommentDate format_name="iso8601"$>"><$MTCommentDate$></abbr></a> 
    40                                                 <MTIfCommentsAccepted> | <$MTCommentReplyLink$></MTIfCommentsAccepted> 
    4146                                            </span> 
    4247                                        </div> 
     
    5055 
    5156<mt:ignore><!-- Comment Form --></mt:ignore> 
    52 <MTIfCommentsAccepted> 
    5357                            <div class="comments-open" id="comments-open"> 
    5458                                <h2 class="comments-open-header"><__trans phrase="Leave a comment"></h2> 
    5559                                <div class="comments-open-content"> 
    56     <MTIfRegistrationAllowed> 
    57                                         <div id="comment-form-external-auth"> 
    58                                             <script type="text/javascript"> 
    59                                             /* <![CDATA[ */ 
    60                                             is_preview = true; 
    61                                             writeCommenterGreeting(commenter_name, <$MTEntryID$>, <$MTEntryBlogID$>, commenter_id, commenter_url); 
    62                                             /* ]]> */ 
    63                                             </script> 
    64                                         </div> 
    65     </MTIfRegistrationAllowed> 
    66                                     <form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="if (this.bakecookie.checked) rememberMe(this)"> 
     60                                    <div id="comment-greeting"></div> 
     61                                    <form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" id="comments-form" onsubmit="mtCommentOnSubmit(this)"> 
    6762                                        <input type="hidden" name="static" value="1" /> 
     63                                        <input type="hidden" name="armor" value="1" /> 
     64                                        <input type="hidden" name="preview" value="" /> 
    6865                                        <input type="hidden" name="entry_id" value="<$MTEntryID$>" /> 
    6966                                        <input type="hidden" name="__lang" value="<$MTBlogLanguage$>" /> 
     
    8178                                                <input id="comment-url" name="url" size="30" value="<$MTCommentURL encode_html="1"$>" /> 
    8279                                            </div> 
    83                                             <div id="comment-form-remember-me"> 
    84                                                 <label for="comment-bake-cookie"><input type="checkbox" id="comment-bake-cookie" name="bakecookie" onclick="if (!this.checked) forgetMe(document.comments_form)" value="1" /> 
    85                                                     <__trans phrase="Remember personal info?"></label> 
    86                                             </div> 
    8780                                        </div> 
    8881                                        <div id="comments-open-text"> 
     
    9083                                            <textarea id="comment-text" name="text" rows="15" cols="50"><$MTCommentBody autolink="0" sanitize="0" convert_breaks="0" encode_html="1"$></textarea> 
    9184                                        </div> 
    92     <MTIfNonEmpty tag="MTCaptchaFields"> 
    93                                         <MTIfCommentsAccepted><MTIfRegistrationAllowed><MTElse><$MTCaptchaFields$></MTIfRegistrationAllowed></MTIfCommentsAccepted> 
    94                                         <div id="comments-open-captcha"> 
    95                                         </div> 
    96     </MTIfNonEmpty> 
     85                                        <div id="comments-open-captcha"></div> 
    9786                                        <div id="comments-open-footer"> 
    98                                             <input type="submit" accesskey="v" name="preview" id="comment-preview" value="<__trans phrase="Preview">" /> 
     87                                            <input type="submit" accesskey="v" name="preview_button" id="comment-preview" value="<__trans phrase="Preview">" onclick="this.form.preview.value='1';" /> 
    9988                                            <input type="submit" accesskey="s" name="post" id="comment-submit" value="<__trans phrase="Submit">" /> 
    10089                                            <input type="button" name="cancel" id="comment-cancel" value="<__trans phrase="Cancel">" onclick="window.location='<$MTEntryPermalink$>'" /> 
     
    10392                                </div> 
    10493                            </div> 
    105 </MTIfCommentsAccepted> 
    10694                        </div> 
    10795                    </div>