Disable comments when a poll is not published

pull/1/head
yflory 7 years ago
parent aa744567ed
commit dd141b5c9f

@ -679,7 +679,8 @@ define([
]),
h('h2#cp-app-poll-comments-list-title', Msg.poll_comment_list),
h('div#cp-app-poll-comments-list')
])
]),
h('div#cp-app-poll-nocomments', Msg.poll_comment_disabled)
])
])
])

@ -267,6 +267,8 @@ define(function () {
out.poll_comment_submit = "Envoyer";
out.poll_comment_remove = "Supprimer ce commentaire";
out.poll_comment_disabled = "Publiez ce sondage en utilisant le bouton ✓ afin d'activer les commentaires.";
// Canvas
out.canvas_clear = "Nettoyer";
out.canvas_delete = "Supprimer la sélection";

@ -271,6 +271,8 @@ define(function () {
out.poll_comment_submit = "Send";
out.poll_comment_remove = "Delete this comment";
out.poll_comment_disabled = "Publish this poll using the ✓ button to enable the comments.";
// Canvas
out.canvas_clear = "Clear";
out.canvas_delete = "Delete selection";

@ -125,6 +125,7 @@ table#cp-app-poll-table {
min-width: 80%;
width: 80%;
min-height: 200px;
height: 200px;
border: 1px solid black;
.CodeMirror-placeholder {
color: #777;
@ -149,18 +150,26 @@ table#cp-app-poll-table {
max-height: 20em;
}
}
.cp-app-poll-published {
#cp-app-poll-description {
display: none;
&~ .CodeMirror {
div.cp-app-poll-published {
div.cp-app-poll-realtime {
#cp-app-poll-description {
display: none;
&~ .CodeMirror {
display: none;
}
}
}
#cp-app-poll-description-published {
display: block;
&:empty {
#cp-app-poll-description-published {
display: block;
&:empty {
display: none;
}
}
#cp-app-poll-nocomments {
display: none;
}
#cp-app-poll-comments {
display: block;
}
}
}
@ -490,11 +499,18 @@ div.cp-app-poll-realtime {
display: none;
}
}
#cp-app-poll-nocomments {
color: #999;
text-align: center;
margin: 20px;
font: @colortheme_app-font;
}
#cp-app-poll-comments {
width: 50%;
margin: 20px auto;
min-width: 400px;
padding-bottom: 5px;
display: none;
button {
border-radius: 0;
}

Loading…
Cancel
Save