changeset 11:99ba5941779c

JS Linted.
author David Eads <eads@chicagotech.org>
date Fri, 27 Feb 2009 00:49:22 -0600
parents 5d2ae5b8eae2
children a5b2b9fa2a1a
files js/dnd-library.js js/dnd.js
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/js/dnd-library.js	Fri Feb 27 00:37:24 2009 -0600
+++ b/js/dnd-library.js	Fri Feb 27 00:49:22 2009 -0600
@@ -49,7 +49,7 @@
 }
 
 Drupal.behaviors.dndLibrary.detach_library = function(e, data) {
-  console.log('detach');
+  //console.log('detach');
 }
 
 
--- a/js/dnd.js	Fri Feb 27 00:37:24 2009 -0600
+++ b/js/dnd.js	Fri Feb 27 00:49:22 2009 -0600
@@ -135,7 +135,7 @@
         var element_id = '';
 
         var parents = drop.parents();
-        for (i=0; i < parents.length; i++) {
+        for (var i=0; i < parents.length; i++) {
           if ($(parents[i]).is('body')) {
             element_id = $(drop).get(0).id;
             $(old_parent).after(drop.clone());
@@ -154,7 +154,7 @@
 
     // Initialize plugin
     var targets = opt.processTargets(opt.targets);
-    if (opt.disableClick) { this.click(function() { return false; }) }
+    if (opt.disableClick) { this.click(function() { return false; }); }
 
     // Process!
     return this.each(function() {
@@ -177,10 +177,10 @@
           var target = this;
 
           // Watch the iframe for changes
-          t = setInterval(function() {
+          var t = setInterval(function() {
             var match = $('#' + element.id, $(target).contents());
             if (match.length > 0) {
-              drop = opt.preprocessDrop(target, match); // Must return a jquery object
+              var drop = opt.preprocessDrop(target, match); // Must return a jquery object
               drop
                 .before(opt.insertBefore)
                 .after(opt.insertAfter)
@@ -191,9 +191,9 @@
           }, 100);
           // @TODO track the timer with $.data() so we can clear it?
         } else if ($(this).is('textarea')) {
-          console.log('@TODO handle textareas via.... regexp?');
+          //console.log('@TODO handle textareas via.... regexp?');
         }
       });
     });
-  }
+  };
 })(jQuery);