From ed6bcc2b8d4446c4404a1ce735667d8ad7ae9277 Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Tue, 31 Oct 2017 16:27:39 +0100 Subject: [PATCH] Added progress bar and aueried org name + next rank --- server.py | 1 + static/css/ranking.css | 59 ++---------------------------------------- templates/contrib.html | 26 +++++++++++++++++-- 3 files changed, 27 insertions(+), 59 deletions(-) diff --git a/server.py b/server.py index 0b5bb5c..c94ccf9 100755 --- a/server.py +++ b/server.py @@ -131,6 +131,7 @@ def geo(): @app.route("/contrib") def contrib(): return render_template('contrib.html', + currOrg="" ) @app.route("/_getLastContributor") diff --git a/static/css/ranking.css b/static/css/ranking.css index 18db351..f5c08b0 100644 --- a/static/css/ranking.css +++ b/static/css/ranking.css @@ -19,61 +19,6 @@ min-width: 45px; } -.star1-1{ - -} - -.star2-1 { - -} -.star2-2 { - left: 0px; -} - -.star3-1 { - top: 6px; - left: 5px; -} -.star3-2 { - top: -8px; - left: 0px; -} -.star3-3 { - top: 6px; - left: -5px; -} - -.star4-1 { - -} -.star4-2 { - left: -6px; -} -.star4-3 { - left: -36px; - top: -10px; -} -.star4-4 { - left: -42px; - top: -10px; -} - -.star5-1 { - top: 7px; -} -.star5-2 { - left: -3px; - top: 7px; -} -.star5-3 { - left: -37px; - top: -7px; -} -.star5-4 { - left: -47px; - top: -0px; -} -.star5-5 { - left: -57px; - top: -7px; +.progress { + width: 150px; } diff --git a/templates/contrib.html b/templates/contrib.html index dfdf332..bb1b890 100644 --- a/templates/contrib.html +++ b/templates/contrib.html @@ -83,7 +83,7 @@ text-align: center; margin-left: 8px; float: left; - padding-top: 9px; + padding-top: 15px; } .center { @@ -115,7 +115,23 @@ small {
- Your organisation name: + Organisation name: +
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
@@ -295,6 +311,9 @@ small { } else { return process(allOrg); } + }, + updater: function(item) { + $('#orgText').text(item); } } @@ -353,6 +372,9 @@ small { $(document).ready(function() { $('#orgName').typeahead(typeaheadOption); + $('#orgRankDiv').html(getRankIcon(8)); + $('#orgNextRankDiv').html(getRankIcon(9)); + $('#orgText').text('{{ currOrg }}'); datatableTop = $('#topContribTable').DataTable(optionDatatable_top); datatableFame = $('#fameTable').DataTable(optionDatatable_fame); datatableCateg = $('#categTable').DataTable(optionDatatable_Categ);