Source

django-selectable-akaihola / issue-72

# HG changeset patch
# Parent b7217d6a88f7846d0bfcb391d52b92116e1c5b3d

diff -r b7217d6a88f7 selectable/static/selectable/js/jquery.dj.selectable.js
--- a/selectable/static/selectable/js/jquery.dj.selectable.js	Thu Sep 20 20:57:57 2012 -0400
+++ b/selectable/static/selectable/js/jquery.dj.selectable.js	Tue Sep 25 11:16:35 2012 +0300
@@ -255,9 +255,8 @@
             }
         }
 	});
-})(jQuery);
 
-function bindSelectables(context) {
+window.bindSelectables = function(context) {
     /* Bind all selectable widgets in a given context.
     Automatically called on document.ready.
     Additional calls can be made for dynamically added widgets.
@@ -278,7 +277,7 @@
             }
         );
     });
-}
+};
 
 /* Monkey-patch Django's dynamic formset, if defined */
 if (typeof(django) !== "undefined" && typeof(django.jQuery) !== "undefined") {
@@ -335,6 +334,8 @@
     };
 }
 
+})(jQuery);
+
 $(document).ready(function() {
     // Bind existing widgets on document ready
     if (typeof(djselectableAutoLoad) === "undefined" || djselectableAutoLoad) {