3112: move ajax event handling into a separate js file
[arvados.git] / apps / workbench / app / assets / javascripts / select_modal.js
index ee33b54a62173e03138bf72aad92f2bf93933a02..1fec3dcb95e394405cebe8bc799d5491ef7e2d4e 100644 (file)
@@ -72,11 +72,14 @@ $(document).on('click', '.selectable', function() {
         });
 }).on('click', '.chooser-show-project', function() {
     var params = {};
+    var project_uuid = $(this).attr('data-project-uuid');
     $(this).attr('href', '#');  // Skip normal click handler
-    if ($(this).attr('data-project-uuid')) {
+    if (project_uuid) {
         params = {'filters[]': JSON.stringify(['owner_uuid',
                                                '=',
-                                               $(this).attr('data-project-uuid')])};
+                                               project_uuid]),
+                  project_uuid: project_uuid
+                 };
     }
     // Use current selection as dropdown button label
     $(this).