Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 19:d83073a08b25
Added beautytips, and advanced library behavior to the library prototype.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Fri, 06 Mar 2009 14:26:06 -0600 |
parents | 0d557e6e73f7 |
children | 89fe0aca43d4 |
comparison
equal
deleted
inserted
replaced
18:0d557e6e73f7 | 19:d83073a08b25 |
---|---|
64 // Ajax pager | 64 // Ajax pager |
65 $('.pager a', $this).click(function() { | 65 $('.pager a', $this).click(function() { |
66 $.getJSON(this.href, function(data) { | 66 $.getJSON(this.href, function(data) { |
67 Drupal.behaviors.dndLibrary.refreshLibrary.call($this.get(0), data, $editor); | 67 Drupal.behaviors.dndLibrary.refreshLibrary.call($this.get(0), data, $editor); |
68 }); | 68 }); |
69 | |
70 // Reattach behaviors | |
71 Drupal.behaviors.dndLibrary(); | 69 Drupal.behaviors.dndLibrary(); |
72 | |
73 return false; | 70 return false; |
74 }); | 71 }); |
75 | 72 |
76 // Preload images in editor representations | 73 // Preload images in editor representations |
77 var cached = $.data($editor, 'dnd_preload') || {}; | 74 var cached = $.data($editor, 'dnd_preload') || {}; |
106 Drupal.settings.dndEditorRepresentations[editor_id] = data.editor_representations[editor_id]; | 103 Drupal.settings.dndEditorRepresentations[editor_id] = data.editor_representations[editor_id]; |
107 } | 104 } |
108 for (preview_id in data.library_previews) { | 105 for (preview_id in data.library_previews) { |
109 Drupal.settings.dndLibraryPreviews[preview_id] = data.library_previews[preview_id]; | 106 Drupal.settings.dndLibraryPreviews[preview_id] = data.library_previews[preview_id]; |
110 } | 107 } |
108 | |
109 // Reattach behaviors | |
110 Drupal.behaviors.dndLibrary(); | |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 // Dynamically compose a callback based on the editor name | 114 // Dynamically compose a callback based on the editor name |
115 Drupal.behaviors.dndLibrary.attach_library = function(e, data) { | 115 Drupal.behaviors.dndLibrary.attach_library = function(e, data) { |