diff --git a/core.css b/core.css index b27c303..29c567e 100644 --- a/core.css +++ b/core.css @@ -335,6 +335,18 @@ table .item-list, .page-content .form-item:hover > .description { display:block; } + .rubik-inline-field-descriptions .page-content .form-item .description { + display:block; + position:relative; + background:none; + margin:0; + padding:0.25em 0 0.75em; + border:none; + right:0; + width:100%; + z-index:0; + } + input.form-submit, a.button { display: inline-block;} input.teaser-button, diff --git a/rubik.info b/rubik.info index 08ca2b3..b8e0641 100644 --- a/rubik.info +++ b/rubik.info @@ -17,4 +17,5 @@ stylesheets[print][] = print.css ; Support shortcut module links settings[shortcut_module_link] = 1 +settings[rubik_inline_field_descriptions] = 0 diff --git a/template.php b/template.php index 8953da2..a155169 100644 --- a/template.php +++ b/template.php @@ -2,10 +2,13 @@ /* * Implements hook_preprocess_html(). */ -function rubik_preprocess_html() { +function rubik_preprocess_html(&$vars) { if (module_exists('views')) { drupal_add_css(drupal_get_path('module', 'views') . '/css/views-admin.seven.css', 'theme'); } + if (theme_get_setting('rubik_inline_field_descriptions')) { + $vars['classes_array'][] = 'rubik-inline-field-descriptions'; + } } /** diff --git a/theme-settings.php b/theme-settings.php new file mode 100644 index 0000000..38f62e3 --- /dev/null +++ b/theme-settings.php @@ -0,0 +1,26 @@ + 'fieldset', + '#title' => t('Rubik'), + ); + $form['rubik']['rubik_inline_field_descriptions'] = array( + '#type' => 'checkbox', + '#title' => t('Display form field descriptions inline.'), + '#description' => t("By default, each field's description is displayed in a pop-up, which is only visible when hovering over that field. Select this option to make all field descriptions visible at all times."), + '#default_value' => theme_get_setting('rubik_inline_field_descriptions', 'rubik'), + ); +} \ No newline at end of file