Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 21:69db20fdbac2
Cleanup and refactoring.
| author | David Eads <eads@chicagotech.org> |
|---|---|
| date | Tue, 10 Mar 2009 13:46:49 -0500 |
| parents | 89fe0aca43d4 |
| children | 4f58fa0a9a6d |
comparison
equal
deleted
inserted
replaced
| 20:89fe0aca43d4 | 21:69db20fdbac2 |
|---|---|
| 38 | 38 |
| 39 // Add preview behavior to editor items (thanks, BeautyTips!) | 39 // Add preview behavior to editor items (thanks, BeautyTips!) |
| 40 $('.editor-item', context).each(function () { | 40 $('.editor-item', context).each(function () { |
| 41 $(this).bt(Drupal.settings.dndLibraryPreviews[this.id], { | 41 $(this).bt(Drupal.settings.dndLibraryPreviews[this.id], { |
| 42 'trigger': 'none', | 42 'trigger': 'none', |
| 43 'width': 300, | 43 'width': 375, |
| 44 'spikeLength': 7, | 44 'spikeLength': 7, |
| 45 'spikeGirth': 9, | 45 'spikeGirth': 9, |
| 46 'corner-radius' : 3, | 46 'corner-radius' : 3, |
| 47 'strokeWidth': 1, | 47 'strokeWidth': 1, |
| 48 'fill': '#ffd', | 48 'fill': '#ffd', |
| 73 }); | 73 }); |
| 74 Drupal.behaviors.dndLibrary(); | 74 Drupal.behaviors.dndLibrary(); |
| 75 return false; | 75 return false; |
| 76 }); | 76 }); |
| 77 | 77 |
| 78 $('.view-filters form', $this).submit(function() { | 78 $('.view-filters input[type=submit]', $this).click(function() { |
| 79 $(this).ajaxSubmit({ | 79 $(this).ajaxSubmit({ |
| 80 // @TODO add URL from settings and target more specifically... | 80 'url' : Drupal.settings.basePath + Drupal.settings.dndEnabledLibraries[$editor.get(0).id].url, |
| 81 'dataType': 'json', | 81 'dataType': 'json', |
| 82 'success': function(responsetext, statustext) { | 82 'success': function(responsetext, statustext) { |
| 83 drupal.behaviors.dndlibrary.responsetext.call($this.get(0), responsetext, $editor); | 83 Drupal.behaviors.dndLibrary.refreshLibrary.call($this.get(0), responsetext, $editor); |
| 84 drupal.behaviors.dndlibrary(); | 84 Drupal.behaviors.dndLibrary(); |
| 85 } | 85 } |
| 86 }); | 86 }); |
| 87 return false; | 87 return false; |
| 88 }); | 88 }); |
| 89 | 89 |
