| 15 |
if ($(this).html() == 'View') { |
if ($(this).html() == 'View') { |
| 16 |
$('#' + autosaved_form_id).formHash(autosaved.serialized); |
$('#' + autosaved_form_id).formHash(autosaved.serialized); |
| 17 |
|
|
| 18 |
// need to loop through any WYSIWYG editor fields and update the visible iframe fields with hidden field content |
if (Drupal.settings.autosave.wysiwyg) { |
| 19 |
for (var instance in Drupal.wysiwyg.instances) { |
// need to loop through any WYSIWYG editor fields and update the visible iframe fields with hidden field content |
| 20 |
Drupal.wysiwyg.instances[instance].setContent($('#' + instance).val()); |
for (var instance in Drupal.wysiwyg.instances) { |
| 21 |
|
Drupal.wysiwyg.instances[instance].setContent($('#' + instance).val()); |
| 22 |
|
} |
| 23 |
} |
} |
| 24 |
$('#' + autosaved_form_id).focus(); |
$('#' + autosaved_form_id).focus(); |
| 25 |
$(this).html('Reset'); |
$(this).html('Reset'); |
| 60 |
} |
} |
| 61 |
|
|
| 62 |
Drupal.saveForm = function() { |
Drupal.saveForm = function() { |
| 63 |
// need to loop through any WYSIWYG editor fields and update the real (hidden) text fields before saving |
if (Drupal.settings.autosave.wysiwyg) { |
| 64 |
for (var instance in Drupal.wysiwyg.instances) { |
// need to loop through any WYSIWYG editor fields and update the real (hidden) text fields before saving |
| 65 |
if (Drupal.wysiwyg.instances[instance].editor != 'none') { |
for (var instance in Drupal.wysiwyg.instances) { |
| 66 |
var content = Drupal.wysiwyg.instances[instance].getContent(); |
if (Drupal.wysiwyg.instances[instance].editor != 'none') { |
| 67 |
$('#' + instance).val(content); |
var content = Drupal.wysiwyg.instances[instance].getContent(); |
| 68 |
|
$('#' + instance).val(content); |
| 69 |
|
} |
| 70 |
} |
} |
| 71 |
} |
} |
| 72 |
|
|