diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-09 13:58:03 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-09 13:58:03 +0000 |
commit | dcbb5fa3f4434be266793f6a610071a14c777414 (patch) | |
tree | 10a5bae9c26e0fad6a5d08eadf6fd082304354d2 /includes | |
parent | 15d739a5049091821c81006ad8080f0556053e16 (diff) | |
download | brdo-dcbb5fa3f4434be266793f6a610071a14c777414.tar.gz brdo-dcbb5fa3f4434be266793f6a610071a14c777414.tar.bz2 |
- Patch #107061 by Steven et al: add jQuery teaser splitter.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc index 0ce8b3d3a..1845f4d9a 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1452,6 +1452,18 @@ function theme_form($element) { */ function theme_textarea($element) { $class = array('form-textarea'); + + // Add teaser behaviour (must come before resizable) + if (!empty($element['#teaser'])) { + drupal_add_js('misc/teaser.js'); + // Note: arrays are merged in drupal_get_js(). + drupal_add_js(array('teaserButton' => array(t('Join summary'), t('Split summary at cursor'))), 'setting'); + drupal_add_js(array('teaserCheckbox' => array($element['#id'] => $element['#teaser_checkbox'])), 'setting'); + drupal_add_js(array('teaser' => array($element['#id'] => $element['#teaser'])), 'setting'); + $class[] = 'teaser'; + } + + // Add resizable behaviour if ($element['#resizable'] !== FALSE) { drupal_add_js('misc/textarea.js'); $class[] = 'resizable'; |