De-tabbify

svn path=/plone.app.discussion/trunk/; revision=33491
This commit is contained in:
Hanno Schlichting 2010-01-27 14:54:07 +00:00
parent ece5e3c302
commit c27d1b5cc1
10 changed files with 68 additions and 68 deletions

View File

@ -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);

View File

@ -87,10 +87,10 @@
permission="zope2.View"
/>
<!-- Resource directory for javascripts -->
<browser:resourceDirectory
name="plone.app.discussion.javascripts"
directory="javascripts"
<!-- Resource directory for javascripts -->
<browser:resourceDirectory
name="plone.app.discussion.javascripts"
directory="javascripts"
layer="..interfaces.IDiscussionLayer"
/>

View File

@ -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()

View File

@ -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) {

View File

@ -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;
}

View File

@ -10,8 +10,8 @@
</index>
<column value="total_comments" />
<column value="last_comment_date" />
<column value="commentators" />
<column value="last_comment_date" />
<column value="commentators" />
<column value="in_response_to" />
</object>

View File

@ -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">

View File

@ -4,7 +4,7 @@
id="++resource++plone.app.discussion.javascripts/comments.js"
cacheable="False" compression="safe" cookable="False"
enabled="True" expression="" inline="False"
/>
/>
<javascript
id="++resource++plone.app.discussion.javascripts/moderation.js"
cacheable="False" compression="safe" cookable="False"

View File

@ -229,7 +229,7 @@ class CommentCatalogTest(PloneTestCase):
self.assertEquals(self.comment_brain.in_response_to, 'doc1')
def test_clear_and_rebuild_catalog(self):
# Clear and rebuild catalog
# Clear and rebuild catalog
self.catalog.clearFindAndRebuild()
# Check if comment is still there