mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
validation ignore class should be .hidden, ADDED comment class and odd even class to li created by js
This commit is contained in:
parent
8b66d9fda6
commit
6859980696
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
errorElement: "span",
|
errorElement: "span",
|
||||||
errorClass: "error",
|
errorClass: "error",
|
||||||
|
ignore: '.hidden',
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
Name : {
|
Name : {
|
||||||
@ -84,8 +85,9 @@
|
|||||||
commentsList = $('.comments-list', commentsHolder);
|
commentsList = $('.comments-list', commentsHolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var evenOdd = (commentsList.children('.first').removeClass('first').hasClass('even')) ? 'odd' : 'even';
|
||||||
var newComment = $('<li />')
|
var newComment = $('<li />')
|
||||||
.addClass('even first')
|
.addClass('comment first ' + evenOdd)
|
||||||
.html(response)
|
.html(response)
|
||||||
.hide();
|
.hide();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user