Added support of org in URL GET param

pull/3/head
Sami Mokaddem 2017-11-06 09:58:59 +01:00
parent 264a4e52e2
commit 85d7d10df5
2 changed files with 6 additions and 4 deletions

View File

@ -255,8 +255,11 @@ def geo():
def contrib(): def contrib():
categ_list = categories_in_datatable categ_list = categories_in_datatable
categ_list_str = [ s[0].upper() + s[1:].replace('_', ' ') for s in 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', return render_template('contrib.html',
currOrg="", currOrg=currOrg,
rankMultiplier=cfg.getfloat('CONTRIB' ,'rankMultiplier'), rankMultiplier=cfg.getfloat('CONTRIB' ,'rankMultiplier'),
categ_list=json.dumps(categ_list), categ_list=json.dumps(categ_list),
categ_list_str=categ_list_str categ_list_str=categ_list_str

View File

@ -250,8 +250,6 @@ function showOnlyOrg() {
} }
$(document).ready(function() { $(document).ready(function() {
if(currOrg != "") // currOrg selected
updateProgressHeader(org)
$('#orgName').typeahead(typeaheadOption); $('#orgName').typeahead(typeaheadOption);
$('#btnCurrRank').popover(popOverOption); $('#btnCurrRank').popover(popOverOption);
datatableTop = $('#topContribTable').DataTable(optionDatatable_top); datatableTop = $('#topContribTable').DataTable(optionDatatable_top);
@ -285,7 +283,8 @@ $(document).ready(function() {
}); });
// top 5 contrib overtime // top 5 contrib overtime
$.getJSON( url_getTop5Overtime, function( data ) { $.getJSON( url_getTop5Overtime, function( data ) {
console.log(data);
var plotLineChart = $.plot("#divTop5Overtime", data, optionsLineChart); var plotLineChart = $.plot("#divTop5Overtime", data, optionsLineChart);
}); });
if(currOrg != "") // currOrg selected
updateProgressHeader(currOrg)
}); });