diff --git a/server.py b/server.py index 1903fdf..eb075f9 100755 --- a/server.py +++ b/server.py @@ -255,8 +255,11 @@ def geo(): def contrib(): categ_list = categories_in_datatable categ_list_str = [ s[0].upper() + s[1:].replace('_', ' ') for s in categories_in_datatable] + currOrg = request.args.get('org') + if currOrg is None: + currOrg = "" return render_template('contrib.html', - currOrg="", + currOrg=currOrg, rankMultiplier=cfg.getfloat('CONTRIB' ,'rankMultiplier'), categ_list=json.dumps(categ_list), categ_list_str=categ_list_str diff --git a/static/js/contrib.js b/static/js/contrib.js index 38bbfb4..14fa12b 100644 --- a/static/js/contrib.js +++ b/static/js/contrib.js @@ -250,8 +250,6 @@ function showOnlyOrg() { } $(document).ready(function() { - if(currOrg != "") // currOrg selected - updateProgressHeader(org) $('#orgName').typeahead(typeaheadOption); $('#btnCurrRank').popover(popOverOption); datatableTop = $('#topContribTable').DataTable(optionDatatable_top); @@ -285,7 +283,8 @@ $(document).ready(function() { }); // top 5 contrib overtime $.getJSON( url_getTop5Overtime, function( data ) { - console.log(data); var plotLineChart = $.plot("#divTop5Overtime", data, optionsLineChart); }); + if(currOrg != "") // currOrg selected + updateProgressHeader(currOrg) });