Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 53:4e975bbf1bfe
Correct url to the library when it's programmaticaly reloaded
author | Franck Deroche <franck@defr.org> |
---|---|
date | Tue, 20 Jul 2010 14:22:51 +0200 |
parents | 482aa8971743 |
children |
comparison
equal
deleted
inserted
replaced
52:482aa8971743 | 53:4e975bbf1bfe |
---|---|
161 $('.view-filters form', $this).ajaxSubmit({ | 161 $('.view-filters form', $this).ajaxSubmit({ |
162 'url' : Drupal.settings.basePath + settings.url, | 162 'url' : Drupal.settings.basePath + settings.url, |
163 'dataType' : 'json', | 163 'dataType' : 'json', |
164 'success' : function(data) { | 164 'success' : function(data) { |
165 var target = reset.parents('div.dnd-library-wrapper').get(0); | 165 var target = reset.parents('div.dnd-library-wrapper').get(0); |
166 target.library_url = Drupal.dndEnabledLibraries[editor].url; | 166 target.library_url = Drupal.settings.dndEnabledLibraries[editor[0].id].url; |
167 Drupal.behaviors.dndLibrary.renderLibrary.call(target, data, $(editor)); | 167 Drupal.behaviors.dndLibrary.renderLibrary.call(target, data, $(editor)); |
168 }, | 168 }, |
169 'beforeSubmit': function (data, form, options) { | 169 'beforeSubmit': function (data, form, options) { |
170 // Can't use data = [], otherwise we're creating a new array | 170 // Can't use data = [], otherwise we're creating a new array |
171 // instead of modifying the existing one. | 171 // instead of modifying the existing one. |