summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit2012-01-04 22:22:07 +0100
committerEmil Stjerneman2012-01-04 22:22:07 +0100
commitd0ae544d509447aafb9a6c2654c4958d3154adbd (patch)
treef9a0013e6cafc979bcc18d4a11f61ffa24f6e8ae
parent3e0d9693fd096e5ccd85b128fc30b557f342fe0a (diff)
Fixed attach behaviors to fail7.x-2.1
-rwxr-xr-xjs/linkit.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/linkit.js b/js/linkit.js
index 529266a..c7ef8d7 100755
--- a/js/linkit.js
+++ b/js/linkit.js
@@ -12,6 +12,10 @@ Drupal.linkit.editorDialog = Drupal.linkit.editorDialog || {};
Drupal.behaviors.linkit = {
attach: function(context, settings) {
+ if ($('#linkit-modal #edit-linkit-search', context).length == 0) {
+ return;
+ }
+
Drupal.linkit.$searchInput = $('#linkit-modal #edit-linkit-search', context);
// Create a "Better Autocomplete" object, see betterautocomplete.js