Mercurial > defr > drupal > scald > dnd
comparison dnd.module @ 21:69db20fdbac2
Cleanup and refactoring.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Tue, 10 Mar 2009 13:46:49 -0500 |
parents | 89fe0aca43d4 |
children | 9a92410be362 |
comparison
equal
deleted
inserted
replaced
20:89fe0aca43d4 | 21:69db20fdbac2 |
---|---|
54 return $type; | 54 return $type; |
55 } | 55 } |
56 | 56 |
57 /** | 57 /** |
58 * Settings array: | 58 * Settings array: |
59 * What should it take, if anything? Probably a source... | 59 * What should it take, if anything? Probably a source * maybe editor specific configuration shit? |
60 * maybe editor specific configuration shit? | |
61 * | 60 * |
62 * - source for library json/ajax shit | 61 * - source for library json/ajax shit |
63 * - target selector | 62 * - target selector |
64 * - item selector | 63 * - item selector |
65 * | 64 * |
72 * tinymce/othereditor => | 71 * tinymce/othereditor => |
73 * target selector logic | 72 * target selector logic |
74 * configuration options | 73 * configuration options |
75 * callback should be smart about attachment and detachment | 74 * callback should be smart about attachment and detachment |
76 */ | 75 */ |
77 function dnd_process_textarea($element, $form_state) { | 76 function dnd_process_textarea($element, $edit, $form_state, $form) { |
78 if ($element['#dnd-enabled']) { | 77 if ($element['#dnd-enabled']) { |
79 | 78 |
80 // BeautyTips | 79 // BeautyTips |
81 drupal_add_js(drupal_get_path('module', 'dnd') .'/js/bt/other_libs/excanvas_0002/excanvas-compressed.js'); | 80 drupal_add_js(drupal_get_path('module', 'dnd') .'/js/bt/other_libs/excanvas_0002/excanvas-compressed.js'); |
82 drupal_add_js(drupal_get_path('module', 'dnd') .'/js/bt/other_libs/jquery.hoverIntent.minified.js'); | 81 drupal_add_js(drupal_get_path('module', 'dnd') .'/js/bt/other_libs/jquery.hoverIntent.minified.js'); |
110 // Add enabled libraries to settings for tracking | 109 // Add enabled libraries to settings for tracking |
111 drupal_add_js(array( | 110 drupal_add_js(array( |
112 'dndEnabledLibraries' => array($element['#id'] => $settings), | 111 'dndEnabledLibraries' => array($element['#id'] => $settings), |
113 ), 'setting'); | 112 ), 'setting'); |
114 | 113 |
115 $element['#prefix'] = theme('dnd_library', $element, $settings); | 114 $element['#suffix'] = theme('dnd_library', $element, $settings) . $element['#suffix']; |
116 } | 115 } |
117 return $element; | 116 return $element; |
118 } | 117 } |
119 | 118 |
120 /** | 119 /** |