From c27d1b5cc15ac302695ad5237141bf73f61c8e3d Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Wed, 27 Jan 2010 14:54:07 +0000 Subject: [PATCH] De-tabbify svn path=/plone.app.discussion/trunk/; revision=33491 --- plone/app/discussion/browser/comments.pt | 2 +- plone/app/discussion/browser/configure.zcml | 8 +-- .../browser/javascripts/comments.js | 42 ++++++------- .../browser/javascripts/moderation.js | 10 +-- plone/app/discussion/browser/moderation.pt | 2 +- .../browser/stylesheets/discussion.css | 62 +++++++++---------- .../discussion/profiles/default/catalog.xml | 4 +- .../profiles/default/controlpanel.xml | 2 +- .../profiles/default/jsregistry.xml | 2 +- plone/app/discussion/tests/test_catalog.py | 2 +- 10 files changed, 68 insertions(+), 68 deletions(-) diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index c59f7fe..dd82c51 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -32,7 +32,7 @@ tal:define="reply reply_dict/comment; depth reply_dict/depth|python:0; author_home_url python:view.get_commenter_home_url(username=reply.author_username); - has_author_link python:author_home_url and not isAnon; + has_author_link python:author_home_url and not isAnon; portrait_url python:view.get_commenter_portrait(reply.author_username); review_state python:wtool.getInfoFor(reply, 'review_state');" tal:attributes="class python:'comment replyTreeLevel'+str(depth)+' state-'+str(review_state); diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index 6fb20e4..0fd0ab9 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -87,10 +87,10 @@ permission="zope2.View" /> - - + diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index 2d836d9..5ccd03d 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -5,7 +5,7 @@ jq(document).ready(function() { * comment form. *****************************************************************/ jq(".reply").find("input[name='form.buttons.reply']").css("display", "none"); - jq(".reply").find("input[name='form.buttons.cancel']").css("display", "none"); + jq(".reply").find("input[name='form.buttons.cancel']").css("display", "none"); /***************************************************************** @@ -14,13 +14,13 @@ jq(document).ready(function() { * the comment. *****************************************************************/ var post_comment_div = jq("#commenting"); - var in_reply_to_field = post_comment_div.find("input[name='form.widgets.in_reply_to']"); - if (in_reply_to_field.val() != "") { - var current_reply_id = "#" + in_reply_to_field.val(); - var current_reply_to_div = jq(".discussion").find(current_reply_id); + var in_reply_to_field = post_comment_div.find("input[name='form.widgets.in_reply_to']"); + if (in_reply_to_field.val() != "") { + var current_reply_id = "#" + in_reply_to_field.val(); + var current_reply_to_div = jq(".discussion").find(current_reply_id); createReplyForm(current_reply_to_div); - clearForm(post_comment_div); - } + clearForm(post_comment_div); + } /***************************************************************** * Remove the z3c.form error messages and all input values from a @@ -28,10 +28,10 @@ jq(document).ready(function() { *****************************************************************/ function clearForm(form_div) { form_div.find(".error").removeClass("error"); - form_div.find(".fieldErrorBox").remove(); + form_div.find(".fieldErrorBox").remove(); form_div.find("input[type='text']").attr("value", "") form_div.find("textarea").attr("value", "") - } + } /***************************************************************** * Create a reply-to-comment form right under the comment_div. @@ -50,7 +50,7 @@ jq(document).ready(function() { /* Remove the ReCaptcha JS code before appending the form. If not * removed, this causes problems */ - reply_div.find("#formfield-form-widgets-captcha").find("script").remove(); + reply_div.find("#formfield-form-widgets-captcha").find("script").remove(); /* Insert the cloned comment form right after the reply button of the * current comment. @@ -84,7 +84,7 @@ jq(document).ready(function() { /* Show the cancel button in the reply-to-comment form */ cancel_reply_button.css("display", "inline"); - } + } /***************************************************************** * Show the reply button only when Javascript is enabled. @@ -94,12 +94,12 @@ jq(document).ready(function() { /***************************************************************** - * Create reply to comment form. + * Create reply to comment form. *****************************************************************/ - jq(".reply-to-comment-button").bind("click", function(e){ + jq(".reply-to-comment-button").bind("click", function(e){ var comment_div = jq(this).parents().filter(".comment"); - createReplyForm(comment_div); - clearForm(comment_div); + createReplyForm(comment_div); + clearForm(comment_div); }); /***************************************************************** @@ -123,12 +123,12 @@ jq(document).ready(function() { *****************************************************************/ /* jq("input[name='form.button.DeleteComment']").click(function(e){ - e.preventDefault(); - var form = jq(this).parent(); + e.preventDefault(); + var form = jq(this).parent(); var target = jq(form).attr("action"); - var comment = jq(form).parent(); - var reply_comments = jq(comment).find("~ .comment:not(.replyTreeLevel0 ~ div)"); - reply_comments.css("background", "red"); + var comment = jq(form).parent(); + var reply_comments = jq(comment).find("~ .comment:not(.replyTreeLevel0 ~ div)"); + reply_comments.css("background", "red"); jq.ajax({ type: "GET", url: target, @@ -151,7 +151,7 @@ jq(document).ready(function() { /* jq("input[name='form.button.PublishComment']").click(function(e){ e.preventDefault(); - var button = jq(this); + var button = jq(this); var form = jq(this).parent(); var target = jq(form).attr("action"); var comment = jq(form).parent() diff --git a/plone/app/discussion/browser/javascripts/moderation.js b/plone/app/discussion/browser/javascripts/moderation.js index 8b05bb5..eb81acb 100644 --- a/plone/app/discussion/browser/javascripts/moderation.js +++ b/plone/app/discussion/browser/javascripts/moderation.js @@ -28,7 +28,7 @@ jq(document).ready(function() { var row = jq(this).parent().parent(); var form = jq(row).parents("form"); var path = jq(row).find("input:checkbox").attr("value"); - var target = path + "/@@moderate-delete-comment"; + var target = path + "/@@moderate-delete-comment"; var comment_id = jq(this).attr("id"); jq.ajax({ type: "GET", @@ -39,7 +39,7 @@ jq(document).ready(function() { jq(this).remove(); }); }, - error: function(msg){ + error: function(msg){ alert("Error sending AJAX request:" + target); } }); @@ -58,7 +58,7 @@ jq(document).ready(function() { jq.ajax({ type: "GET", url: target, - data: "workflow_action=publish", + data: "workflow_action=publish", success: function(msg){ // fade out row jq(row).fadeOut("normal", function(){ @@ -83,10 +83,10 @@ jq(document).ready(function() { var valArray = jq('input:checkbox:checked'); var selectField = jq(form).find("[name='form.select.BulkAction']"); if (selectField.val() == '-1') { - // XXX: translate message + // XXX: translate message alert("You haven't selected a bulk action. Please select one."); } else if (valArray.length == 0) { - // XXX: translate message + // XXX: translate message alert("You haven't selected any comment for this bulk action. Please select at least one comment."); } else { jq.post(target, params, function(data) { diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 91269e7..413f971 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -21,7 +21,7 @@

