Changeset 2087 in products for quintagroup.plonecomments


Ignore:
Timestamp:
Apr 8, 2010 3:39:31 PM (14 years ago)
Author:
kroman0
Message:

Rewrited kss to jquery and added some features

Location:
quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/browser/comments.pt

    r1840 r2087  
    4848                    <span i18n:translate="label_commented_at">at</span> 
    4949                    <span tal:replace="python:view.format_time(reply.ModificationDate())">8/23/2001 12:40:44 PM</span> 
    50                     <span tal:condition="python:ifModerate and not isPublished">[pending]</span> 
     50                    <span i18n:domain="quintagroup.plonecomments" 
     51                          i18n:translate="label_pending_state" 
     52                          tal:condition="python:ifModerate and not isPublished">[pending]</span> 
    5153                </div> 
    5254                <div class="commentBody" 
     
    6365                           type="submit" 
    6466                           value="Reply" 
     67                           tal:define="onclick string:javascript:render_edit_form(${comment_id},'reply')" 
     68                           tal:attributes="onclick python:isAjaxReportAbuseEnabled and onclick or ''" 
    6569                           i18n:attributes="value label_reply;" 
    6670                           /> 
     
    7579                           type="submit" 
    7680                           value="Edit" 
     81                           tal:define="onclick string:javascript:render_edit_form(${comment_id},'edit')" 
     82                           tal:attributes="onclick python:isAjaxReportAbuseEnabled and onclick or ''" 
    7783                           i18n:attributes="value label_edit;" 
    7884                           /> 
     
    8793                           type="submit" 
    8894                           value="Remove" 
     95                           tal:define="onclick string:javascript:render_delete_comment(${comment_id})" 
     96                           tal:attributes="onclick python:isAjaxReportAbuseEnabled and onclick or ''" 
    8997                           i18n:attributes="value label_remove;" 
    9098                           /> 
    9199                </form> 
    92                 <tal:if tal:condition="python:isReportAbuseEnabled and isPublished"> 
    93                     <form class="report_abuse" 
    94                           name="report_abuse" 
    95                           method="post" 
    96                           style="display: inline;" 
    97                           i18n:domain="quintagroup.plonecomments" 
    98                           tal:attributes="action string:${reply/absolute_url}/report_abuse_form#discussion"> 
    99                         <input type="hidden" name="comment_id" tal:attributes="value comment_id" /> 
    100                         <input class="standalone" 
    101                             type="submit" 
    102                             value="Report Abuse" 
    103                             tal:define="onclick string:javascript:render_abuse_report_form(${comment_id})" 
    104                             tal:attributes="onclick python:not isAnon and isAjaxReportAbuseEnabled and onclick or ''; 
    105                                             id string:input-render-abuse-cancel-${comment_id}" 
    106                             i18n:attributes="value label_report_abuse;" 
    107                             /> 
    108                     </form> 
    109                     <span tal:attributes="id string:span-reply-form-holder-${comment_id}" 
    110                             tal:condition="isReportAbuseEnabled"> 
    111                         <metal:macro use-macro="here/report_abuse_form/macros/form"/> 
    112                     </span> 
    113                     <span tal:attributes="id string:span-abuse-count-holder-${comment_id}"></span> 
    114                 </tal:if> 
     100                <form name="report_abuse" 
     101                      action="" 
     102                      method="post" 
     103                      style="display: inline;" 
     104                      i18n:domain="quintagroup.plonecomments" 
     105                      tal:condition="python:isReportAbuseEnabled and isPublished" 
     106                      tal:attributes="action string:${reply/absolute_url}/report_abuse_form#discussion"> 
     107                    <input class="standalone" 
     108                        type="submit" 
     109                        value="Report Abuse" 
     110                        tal:define="onclick string:javascript:render_edit_form(${comment_id},'report_abuse')" 
     111                        tal:attributes="onclick python:isAjaxReportAbuseEnabled and onclick or ''" 
     112                        i18n:attributes="value label_report_abuse;" 
     113                        /> 
     114                </form> 
    115115                <form name="publish_discussion" 
    116116                      action="" 
     
    131131                     i18n:domain="quintagroup.plonecomments" 
    132132                     tal:condition="not:isPublished">Comment must be approved before replies to comment accepted.</div> 
     133                <span tal:attributes="id string:span-forms-holder-${comment_id}"></span> 
    133134            </div> 
    134135        </tal:getreplies> 
    135136 
    136137        <!-- Start of Adding comment form--> 
    137         <tal:addcomment define="template_id string:discussion_reply_form;"> 
     138        <form id="reply" 
     139              name="reply" 
     140              action="" 
     141              method="post" 
     142              tal:condition="python:isAjaxReportAbuseEnabled and userHasReplyPermission and isDiscussionAllowed" 
     143              tal:attributes="action string:${context/absolute_url}/discussion_reply_form"> 
     144 
     145              <input class="standalone" 
     146                     style="margin-bottom: 1.25em;" 
     147                     type="button" 
     148                     value="Add Comment" 
     149                     tal:attributes="onclick string:javascript:render_comment_form()" 
     150                     i18n:attributes="value label_add_comment;" 
     151                     /> 
     152        </form> 
     153 
     154        <tal:addcomment condition="python:not isAjaxReportAbuseEnabled" 
     155                        define="template_id string:discussion_reply_form;"> 
    138156            <metal:block metal:use-macro="here/discussion_reply_form/macros/add-comment-form" /> 
    139157        </tal:addcomment> 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/browser/comments.py

    r1625 r2087  
    106106        """ """ 
    107107        return getToolByName(self.context, 'portal_url') 
    108  
    109  
    110  
    111 class CommentsKSS(PloneKSSView): 
    112     """ Operations on the report abuse form using KSS. 
    113     """    
    114  
    115     def submit_abuse_report(self): 
    116         """ Send an email with the abuse report message and hide abuse report form. 
    117         """ 
    118         errors = {} 
    119         context = aq_inner(self.context) 
    120         request = context.REQUEST 
    121         portal = getToolByName(self.context, 'portal_url').getPortalObject() 
    122         if hasattr(context, 'captcha_validator'): 
    123             dummy_controller_state = ControllerState( 
    124                                             id='comments.pt', 
    125                                             context=context, 
    126                                             button='submit', 
    127                                             status='success', 
    128                                             errors={}, 
    129                                             next_action=None,) 
    130             # get the form controller 
    131             controller = portal.portal_form_controller 
    132             # send the validate script to the form controller with the dummy state object 
    133             controller_state = controller.validate(dummy_controller_state, request, ['captcha_validator',]) 
    134             errors.update(controller_state.errors) 
    135  
    136         message = request.get('message') 
    137         if not message: 
    138             errors.update({'message': 'Please provide a message'}) 
    139  
    140         mtool = getToolByName(self.context, "portal_membership") 
    141         member = mtool.getAuthenticatedMember() 
    142         comment_id = self.context.request.get('comment_id') 
    143         ksscore = self.getCommandSet('core') 
    144         if errors: 
    145             html = self.macroContent('context/report_abuse_form/macros/form', 
    146                                      errors=errors, 
    147                                      show_form=True, 
    148                                      tabindex=IndexIterator(), 
    149                                      member=member, 
    150                                      **request.form) 
    151             node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % comment_id) 
    152             ksscore.replaceInnerHTML(node,  html) 
    153             return self.render() 
    154  
    155         # report_abuse(context, context, message, comment) 
    156         manage_mails(context, self.context, 'report_abuse') 
    157  
    158         html = self.macroContent('context/report_abuse_form/macros/form', 
    159                                  tabindex=IndexIterator(), 
    160                                  member=member, 
    161                                  **request.form) 
    162         node = ksscore.getHtmlIdSelector('span-reply-form-holder-%s' % comment_id) 
    163         html = '<br/><span style="color:red">You have reported this comment for abuse.</span>' 
    164         self.commands.addCommand('remove_abuse_report_form',  
    165                                  node,  
    166                                  comment_id=comment_id,  
    167                                  html=html) 
    168  
    169         node = ksscore.getHtmlIdSelector('div-captcha-%s' % comment_id) 
    170         html = self.macroContent('context/report_abuse_form/macros/captcha', 
    171                                  **request.form) 
    172         ksscore.replaceInnerHTML(node,  html) 
    173         return self.render() 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/de/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    55msgstr "" 
    66"Project-Id-Version: PACKAGE VERSION\n" 
    7 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     7"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    88"PO-Revision-Date: 2006-12-29 11:01+0100\n" 
    99"Last-Translator: \n" 
     
    3636msgstr "Kommentar(e) veröffentlicht." 
    3737 
    38 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     38#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3939msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    4040msgstr "" 
     
    8484 
    8585#. Default: "[${organization_name}] New comment awaits moderation" 
    86 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     86#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8787msgid "approve_notification_subject" 
    8888msgstr "" 
    8989 
    9090#. Default: "Your comment on ${title} is now published" 
    91 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     91#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9292msgid "approve_user_notification_subject" 
    9393msgstr "" 
     
    9797msgid "approvemail_new_comment_link" 
    9898msgstr "Bitte schalten Sie den neuen Kommentar auf der Seite ' ${title} ': ${here_url} frei " 
     99 
     100#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     101#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     102msgid "description_edit_comment" 
     103msgstr "" 
    99104 
    100105#. Default: "Enable Manager moderation" 
     
    227232msgstr "Email Betreff" 
    228233 
     234#. Default: "[pending]" 
     235#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     236msgid "label_pending_state" 
     237msgstr "" 
     238 
    229239#. Default: "Report Abuse" 
    230 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     240#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    231241msgid "label_report_abuse" 
    232242msgstr "" 
     
    235245#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:96 
    236246msgid "label_require_anonym_email" 
     247msgstr "" 
     248 
     249#. Default: "Edit comment" 
     250#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     251msgid "legend_edit_comment" 
    237252msgstr "" 
    238253 
     
    273288 
    274289#. Default: "[${organization_name}] New comment added" 
    275 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     290#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    276291msgid "published_notification_subject" 
    277292msgstr "" 
     
    293308 
    294309#. Default: "Your comment on ${title} was not approved" 
    295 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     310#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    296311msgid "rejected_user_notification_subject" 
    297312msgstr "" 
    298313 
    299314#. Default: "Someone replied to your comment on ${title}" 
    300 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     315#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    301316msgid "reply_user_notification_subject" 
    302317msgstr "" 
     
    308323 
    309324#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    310 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     325#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    311326msgid "report_abuse_subject" 
    312327msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/es/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    55msgstr "" 
    66"Project-Id-Version: qPloneComments\n" 
    7 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     7"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    88"PO-Revision-Date: 2007-04-19 20:21-0600\n" 
    99"Last-Translator: Héctor Velarde <hvelarde@jornada.com.mx>\n" 
     
    3636msgstr "Comentario(s) publicados." 
    3737 
    38 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     38#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3939msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    4040msgstr "" 
     
    8484 
    8585#. Default: "[${organization_name}] New comment awaits moderation" 
    86 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     86#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8787msgid "approve_notification_subject" 
    8888msgstr "" 
    8989 
    9090#. Default: "Your comment on ${title} is now published" 
    91 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     91#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9292msgid "approve_user_notification_subject" 
    9393msgstr "" 
     
    9797msgid "approvemail_new_comment_link" 
    9898msgstr "Por favor revise el nuevo comentario agregado a la siguiente página ' ${title} ': ${here_url}" 
     99 
     100#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     101#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     102msgid "description_edit_comment" 
     103msgstr "" 
    99104 
    100105#. Default: "Enable Manager moderation" 
     
    227232msgstr "Prefijo del asunto del mensaje (nombre de la organización)" 
    228233 
     234#. Default: "[pending]" 
     235#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     236msgid "label_pending_state" 
     237msgstr "" 
     238 
    229239#. Default: "Report Abuse" 
    230 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     240#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    231241msgid "label_report_abuse" 
    232242msgstr "" 
     
    235245#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:96 
    236246msgid "label_require_anonym_email" 
     247msgstr "" 
     248 
     249#. Default: "Edit comment" 
     250#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     251msgid "legend_edit_comment" 
    237252msgstr "" 
    238253 
     
    273288 
    274289#. Default: "[${organization_name}] New comment added" 
    275 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     290#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    276291msgid "published_notification_subject" 
    277292msgstr "" 
     
    293308 
    294309#. Default: "Your comment on ${title} was not approved" 
    295 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     310#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    296311msgid "rejected_user_notification_subject" 
    297312msgstr "" 
    298313 
    299314#. Default: "Someone replied to your comment on ${title}" 
    300 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     315#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    301316msgid "reply_user_notification_subject" 
    302317msgstr "" 
     
    308323 
    309324#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    310 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     325#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    311326msgid "report_abuse_subject" 
    312327msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/fr/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    55msgstr "" 
    66"Project-Id-Version: PACKAGE VERSION\n" 
    7 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     7"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    88"PO-Revision-Date: 2006-11-10 08:59-0500\n" 
    99"Last-Translator: Nicole Turgeon-Courchesne <nicole@motspourmaux.com>\n" 
     
    3636msgstr "Commentaires publiés" 
    3737 
    38 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     38#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3939msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    4040msgstr "" 
     
    8484 
    8585#. Default: "[${organization_name}] New comment awaits moderation" 
    86 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     86#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8787msgid "approve_notification_subject" 
    8888msgstr "" 
    8989 
    9090#. Default: "Your comment on ${title} is now published" 
    91 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     91#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9292msgid "approve_user_notification_subject" 
    9393msgstr "" 
     
    9797msgid "approvemail_new_comment_link" 
    9898msgstr "Réviser le nouveau commentaire ajouté à la page suivante  ' ${title} ': ${here_url}" 
     99 
     100#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     101#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     102msgid "description_edit_comment" 
     103msgstr "" 
    99104 
    100105#. Default: "Enable Manager moderation" 
     
    227232msgstr "Préfixe de l’objet du courriel (nom de l’organisme)" 
    228233 
     234#. Default: "[pending]" 
     235#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     236msgid "label_pending_state" 
     237msgstr "" 
     238 
    229239#. Default: "Report Abuse" 
    230 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     240#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    231241msgid "label_report_abuse" 
    232242msgstr "" 
     
    235245#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:96 
    236246msgid "label_require_anonym_email" 
     247msgstr "" 
     248 
     249#. Default: "Edit comment" 
     250#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     251msgid "legend_edit_comment" 
    237252msgstr "" 
    238253 
     
    273288 
    274289#. Default: "[${organization_name}] New comment added" 
    275 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     290#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    276291msgid "published_notification_subject" 
    277292msgstr "" 
     
    293308 
    294309#. Default: "Your comment on ${title} was not approved" 
    295 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     310#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    296311msgid "rejected_user_notification_subject" 
    297312msgstr "" 
    298313 
    299314#. Default: "Someone replied to your comment on ${title}" 
    300 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     315#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    301316msgid "reply_user_notification_subject" 
    302317msgstr "" 
     
    308323 
    309324#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    310 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     325#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    311326msgid "report_abuse_subject" 
    312327msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/it/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    55msgstr "" 
    66"Project-Id-Version: qPloneComments\n" 
    7 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     7"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    88"PO-Revision-Date: 2007-04-19 20:21-0600\n" 
    99"Last-Translator: Yuri Carrer <yurj@alfa.it>\n" 
     
    3636msgstr "Commento(i) pubblicati" 
    3737 
    38 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     38#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3939msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    4040msgstr "" 
     
    8484 
    8585#. Default: "[${organization_name}] New comment awaits moderation" 
    86 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     86#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8787msgid "approve_notification_subject" 
    8888msgstr "" 
    8989 
    9090#. Default: "Your comment on ${title} is now published" 
    91 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     91#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9292msgid "approve_user_notification_subject" 
    9393msgstr "" 
     
    9797msgid "approvemail_new_comment_link" 
    9898msgstr "Per favore modera il commento inserito nella pagina ' ${title} ': ${hete_url}" 
     99 
     100#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     101#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     102msgid "description_edit_comment" 
     103msgstr "" 
    99104 
    100105#. Default: "Enable Manager moderation" 
     
    227232msgstr "Prefisso del messaggio (nome dell' organizzazione)" 
    228233 
     234#. Default: "[pending]" 
     235#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     236msgid "label_pending_state" 
     237msgstr "" 
     238 
    229239#. Default: "Report Abuse" 
    230 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     240#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    231241msgid "label_report_abuse" 
    232242msgstr "" 
     
    235245#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:96 
    236246msgid "label_require_anonym_email" 
     247msgstr "" 
     248 
     249#. Default: "Edit comment" 
     250#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     251msgid "legend_edit_comment" 
    237252msgstr "" 
    238253 
     
    273288 
    274289#. Default: "[${organization_name}] New comment added" 
    275 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     290#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    276291msgid "published_notification_subject" 
    277292msgstr "" 
     
    293308 
    294309#. Default: "Your comment on ${title} was not approved" 
    295 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     310#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    296311msgid "rejected_user_notification_subject" 
    297312msgstr "" 
    298313 
    299314#. Default: "Someone replied to your comment on ${title}" 
    300 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     315#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    301316msgid "reply_user_notification_subject" 
    302317msgstr "" 
     
    308323 
    309324#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    310 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     325#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    311326msgid "report_abuse_subject" 
    312327msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/nl/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    44msgstr "" 
    55"Project-Id-Version: PACKAGE VERSION\n" 
    6 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     6"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    77"PO-Revision-Date: 2006-12-29 11:01+0100\n" 
    88"Last-Translator: Kees Hink\n" 
     
    3535msgstr "" 
    3636 
    37 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     37#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3838msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    3939msgstr "" 
     
    8383 
    8484#. Default: "[${organization_name}] New comment awaits moderation" 
    85 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     85#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8686msgid "approve_notification_subject" 
    8787msgstr "" 
    8888 
    8989#. Default: "Your comment on ${title} is now published" 
    90 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     90#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9191msgid "approve_user_notification_subject" 
    9292msgstr "" 
     
    9696msgid "approvemail_new_comment_link" 
    9797msgstr "Bekijk alstublieft het commentaar op de volgende pagina ' ${title} ': ${here_url} " 
     98 
     99#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     100#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     101msgid "description_edit_comment" 
     102msgstr "" 
    98103 
    99104#. Default: "Enable Manager moderation" 
     
    226231msgstr "Voorvoegsel in onderwerp van email (naam van organisatie)" 
    227232 
     233#. Default: "[pending]" 
     234#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     235msgid "label_pending_state" 
     236msgstr "" 
     237 
    228238#. Default: "Report Abuse" 
    229 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     239#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    230240msgid "label_report_abuse" 
    231241msgstr "" 
     
    236246msgstr "Anonieme inzenders moeten hun e-mailadres opgeven." 
    237247 
     248#. Default: "Edit comment" 
     249#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     250msgid "legend_edit_comment" 
     251msgstr "" 
     252 
    238253#. Default: "Email Notification Options" 
    239254#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:255 
     
    272287 
    273288#. Default: "[${organization_name}] New comment added" 
    274 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     289#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    275290msgid "published_notification_subject" 
    276291msgstr "" 
     
    292307 
    293308#. Default: "Your comment on ${title} was not approved" 
    294 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     309#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    295310msgid "rejected_user_notification_subject" 
    296311msgstr "" 
    297312 
    298313#. Default: "Someone replied to your comment on ${title}" 
    299 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     314#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    300315msgid "reply_user_notification_subject" 
    301316msgstr "" 
     
    307322 
    308323#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    309 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     324#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    310325msgid "report_abuse_subject" 
    311326msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/pt-br/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    33msgstr "" 
    44"Project-Id-Version: qPloneComments\n" 
    5 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     5"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    66"PO-Revision-Date: 2008-07-18 03:51-0300\n" 
    77"Last-Translator: Érico Andrei <erico@simplesconsultoria.com.br>\n" 
     
    3333msgstr "Comentário(s) publicado(s)" 
    3434 
    35 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     35#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3636msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    3737msgstr "" 
     
    8181 
    8282#. Default: "[${organization_name}] New comment awaits moderation" 
    83 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     83#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8484msgid "approve_notification_subject" 
    8585msgstr "" 
    8686 
    8787#. Default: "Your comment on ${title} is now published" 
    88 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     88#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    8989msgid "approve_user_notification_subject" 
    9090msgstr "" 
     
    9494msgid "approvemail_new_comment_link" 
    9595msgstr "Por favor avalie o novo comentário adicionado à página ' ${title} ': ${here_url}" 
     96 
     97#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     98#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     99msgid "description_edit_comment" 
     100msgstr "" 
    96101 
    97102#. Default: "Enable Manager moderation" 
     
    224229msgstr "Prefixo do assunto do e-mail (nome do site)" 
    225230 
     231#. Default: "[pending]" 
     232#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     233msgid "label_pending_state" 
     234msgstr "" 
     235 
    226236#. Default: "Report Abuse" 
    227 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     237#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    228238msgid "label_report_abuse" 
    229239msgstr "" 
     
    234244msgstr "Requerer e-mail de usuários anônimos." 
    235245 
     246#. Default: "Edit comment" 
     247#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     248msgid "legend_edit_comment" 
     249msgstr "" 
     250 
    236251#. Default: "Email Notification Options" 
    237252#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:255 
     
    270285 
    271286#. Default: "[${organization_name}] New comment added" 
    272 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     287#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    273288msgid "published_notification_subject" 
    274289msgstr "" 
     
    290305 
    291306#. Default: "Your comment on ${title} was not approved" 
    292 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     307#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    293308msgid "rejected_user_notification_subject" 
    294309msgstr "" 
    295310 
    296311#. Default: "Someone replied to your comment on ${title}" 
    297 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     312#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    298313msgid "reply_user_notification_subject" 
    299314msgstr "" 
     
    305320 
    306321#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    307 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     322#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    308323msgid "report_abuse_subject" 
    309324msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/quintagroup.plonecomments.pot

    r1718 r2087  
    55msgstr "" 
    66"Project-Id-Version: PACKAGE VERSION\n" 
    7 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     7"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    88"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n" 
    99"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 
     
    3535msgstr "" 
    3636 
    37 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     37#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    3838msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    3939msgstr "" 
     
    8383 
    8484#. Default: "[${organization_name}] New comment awaits moderation" 
    85 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     85#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    8686msgid "approve_notification_subject" 
    8787msgstr "" 
    8888 
    8989#. Default: "Your comment on ${title} is now published" 
    90 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     90#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9191msgid "approve_user_notification_subject" 
    9292msgstr "" 
     
    9595#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/approve_comment_template.pt:10 
    9696msgid "approvemail_new_comment_link" 
     97msgstr "" 
     98 
     99#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     100#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     101msgid "description_edit_comment" 
    97102msgstr "" 
    98103 
     
    226231msgstr "" 
    227232 
     233#. Default: "[pending]" 
     234#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     235msgid "label_pending_state" 
     236msgstr "" 
     237 
    228238#. Default: "Report Abuse" 
    229 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     239#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    230240msgid "label_report_abuse" 
    231241msgstr "" 
     
    236246msgstr "" 
    237247 
     248#. Default: "Edit comment" 
     249#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     250msgid "legend_edit_comment" 
     251msgstr "" 
     252 
    238253#. Default: "Email Notification Options" 
    239254#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/prefs_comments_setup_form.cpt:255 
     
    272287 
    273288#. Default: "[${organization_name}] New comment added" 
    274 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     289#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    275290msgid "published_notification_subject" 
    276291msgstr "" 
     
    291306 
    292307#. Default: "Your comment on ${title} was not approved" 
    293 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     308#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    294309msgid "rejected_user_notification_subject" 
    295310msgstr "" 
    296311 
    297312#. Default: "Someone replied to your comment on ${title}" 
    298 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     313#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    299314msgid "reply_user_notification_subject" 
    300315msgstr "" 
     
    306321 
    307322#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    308 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     323#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    309324msgid "report_abuse_subject" 
    310325msgstr "" 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/locales/uk/LC_MESSAGES/quintagroup.plonecomments.po

    r1718 r2087  
    77msgstr "" 
    88"Project-Id-Version: qPloneComments\n" 
    9 "POT-Creation-Date: 2010-02-11 16:40+0000\n" 
     9"POT-Creation-Date: 2010-04-08 15:31+0000\n" 
    1010"PO-Revision-Date: 2008-09-22 10:55+0300\n" 
    1111"Last-Translator: Olha <olha.pelishok@gmail.com>\n" 
     
    3939msgstr "Коментар(і) опубліковано." 
    4040 
    41 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:228 
     41#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:235 
    4242msgid "Could not send the email notification. Have you configured an email server for Plone?" 
    4343msgstr "Не вдалося відправити повідомлення по електронній пошті. Ви налаштували сервер електронної пошти для Plone?" 
     
    8787 
    8888#. Default: "[${organization_name}] New comment awaits moderation" 
    89 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:186 
     89#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:193 
    9090msgid "approve_notification_subject" 
    9191msgstr "[${organization_name}] Новий коментар очікує на модерацію" 
    9292 
    9393#. Default: "Your comment on ${title} is now published" 
    94 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:114 
     94#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:121 
    9595msgid "approve_user_notification_subject" 
    9696msgstr "Ваш коментар на ${title} тепер опублікований" 
     
    100100msgid "approvemail_new_comment_link" 
    101101msgstr "Будь-ласка, перегляньте новий коментар, доданий до сторінки ' ${title} ': ${here_url}" 
     102 
     103#. Default: "You can edit a comment by filling out the form below. Plain text formatting." 
     104#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:38 
     105msgid "description_edit_comment" 
     106msgstr "Ви можете редагувати коментар, заповнивши форму нижче." 
    102107 
    103108#. Default: "Enable Manager moderation" 
     
    230235msgstr "Префікс заголовка електронних листів (назва організації)" 
    231236 
     237#. Default: "[pending]" 
     238#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:50 
     239msgid "label_pending_state" 
     240msgstr "[в очікуванні]" 
     241 
    232242#. Default: "Report Abuse" 
    233 #: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:100 
     243#: ./quintagroup.plonecomments/quintagroup/plonecomments/browser/comments.pt:107 
    234244msgid "label_report_abuse" 
    235245msgstr "Надіслати скаргу" 
     
    239249msgid "label_require_anonym_email" 
    240250msgstr "Вимагати електронну адресу від Анонімного користувача." 
     251 
     252#. Default: "Edit comment" 
     253#: ./quintagroup.plonecomments/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt:36 
     254msgid "legend_edit_comment" 
     255msgstr "Редагувати коментар" 
    241256 
    242257#. Default: "Email Notification Options" 
     
    290305 
    291306#. Default: "[${organization_name}] New comment added" 
    292 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:171 
     307#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:178 
    293308msgid "published_notification_subject" 
    294309msgstr "[${organization_name}] Доданий новий коментар" 
     
    310325 
    311326#. Default: "Your comment on ${title} was not approved" 
    312 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:129 
     327#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:136 
    313328msgid "rejected_user_notification_subject" 
    314329msgstr "Ваш коментар на ${title} відхилений" 
    315330 
    316331#. Default: "Someone replied to your comment on ${title}" 
    317 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:145 
     332#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:152 
    318333msgid "reply_user_notification_subject" 
    319334msgstr "Хтось відповів на ваш коментар на ${title}" 
     
    325340 
    326341#. Default: "[${organization_name}] A comment on ${title} has been reported for abuse." 
    327 #: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:211 
     342#: ./quintagroup.plonecomments/quintagroup/plonecomments/utils.py:218 
    328343msgid "report_abuse_subject" 
    329344msgstr "[${organization_name}] Коментар на ${title} повідомлений як образливий." 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_edit_form.cpt

    r1631 r2087  
    3434        <fieldset> 
    3535 
    36             <legend i18n:translate="legend_edit_comment">Edit comment</legend> 
    37             <p i18n:translate="description_edit_comment"> 
     36            <legend i18n:domain="quintagroup.plonecomments" 
     37                    i18n:translate="legend_edit_comment">Edit comment</legend> 
     38            <p i18n:domain="quintagroup.plonecomments" 
     39               i18n:translate="description_edit_comment"> 
    3840                You can edit a comment by filling out the form below. Plain text 
    3941                formatting. 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_reply_form.cpt

    r1631 r2087  
    252252                       i18n:attributes="value label_save;" 
    253253                       tal:attributes="name string:discussion_reply:method;" /> 
     254                <input class="standalone" 
     255                       type="submit" 
     256                       value="Cancel" 
     257                       name="form.button.Cancel" 
     258                       i18n:attributes="value label_cancel;" /> 
    254259 
    255260            </div> 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/discussion_reply_form.cpt.metadata

    r822 r2087  
    44[validators] 
    55validators = validate_talkback 
     6validators..Cancel= 
    67 
    78[actions] 
    8 action.success = traverse_to:string:discussion_reply 
     9action.success = redirect_to:string:view 
     10action.success..Save = traverse_to:string:discussion_reply 
    911action.failure = traverse_to:string:discussion_reply_form 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/qcomments.js

    r1201 r2087  
    1 function render_abuse_report_form(comment_id) { 
    2     jq('form.report_abuse').bind("submit", function(event){ 
     1function render_edit_form(comment_id, form_name) { 
     2    var cholder = jq("#"+comment_id).parent(); 
     3    var cform = jq("form[name='"+form_name+"']",cholder); 
     4    var url = jq(cform).attr("action"); 
     5    var cspan = jq("#span-forms-holder-"+comment_id); 
     6    cspan.hide().empty() 
     7    jq(cform).bind("submit", function(event){ 
    38        event.preventDefault(); 
    49    }); 
    5     var render_button = 'input#input-render-abuse-cancel-' + comment_id; 
    6     jq(render_button).attr('disabled', 'disabled'); 
    7     var form = 'span#span-reply-form-' + comment_id; 
    8     jq(form).slideToggle(500); 
    9     var holder = 'span#span-reply-form-holder-' + comment_id; 
    10     var cancel_button = holder + ' input#input-report-abuse-cancel'; 
    11     var qq = jq(cancel_button); 
    12     jq(cancel_button).attr('comment_id', comment_id); 
     10    jq.get(url, 
     11    function(data){ 
     12        jq("input", cform).attr("disabled", "disabled"); 
     13        ddt = jq("form[name='edit_form']", data)[0]; 
     14        cspan.append(ddt).slideToggle(1000); 
     15        jq("input[name='form.button.Cancel']",cspan).attr("onclick", "javascript:remove_edit_form("+comment_id+",'"+form_name+"')"); 
     16    }); 
    1317} 
    1418 
    15 function remove_abuse_report_form(comment_id, html) { 
    16     jq('form.report_abuse').bind("submit", function(event){ 
     19function remove_edit_form(comment_id, form_name) { 
     20    var cholder = jq("#"+comment_id).parent(); 
     21    var cform = jq(cholder).find("form[name='"+form_name+"']"); 
     22    var cspan = jq("#span-forms-holder-"+comment_id); 
     23    jq("form",cspan).bind("submit", function(event){ 
    1724        event.preventDefault(); 
    1825    }); 
    19     var form = 'span#span-reply-form-' + comment_id; 
    20     jq(form).fadeOut(); 
    21     var render_button = 'input#input-render-abuse-cancel-' + comment_id; 
    22     jq(render_button).attr('disabled', ''); 
    23     if (html != undefined) { 
    24         var holder = 'span#span-abuse-count-holder-' + comment_id; 
    25         jq(holder).append(html); 
    26     } 
     26    jq("input", cform).attr("disabled", ''); 
     27    cspan.fadeOut(); 
    2728} 
    2829 
    29 kukit.actionsGlobalRegistry.register("remove_abuse_report_form", function(oper) { 
    30     var comment_id = oper.parms.comment_id; 
    31     var html = oper.parms.html 
    32     remove_abuse_report_form(comment_id, html); 
    33 }); 
    34 kukit.commandsGlobalRegistry.registerFromAction('remove_abuse_report_form', kukit.cr.makeSelectorCommand); 
     30function render_delete_comment(comment_id) { 
     31    var cholder = jq("#"+comment_id).parent(); 
     32    var cform = jq("form[name='delete']",cholder); 
     33    var url = jq(cform).attr("action"); 
     34    jq(cform).bind("submit", function(event){ 
     35        event.preventDefault(); 
     36    }); 
     37    jq(cholder).detach() 
     38    jq.post(url); 
     39} 
     40 
     41function render_comment_form() { 
     42    var cform = jq("form#reply"); 
     43    var url = jq(cform).attr("action"); 
     44    jq(cform).bind("submit", function(event){ 
     45        event.preventDefault(); 
     46    }); 
     47    jq.get(url, 
     48    function(data){ 
     49        ddt = jq("form[name='edit_form']", data)[0]; 
     50        jq(cform).replaceWith(ddt); 
     51    }); 
     52} 
     53 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/report_abuse_form.cpt

    r1631 r2087  
    2121                        Iterator python:modules['Products.CMFPlone'].IndexIterator; 
    2222                        tabindex python:Iterator(mainSlot=False); 
    23                         isAnon context/@@plone_portal_state/anonymous; 
     23                        isAnon context/@@plone_portal_state/anonymous|string:False; 
    2424                        member context/@@plone_portal_state/member; 
    2525                        thread python:putils.getDiscussionThread(here); 
     
    8080                                comment_id context/id"> 
    8181                    <metal:macro define-macro="form" 
    82                             tal:define="isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled|python:portal.portal_properties.qPloneComments.enable_ajax_report_abuse; 
     82                            tal:define="isAjaxReportAbuseEnabled view/ajax_report_abuse_enabled|python:here.portal_properties.qPloneComments.enable_ajax_report_abuse; 
    8383                                        visible show_form|request/show_form|nothing; 
    8484                                        portal_url portal_url|view/portal_url; 
    85                                         tabindex tabindex|request/tabindex|view/tabindex; 
    86                                         member member|request/member|view/member;"> 
     85                                        isAnon isAnon|context/@@plone_portal_state/anonymous; 
     86                                        member member|context/@@plone_portal_state/member;"> 
    8787 
    8888                        <span tal:define="email_from_address portal/email_from_address|view/email_from_address; 
     
    198198                                                value="Send" 
    199199                                                type="submit" 
    200                                                 tal:attributes="comment_id comment_id; 
    201                                                                 class python:isAjaxReportAbuseEnabled  and 'context input-report-abuse-send' or 'context'" 
     200                                                class="context" 
     201                                                name="form.button.Send" 
     202                                                tal:attributes="comment_id comment_id" 
    202203                                                i18n:attributes="value label_send;" 
    203204                                                /> 
     
    207208                                                class="destructive" 
    208209                                                value="Cancel" 
    209                                                 type="button" 
    210                                                 tal:condition="isAjaxReportAbuseEnabled" 
    211                                                 tal:attributes="onclick string:javascript:remove_abuse_report_form(${comment_id})" 
     210                                                type="submit" 
     211                                                name="form.button.Cancel" 
    212212                                                i18n:attributes="value label_cancel;" 
    213213                                                /> 
  • quintagroup.plonecomments/branches/jquery/quintagroup/plonecomments/skins/quintagroup_plonecomments/report_abuse_form.cpt.metadata

    r1201 r2087  
    44[validators] 
    55validators = validate_report_abuse 
     6validators..Cancel= 
    67 
    78[actions] 
    8 action.success = traverse_to:string:report_abuse 
     9action.success = redirect_to:string:view 
     10action.success..Send = traverse_to:string:report_abuse 
    911action.failure = traverse_to:string:report_abuse_form 
Note: See TracChangeset for help on using the changeset viewer.