Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c6af5ee670
@ -4,6 +4,14 @@ Changelog
|
|||||||
2.2.1 (unreleased)
|
2.2.1 (unreleased)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- For migrations of comments without a valid old_status, apply the 'published'
|
||||||
|
state.
|
||||||
|
[thet]
|
||||||
|
|
||||||
|
- Re-apply eleddy's "Revert modification date since this is fixed in
|
||||||
|
p.a.caching now." as her commit was lost later on due to some git magic.
|
||||||
|
[thet]
|
||||||
|
|
||||||
- Remove submitting the controlpanel form again after removing disabled tags
|
- Remove submitting the controlpanel form again after removing disabled tags
|
||||||
fixes #13037 and #12357
|
fixes #13037 and #12357
|
||||||
[maartenkling]
|
[maartenkling]
|
||||||
|
@ -127,16 +127,16 @@
|
|||||||
parents().
|
parents().
|
||||||
filter(".comment").
|
filter(".comment").
|
||||||
find(".reply-to-comment-button");
|
find(".reply-to-comment-button");
|
||||||
|
|
||||||
/* Find the reply-to-comment form and hide and remove it again. */
|
/* Find the reply-to-comment form and hide and remove it again. */
|
||||||
$.reply_to_comment_form = $(this).parents().filter(".reply");
|
$.reply_to_comment_form = $(this).parents().filter(".reply");
|
||||||
$.reply_to_comment_form.slideUp("slow", function () {
|
$.reply_to_comment_form.slideUp("slow", function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Show the reply-to-comment button again. */
|
/* Show the reply-to-comment button again. */
|
||||||
reply_to_comment_button.css("display", "inline");
|
reply_to_comment_button.css("display", "inline");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ content object. Each comment div has a unique id::
|
|||||||
<div class="documentByLine"></div>
|
<div class="documentByLine"></div>
|
||||||
<div class="commentBody"> </div>
|
<div class="commentBody"> </div>
|
||||||
<div class="commentActions">
|
<div class="commentActions">
|
||||||
<button class="reply-to-comment-button">Reply</button>
|
<button class="reply-to-comment-button">Reply</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ The comment form is rendered inside a "commenting" div::
|
|||||||
<div id="formfield-form-widgets-in_reply_to">
|
<div id="formfield-form-widgets-in_reply_to">
|
||||||
<input id="form-widgets-in_reply_to"
|
<input id="form-widgets-in_reply_to"
|
||||||
name="form.widgets.in_reply_to" value=
|
name="form.widgets.in_reply_to" value=
|
||||||
type="hidden"
|
type="hidden"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* jQuery functions for the plone.app.discussion bulk moderation.
|
* jQuery functions for the plone.app.discussion bulk moderation.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
(function ($) {
|
(function ($) {
|
||||||
// This unnamed function allows us to use $ inside of a block of code
|
// This unnamed function allows us to use $ inside of a block of code
|
||||||
// without permanently overwriting $.
|
// without permanently overwriting $.
|
||||||
// http://docs.jquery.com/Using_jQuery_with_Other_Libraries
|
// http://docs.jquery.com/Using_jQuery_with_Other_Libraries
|
||||||
|
|
||||||
//#JSCOVERAGE_IF 0
|
//#JSCOVERAGE_IF 0
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Window Load Function: Executes when complete page is fully loaded,
|
* Window Load Function: Executes when complete page is fully loaded,
|
||||||
* including all frames,
|
* including all frames,
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
$(window).load(function () {
|
$(window).load(function () {
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Delete a single comment.
|
* Delete a single comment.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
@ -47,8 +47,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Publish a single comment.
|
* Publish a single comment.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
@ -78,8 +78,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Bulk actions for comments (delete, publish)
|
* Bulk actions for comments (delete, publish)
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
@ -116,8 +116,8 @@
|
|||||||
selectField.find("option[value='-1']").attr('selected', 'selected');
|
selectField.find("option[value='-1']").attr('selected', 'selected');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Check or uncheck all checkboxes from the batch moderation page.
|
* Check or uncheck all checkboxes from the batch moderation page.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
@ -134,12 +134,12 @@
|
|||||||
$(this).val("0");
|
$(this).val("0");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* Show full text of a comment in the batch moderation page.
|
* Show full text of a comment in the batch moderation page.
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
$(".show-full-comment-text").click(function (e) {
|
$(".show-full-comment-text").click(function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var target = $(this).attr("href");
|
var target = $(this).attr("href");
|
||||||
var td = $(this).parent();
|
var td = $(this).parent();
|
||||||
@ -156,9 +156,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//#JSCOVERAGE_ENDIF
|
//#JSCOVERAGE_ENDIF
|
||||||
|
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
@ -121,9 +121,10 @@ class View(BrowserView):
|
|||||||
'action': None,
|
'action': None,
|
||||||
'actor': None,
|
'actor': None,
|
||||||
'comment': 'Migrated workflow state',
|
'comment': 'Migrated workflow state',
|
||||||
'review_state': old_status.get(
|
'review_state': old_status and old_status.get(
|
||||||
'review_state',
|
'review_state',
|
||||||
new_workflow.initial_state),
|
new_workflow.initial_state)
|
||||||
|
or 'published',
|
||||||
'time': DateTime()
|
'time': DateTime()
|
||||||
}
|
}
|
||||||
workflow.setStatusOf('comment_review_workflow',
|
workflow.setStatusOf('comment_review_workflow',
|
||||||
|
@ -217,14 +217,9 @@ def notify_content_object(obj, event):
|
|||||||
"""Tell the content object when a comment is added
|
"""Tell the content object when a comment is added
|
||||||
"""
|
"""
|
||||||
content_obj = aq_parent(aq_parent(obj))
|
content_obj = aq_parent(aq_parent(obj))
|
||||||
# set the modified date and reindex the item accordingly
|
|
||||||
# so that 304s work correctly. This means that adding a comment
|
|
||||||
# effectively counts as modifying the content type.
|
|
||||||
content_obj.setModificationDate()
|
|
||||||
content_obj.reindexObject(idxs=('total_comments',
|
content_obj.reindexObject(idxs=('total_comments',
|
||||||
'last_comment_date',
|
'last_comment_date',
|
||||||
'commentators',
|
'commentators'))
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
def notify_content_object_deleted(obj, event):
|
def notify_content_object_deleted(obj, event):
|
||||||
|
@ -227,7 +227,7 @@ Find a comment id to reply to.
|
|||||||
>>> browser.open(urldoc1)
|
>>> browser.open(urldoc1)
|
||||||
>>> import re
|
>>> import re
|
||||||
>>> comment_div = re.findall('<div.*?.class="comment.*?>', browser.contents)[0]
|
>>> comment_div = re.findall('<div.*?.class="comment.*?>', browser.contents)[0]
|
||||||
>>> id = re.findall('"([^"]*)"', comment_div)[2]
|
>>> id = re.findall('"([^"]*)"', comment_div)[1]
|
||||||
|
|
||||||
Post a reply to an existing comment.
|
Post a reply to an existing comment.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user