Moderate comments

- +

diff --git a/plone/app/discussion/browser/stylesheets/discussion.css b/plone/app/discussion/browser/stylesheets/discussion.css index 96aafdc..2c76f0a 100644 --- a/plone/app/discussion/browser/stylesheets/discussion.css +++ b/plone/app/discussion/browser/stylesheets/discussion.css @@ -9,34 +9,34 @@ ---------------------------------------------------------------- */ .discussion, #commenting { - /* Clear "float: left" from "manage portlets" div above the - comment viewlet. This will get fixed in the next Plone 4 - release. */ - clear: both; + /* Clear "float: left" from "manage portlets" div above the + comment viewlet. This will get fixed in the next Plone 4 + release. */ + clear: both; } .comment { - min-height: 100px; - overflow: auto; + min-height: 100px; + overflow: auto; } .commentImage { - width: 90px; - float: left; - margin-right: -90px; + width: 90px; + float: left; + margin-right: -90px; } .commentImage a:link { - /* Override the default bottom border of links in Plone 4. */ - border: 0px; + /* Override the default bottom border of links in Plone 4. */ + border: 0px; } .commentImage img { - margin-right: 1em; + margin-right: 1em; } .commentBody { - margin: 1em 0; + margin: 1em 0; } .showCommenterImage h3, @@ -44,9 +44,9 @@ .showCommenterImage .commentBody, .showCommenterImage .commentActions, .showCommenterImage .reply { - /* The showCommenterImage CSS class is only set if showing the - * commenters image is enabled. - */ + /* The showCommenterImage CSS class is only set if showing the + * commenters image is enabled. + */ margin-left: 90px; } @@ -55,22 +55,22 @@ ---------------------------------------------------------------- */ .reply fieldset { - /* Fix bouncing fieldset when reply form is shown. */ - margin: 0 !important; + /* Fix bouncing fieldset when reply form is shown. */ + margin: 0 !important; } .reply-to-comment-button { /* Hide the reply-to-comment button and show it only if Javascript * is enabled. Since the reply functions rely on jQuery. */ - display: none; + display: none; } .cancelreplytocomment { - /* Hide the cancel button in the comment form, show it only in the reply form - * in order to close it. - */ - display: none; + /* Hide the cancel button in the comment form, show it only in the reply form + * in order to close it. + */ + display: none; } @@ -78,11 +78,11 @@ ---------------------------------------------------------------- */ #bulkactions { - text-align: left; + text-align: left; } #dobulkaction { - margin: 0.3em 0; + margin: 0.3em 0; } .comment-publish-button { @@ -94,15 +94,15 @@ } #review-comments { - margin: 0; + margin: 0; } #fieldset-moderate-comments { - padding: 2em 1em; + padding: 2em 1em; } #fieldset-moderate-comments .actions { - width: 14em; + width: 14em; } @@ -113,11 +113,11 @@ not have a .row class for portal-column-content. */ .row #dobulkaction { - margin: 0; + margin: 0; } .row #commenting { - font-size: 80%; + font-size: 80%; } .row textarea { @@ -137,6 +137,6 @@ } .row #fieldset-moderate-comments .actions { - width: 9em !important; + width: 9em !important; } diff --git a/plone/app/discussion/profiles/default/catalog.xml b/plone/app/discussion/profiles/default/catalog.xml index 51428c5..57577f1 100644 --- a/plone/app/discussion/profiles/default/catalog.xml +++ b/plone/app/discussion/profiles/default/catalog.xml @@ -10,8 +10,8 @@ - - + + diff --git a/plone/app/discussion/profiles/default/controlpanel.xml b/plone/app/discussion/profiles/default/controlpanel.xml index 353af72..7bd6bcd 100644 --- a/plone/app/discussion/profiles/default/controlpanel.xml +++ b/plone/app/discussion/profiles/default/controlpanel.xml @@ -11,7 +11,7 @@ appId="plone.app.discussion" category="Products" condition_expr="" - icon_expr="string:${portal_url}/discussionitem_icon.gif" + icon_expr="string:${portal_url}/discussionitem_icon.gif" url_expr="string:${portal_url}/@@discussion-settings" visible="True" i18n:attributes="title"> diff --git a/plone/app/discussion/profiles/default/jsregistry.xml b/plone/app/discussion/profiles/default/jsregistry.xml index 2b2a766..71840d8 100644 --- a/plone/app/discussion/profiles/default/jsregistry.xml +++ b/plone/app/discussion/profiles/default/jsregistry.xml @@ -4,7 +4,7 @@ id="++resource++plone.app.discussion.javascripts/comments.js" cacheable="False" compression="safe" cookable="False" enabled="True" expression="" inline="False" - /> + />