Merge branch 'master' into 4138-node-manager-google-cloud
[arvados.git] / apps / workbench / app / assets / javascripts / selection.js.erb
index 0eb1fb16f920d3453fbd446c265a911b818dcdc8..0068b738ec903067c3352e9ae92d5a6ed82c2b19 100644 (file)
@@ -8,67 +8,8 @@ jQuery(function($){
         on('change', '.persistent-selection:checkbox', function(e) {
             $(document).trigger('selections-updated');
         });
-
-    $('#selection-form-content').on("click", function(e) {
-        e.stopPropagation();
-    });
 });
 
-add_form_selection_sources = null;
-select_form_sources = null;
-
-(function() {
-    var form_selection_sources = {};
-    add_form_selection_sources = function (src) {
-        for (var i = 0; i < src.length; i++) {
-            var t = form_selection_sources[src[i].type];
-            if (!t) {
-                t = form_selection_sources[src[i].type] = {};
-            }
-            if (!t[src[i].uuid]) {
-                t[src[i].uuid] = src[i];
-            }
-        }
-    };
-
-    select_form_sources = function(type) {
-        var ret = [];
-
-        if (get_selection_list) {
-            var lst = get_selection_list();
-            if (lst.length > 0) {
-                var text = "&horbar; Selections &horbar;";
-                var span = document.createElement('span');
-                span.innerHTML = text;
-                ret.push({text: span.innerHTML, value: "***invalid***"});
-
-                for (var i = 0; i < lst.length; i++) {
-                    if (lst[i].type == type) {
-                        var n = lst[i].name;
-                        n = n.replace(/<span[^>]*>/i, "[");
-                        n = n.replace(/<\/span>/i, "]");
-                        ret.push({text: n, value: lst[i].uuid})
-                    }
-                }
-            }
-        }
-
-        var text = "&horbar; Recent &horbar;";
-        var span = document.createElement('span');
-        span.innerHTML = text;
-        ret.push({text: span.innerHTML, value: "***invalid***"});
-
-        var t = form_selection_sources[type];
-        for (var key in t) {
-            if (t.hasOwnProperty(key)) {
-                var obj = t[key];
-                ret.push({text: obj.name, value: obj.uuid})
-            }
-        }
-        return ret;
-    };
-})();
-
 function dispatch_selection_action() {
     // Build a new "href" attribute for this link by starting with the
     // "data-href" attribute and appending ?foo[]=bar&foo[]=baz (or