diff js/dnd-library.js @ 21:69db20fdbac2

Cleanup and refactoring.
author David Eads <eads@chicagotech.org>
date Tue, 10 Mar 2009 13:46:49 -0500
parents 89fe0aca43d4
children 4f58fa0a9a6d
line wrap: on
line diff
--- a/js/dnd-library.js	Sun Mar 08 20:29:57 2009 -0500
+++ b/js/dnd-library.js	Tue Mar 10 13:46:49 2009 -0500
@@ -40,7 +40,7 @@
     $('.editor-item', context).each(function () {
       $(this).bt(Drupal.settings.dndLibraryPreviews[this.id], {
         'trigger': 'none',
-        'width': 300,
+        'width': 375,
         'spikeLength': 7,
         'spikeGirth': 9,
         'corner-radius' : 3,
@@ -75,13 +75,13 @@
       return false;
     });
 
-    $('.view-filters form', $this).submit(function() {
+    $('.view-filters input[type=submit]', $this).click(function() {
       $(this).ajaxSubmit({
-        // @TODO add URL from settings and target more specifically...
+        'url' : Drupal.settings.basePath + Drupal.settings.dndEnabledLibraries[$editor.get(0).id].url,
         'dataType': 'json',
         'success': function(responsetext, statustext) {
-          drupal.behaviors.dndlibrary.responsetext.call($this.get(0), responsetext, $editor);
-          drupal.behaviors.dndlibrary(); 
+          Drupal.behaviors.dndLibrary.refreshLibrary.call($this.get(0), responsetext, $editor);
+          Drupal.behaviors.dndLibrary(); 
         }
       });
       return false;