From 94db205a05629742a3784313bb3c208100b881cf Mon Sep 17 00:00:00 2001 From: Ciro Scognamiglio Date: Wed, 15 Apr 2015 19:25:25 +0200 Subject: [PATCH] dashboard redesign --- portal/static/css/fed4fire.css | 22 +- portal/static/js/common.functions.js | 16 +- portal/templates/base.html | 23 +- .../fed4fire/fed4fire_home-view.html | 197 +++++++----------- 4 files changed, 129 insertions(+), 129 deletions(-) diff --git a/portal/static/css/fed4fire.css b/portal/static/css/fed4fire.css index 70de2a8f..6340326e 100644 --- a/portal/static/css/fed4fire.css +++ b/portal/static/css/fed4fire.css @@ -27,7 +27,8 @@ h2 { color:#333333; } h3 { - font-size:13pt; + font-size:12pt; + letter-spacing:0.6pt; color:#201E62; } input[type=checkbox] { @@ -651,17 +652,28 @@ div.secondary .account span { div.secondary .account a { color:black; } -div.dashboard div { - margin:25px 0; -} + div.dashboard { - text-align:center; +} +div.dashboard a { + color:black; +} +div.dashboard a:hover { } div.dashboard ul { text-align:left; margin-left:24px; list-style:none; } +div.dashboard h3 { + border-bottom:0.5px solid #E0E0E0; + margin-right:15px; +} +div.dashboard h3 img { + margin:15px 15px 15px 0; +} + + div.dataTables_filter label{ float:left; width:400px; diff --git a/portal/static/js/common.functions.js b/portal/static/js/common.functions.js index 481e9478..a74132e2 100644 --- a/portal/static/js/common.functions.js +++ b/portal/static/js/common.functions.js @@ -19,13 +19,13 @@ function getKeySplitId(id,separator){ if ( typeof String.prototype.startsWith != 'function' ) { String.prototype.startsWith = function( str ) { return this.substring( 0, str.length ) === str; - } + }; }; if ( typeof String.prototype.endsWith != 'function' ) { String.prototype.endsWith = function( str ) { return this.substring( this.length - str.length, this.length ) === str; - } + }; }; // http://stackoverflow.com/questions/646628/javascript-startswith @@ -58,15 +58,19 @@ jQuery.fn.spin = function(opts) { // FROM Triptych : http://stackoverflow.com/users/43089/triptych // http://stackoverflow.com/questions/979256/how-to-sort-an-array-of-javascript-objects // data.sort(sort_by('city', false, function(a){return a.toUpperCase()})); -var sort_by = function(field, reverse, primer){ +var sort_by = function(field, reverse, primer) { - var key = function (x) {return primer ? primer(x[field]) : x[field]}; + var key = function(x) { return primer ? primer(x[field]) : x[field]; }; //var key = primer ? function (x) { return primer(x[field]); } : function (x) { return x[field]; } - return function (a,b) { + return function(a,b) { var A = key(a), B = key(b); return (A < B ? -1 : (A > B ? 1 : 0)) * [1,-1][+!!reverse]; //return ((A < B) ? -1 : // (A > B) ? +1 : 0)) * [-1,1][+!!reverse]; - } + }; +}; + +function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } diff --git a/portal/templates/base.html b/portal/templates/base.html index aed282c1..fd1869ee 100644 --- a/portal/templates/base.html +++ b/portal/templates/base.html @@ -21,7 +21,7 @@ - + @@ -82,6 +82,7 @@ $(document).ready(function() { p = myslice.projects(); if(p != null){ drawProjects(p); + drawProjectsTree(p,slices); } {% endif %} }); @@ -106,6 +107,26 @@ $(document).ready(function() { $("div#home-project-list").html($( "