comparison popups_reference.js @ 1:ece8e4be4d6f

Fix node titles after the creation
author Franck Deroche <franck@defr.org>
date Wed, 21 Jan 2009 11:34:38 +0100
parents 56772e0a00ae
children 92ed2a629336
comparison
equal deleted inserted replaced
0:56772e0a00ae 1:ece8e4be4d6f
37 // Bind to the popups API custom form_success event. 37 // Bind to the popups API custom form_success event.
38 $(document).bind('popups_form_success.popups_reference', function() { 38 $(document).bind('popups_form_success.popups_reference', function() {
39 // Info about the new node was placed in a cookie when it was created. 39 // Info about the new node was placed in a cookie when it was created.
40 var nid = popups_reference_get_cookie_value('PopupRefNid'); 40 var nid = popups_reference_get_cookie_value('PopupRefNid');
41 var title = popups_reference_get_cookie_value('PopupRefTitle'); 41 var title = popups_reference_get_cookie_value('PopupRefTitle');
42 title = decodeURIComponent(title);
42 $wrapper.find('select').val(nid); // Select 43 $wrapper.find('select').val(nid); // Select
43 $wrapper.find('input.form-autocomplete').val(title); // Autocomplete 44 $wrapper.find('input.form-autocomplete').val(title); // Autocomplete
44 $wrapper.find(':radio[value=' + nid + ']').select(); // Radio buttons 45 $wrapper.find(':radio[value=' + nid + ']').select(); // Radio buttons
45 }); 46 });
46 }); 47 });