[ARVADOS] updated: 948b853e79639e9c1a9e3b6ef098819f4c16f54d

git at public.curoverse.com git at public.curoverse.com
Tue Dec 2 23:11:18 EST 2014


Summary of changes:
 .../app/assets/javascripts/selection.js.erb        | 79 +---------------------
 services/api/app/models/database_seeds.rb          |  2 +-
 2 files changed, 3 insertions(+), 78 deletions(-)

       via  948b853e79639e9c1a9e3b6ef098819f4c16f54d (commit)
       via  fa10b9d2429117240213bb6c26254332e61a3678 (commit)
       via  e08f41fd388d9aca6f34a72c1ac011f6e87a1029 (commit)
      from  2ac20a6ffa19b0bb2bc86fdcefcfe1d195c7f16a (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 948b853e79639e9c1a9e3b6ef098819f4c16f54d
Author: radhika <radhika at curoverse.com>
Date:   Tue Dec 2 23:02:10 2014 -0500

    4525: remove local storage code from selection js since clippy is no longer used.

diff --git a/apps/workbench/app/assets/javascripts/selection.js.erb b/apps/workbench/app/assets/javascripts/selection.js.erb
index 3201184..a9028b0 100644
--- a/apps/workbench/app/assets/javascripts/selection.js.erb
+++ b/apps/workbench/app/assets/javascripts/selection.js.erb
@@ -1,89 +1,14 @@
 //= require jquery
 //= require jquery_ujs
 
-/** Javascript for local persistent selection. */
-
-get_selection_list = null;
+/** Javascript for selection. */
 
 jQuery(function($){
-    var storage = localStorage; // sessionStorage
-
-    get_selection_list = function() {
-        if (!storage.persistentSelection) {
-            storage.persistentSelection = JSON.stringify([]);
-        }
-        return JSON.parse(storage.persistentSelection);
-    }
-
-    var put_storage = function(lst) {
-        storage.persistentSelection = JSON.stringify(lst);
-    }
-
-    var add_selection = function(uuid, name, href, type) {
-        var lst = get_selection_list();
-        lst.push({"uuid": uuid, "name": name, "href": href, "type": type});
-        put_storage(lst);
-        update_count();
-    };
-
-    var remove_selection = function(uuid) {
-        var lst = get_selection_list();
-        for (var i = 0; i < lst.length; i++) {
-            if (lst[i].uuid == uuid) {
-                lst.splice(i, 1);
-                i--;
-            }
-        }
-        put_storage(lst);
-        update_count();
-    };
-
-    var remove_selection_click = function(e) {
-        remove_selection($(this).val());
-    };
-
-    var clear_selections = function() {
-        put_storage([]);
-        update_count();
-    }
-
-    var update_count = function(e) {
-        var this_object_uuid = $('#selection-form-content').
-            closest('form').
-            find('input[name=uuid]').val();
-        var lst = get_selection_list();
-
-        var checkboxes = $('.persistent-selection:checkbox');
-        for (i = 0; i < checkboxes.length; i++) {
-            for (var j = 0; j < lst.length; j++) {
-                if (lst[j].uuid == $(checkboxes[i]).val()) {
-                    checkboxes[i].checked = true;
-                    break;
-                }
-            }
-            if (j == lst.length) {
-                checkboxes[i].checked = false;
-            }
-        }
-
-        $('.remove-selection').on('click', remove_selection_click);
-        $(document).trigger('selections-updated', [lst]);
-    };
-
     $(document).
         on('change', '.persistent-selection:checkbox', function(e) {
-            var inc = 0;
-            if ($(this).is(":checked")) {
-                add_selection($(this).val(), $(this).attr('friendly_name'), $(this).attr('href'), $(this).attr('friendly_type'));
-            }
-            else {
-                remove_selection($(this).val());
-            }
+          $(document).trigger('selections-updated');
         });
 
-    $(window).on('load', clear_selections);
-    $(window).on('storage', update_count);
-
     $('#selection-form-content').on("click", function(e) {
         e.stopPropagation();
     });

commit fa10b9d2429117240213bb6c26254332e61a3678
Merge: 2ac20a6 e08f41f
Author: radhika <radhika at curoverse.com>
Date:   Tue Dec 2 20:54:31 2014 -0500

    Merge branch 'master' into 4525-problem-clippy-code


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list