From 33f9e7fb68d58e43e1188409b43e550c9ed4b54d Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 5 Mar 2013 19:05:23 +0100 Subject: cleaned dashboard event code, preserve filtering across packages --- module/web/static/js/utils/animations.js | 2 +- module/web/static/js/views/dashboardView.js | 64 +++++++++++++++++++---------- module/web/static/js/views/fileView.js | 6 ++- module/web/static/js/views/filterView.js | 5 +++ module/web/static/js/views/packageView.js | 8 +--- module/web/static/js/views/selectionView.js | 16 ++++---- module/web/templates/default/dashboard.html | 2 +- 7 files changed, 62 insertions(+), 41 deletions(-) diff --git a/module/web/static/js/utils/animations.js b/module/web/static/js/utils/animations.js index 3350dd6ae..5131d3b8a 100644 --- a/module/web/static/js/utils/animations.js +++ b/module/web/static/js/utils/animations.js @@ -43,7 +43,7 @@ define(['jquery', 'underscore', 'transit'], function(jQuery, _) { return this; }; - // calculate the height and write it to data, better used on invisible elements + // calculate the height and write it to data, should be used on invisible elements jQuery.fn.calculateHeight = function(setHeight) { var o = jQuery(this[0]); var height = o.height(); diff --git a/module/web/static/js/views/dashboardView.js b/module/web/static/js/views/dashboardView.js index 58ca8faf0..d9ea8d444 100644 --- a/module/web/static/js/views/dashboardView.js +++ b/module/web/static/js/views/dashboardView.js @@ -6,6 +6,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', return Backbone.View.extend({ el: '#content', + active: $('.breadcrumb .active'), events: { }, @@ -14,6 +15,8 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/TreeCollection', packageUL: null, //