[ARVADOS] updated: 2ac20a6ffa19b0bb2bc86fdcefcfe1d195c7f16a
git at public.curoverse.com
git at public.curoverse.com
Tue Dec 2 21:02:01 EST 2014
Summary of changes:
.../app/assets/javascripts/selection.js.erb | 82 ----------------------
apps/workbench/app/helpers/application_helper.rb | 6 --
2 files changed, 88 deletions(-)
via 2ac20a6ffa19b0bb2bc86fdcefcfe1d195c7f16a (commit)
from 1af2d4f71f6a7ba4374f8490ef1b4f0b972e2dec (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2ac20a6ffa19b0bb2bc86fdcefcfe1d195c7f16a
Author: radhika <radhika at curoverse.com>
Date: Tue Dec 2 20:53:16 2014 -0500
4525: remove (some) clippy related code
diff --git a/apps/workbench/app/assets/javascripts/selection.js.erb b/apps/workbench/app/assets/javascripts/selection.js.erb
index 40724bb..3201184 100644
--- a/apps/workbench/app/assets/javascripts/selection.js.erb
+++ b/apps/workbench/app/assets/javascripts/selection.js.erb
@@ -4,7 +4,6 @@
/** Javascript for local persistent selection. */
get_selection_list = null;
-form_selection_sources = {};
jQuery(function($){
var storage = localStorage; // sessionStorage
@@ -49,35 +48,10 @@ jQuery(function($){
}
var update_count = function(e) {
- var html;
var this_object_uuid = $('#selection-form-content').
closest('form').
find('input[name=uuid]').val();
var lst = get_selection_list();
- $("#persistent-selection-count").text(lst.length);
- if (lst.length > 0) {
- html = '<li><a href="#" class="btn btn-xs btn-info" id="clear_selections_button"><i class="fa fa-fw fa-ban"></i> Clear selections</a></li>';
- $('#selection-form-content').html(html);
-
- for (var i = 0; i < lst.length; i++) {
- $('#selection-form-content > li > table').append("<tr>"
- + "<td>"
- + "<input class='remove-selection' name='selection[]' type='checkbox' value='" + lst[i].uuid + "' checked='true' data-stoppropagation='true' />"
- + "</td>"
-
- + "<td>"
- + "<div style='padding-left: 1em'><a href=\"" + lst[i].href + "\">" + lst[i].name + "</a></div>"
- + "</td>"
-
- + "<td style=\"vertical-align: top\">"
- + "<span style=\"padding-right: 1em\">" + lst[i].type + "</span>"
- + "</td>"
-
- + "</tr>");
- }
- } else {
- $('#selection-form-content').html("<li class='notification empty'>No selections.</li>");
- }
var checkboxes = $('.persistent-selection:checkbox');
for (i = 0; i < checkboxes.length; i++) {
@@ -93,7 +67,6 @@ jQuery(function($){
}
$('.remove-selection').on('click', remove_selection_click);
- $('#clear_selections_button').on('click', clear_selections);
$(document).trigger('selections-updated', [lst]);
};
@@ -116,61 +89,6 @@ jQuery(function($){
});
});
-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 = "― Selections ―";
- 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 = "― Recent ―";
- 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
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index c8c4ccc..a834dcb 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -381,12 +381,6 @@ module ApplicationHelper
lt += raw("\n<script>")
- if selectables.any?
- lt += raw("add_form_selection_sources(#{selectables.to_json});\n")
- end
-
- lt += raw("$('[data-name=\"#{dn}\"]').editable({source: function() { return select_form_sources('#{dataclass}'); } });\n")
-
lt += raw("</script>")
lt
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list