From c76b3741ea3252ce1fa671f02d382a26e4c233b2 Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Wed, 27 Nov 2013 14:56:43 -0500 Subject: [PATCH] Fixed comment preview functionality The preview function was hidden for comments. The button has been restored and styles fixed to support this feature. (DBOINCP-76) --- .../boinc/modules/boinccore/boinccore.module | 3 --- .../boinc/themes/boinc/css/comments.css | 20 +++++++++++++++++++ .../themes/boinc/templates/comment.tpl.php | 5 +++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/drupal/sites/default/boinc/modules/boinccore/boinccore.module b/drupal/sites/default/boinc/modules/boinccore/boinccore.module index 30d2605bba..5d971d5d56 100644 --- a/drupal/sites/default/boinc/modules/boinccore/boinccore.module +++ b/drupal/sites/default/boinc/modules/boinccore/boinccore.module @@ -177,9 +177,6 @@ function boinccore_form_alter(&$form, $form_state, $form_id) { '#weight' => 1010, ); - // Preview is ugly, unset until it works - unset($form['preview']); - // Remove redundant name field unset($form['_author']); diff --git a/drupal/sites/default/boinc/themes/boinc/css/comments.css b/drupal/sites/default/boinc/themes/boinc/css/comments.css index 52f3ac9385..b24d7bc7ae 100644 --- a/drupal/sites/default/boinc/themes/boinc/css/comments.css +++ b/drupal/sites/default/boinc/themes/boinc/css/comments.css @@ -289,6 +289,26 @@ div.node-type-forum.not-first-page { .preview .comment /* Preview of the comment before submitting new or updated comment */ { /* background-color: #ffffea; */ /* Drupal core uses a #ffffea background */ + border: none; + margin-top: 24px; + padding-top: 0; +} +.preview h2 { + border-bottom: 1px dotted #aaa; + margin-bottom: 24px; + padding-bottom: 12px; +} + +#comment-form .preview + .user { + height: auto; +} +#comment-form .comment .user { + border: none; +} + +div.preview + .comment { + padding-top: 24px; + margin-top: 24px; } /* Comment form */ diff --git a/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php b/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php index a02eed32bd..9529eddaae 100644 --- a/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php +++ b/drupal/sites/default/boinc/themes/boinc/templates/comment.tpl.php @@ -77,6 +77,7 @@ print '
'; } ?> +
$comment->uid)); @@ -166,3 +167,7 @@
+ + +

+ \ No newline at end of file