- Patch #193577 by DamZ: fixed teaser splitting Javascript code.

merge-requests/26/head
Dries Buytaert 2009-05-17 08:26:42 +00:00
parent 6b040974d3
commit 66f88efaae
1 changed files with 4 additions and 4 deletions

View File

@ -68,10 +68,10 @@ Drupal.behaviors.teaser = {
$(include).parent().parent().before(button);
// Extract the teaser from the body, if set. Otherwise, stay in joined mode.
var text = body.val().split('<!--break-->', 2);
if (text.length == 2) {
teaser[0].value = trim(text[0]);
body[0].value = trim(text[1]);
var text = body.val().split('<!--break-->');
if (text.length >= 2) {
teaser[0].value = trim(text.shift());
body[0].value = trim(text.join('<!--break-->'));
$(teaser).attr('disabled', '');
$('input', button).val(Drupal.t('Join summary')).toggle(join_teaser, split_teaser);
}