Mercurial > defr > drupal > scald > dnd
comparison js/dnd-library.js @ 51:5cf2b262b9e4
Behaviors: Don't error out if we're loaded but not in settings
author | Franck Deroche <franck@defr.org> |
---|---|
date | Tue, 20 Jul 2010 14:19:32 +0200 |
parents | cbfe386cb51b |
children | 482aa8971743 |
comparison
equal
deleted
inserted
replaced
50:a54d04d76554 | 51:5cf2b262b9e4 |
---|---|
28 /** | 28 /** |
29 * Initialize and load drag and drop library and pass off rendering and | 29 * Initialize and load drag and drop library and pass off rendering and |
30 * behavior attachment. | 30 * behavior attachment. |
31 */ | 31 */ |
32 Drupal.behaviors.dndLibrary = function(context) { | 32 Drupal.behaviors.dndLibrary = function(context) { |
33 if (!Drupal.settings.dndEnabledLibraries) { | |
34 return; | |
35 } | |
33 $('.dnd-library-wrapper', context).each(function() { | 36 $('.dnd-library-wrapper', context).each(function() { |
34 var $this = $(this); | 37 var $this = $(this); |
35 | 38 |
36 // This is a bad hack to lop off '-dnd-library' from the id to get the editor name | 39 // This is a bad hack to lop off '-dnd-library' from the id to get the editor name |
37 var $editor = $('#' + this.id.slice(0, -12)); | 40 var $editor = $('#' + this.id.slice(0, -12)); |