Skip to content

Commit

Permalink
exec points entered as committee points, fixed issue with admin page …
Browse files Browse the repository at this point in the history
…not displaying current committee points
  • Loading branch information
benthemonkey committed Jun 25, 2015
1 parent 26ecea9 commit 835d882
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions js/pointsCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1796,9 +1796,13 @@ define(['jquery', 'moment', 'hogan'], function($, moment, Hogan){
destroyTypeahead);

$('[data-edit-committee]').on('click', function(){
$('.committee-points').val(0).show();
var committee = $('#edit-committee').val();

$('.committee-points').val(0).show()
.attr('max', (committee == 'Exec' ? 40 : 20));

$('#editCommitteeOrSuite').data('is-committee', true);
$.getJSON(root + '/ajax/getCommitteeOrSuite.php', { committee: $('#edit-committee').val() }, admin.addSlivkans);
$.getJSON(root + '/ajax/getCommitteeOrSuite.php', { committee: committee }, admin.addSlivkans);
});

$('[data-edit-suite]').on('click', function(){
Expand Down Expand Up @@ -1934,8 +1938,8 @@ define(['jquery', 'moment', 'hogan'], function($, moment, Hogan){
entry = entries.eq(i);
name = slivkans[slivkans.indexOfKey('nu_email', data[i].nu_email)].full_name;
entry.find('.slivkan-entry').val(name);
if(data[i].committee){
entry.find('.committee-points').val(data[i].committee);
if(data[i].points){
entry.find('.committee-points').val(data[i].points);
}
admin.validateSlivkanName(entry);
}
Expand Down

0 comments on commit 835d882

Please sign in to comment.