Skip to content

Commit

Permalink
tweaks and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benthemonkey committed Oct 21, 2015
1 parent 16d2f95 commit b48ecaf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
9 changes: 8 additions & 1 deletion ajax/PointsCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,18 @@ public function getSlivkans()

public function getFellows()
{
return self::fetchAllQuery(
$fellows = self::fetchAllQuery(
"SELECT full_name,position,about,photo
FROM fellows
WHERE qtr_final IS NULL"
);

# add tokens for typeahead.js
$n = count($fellows);
for ($i=0; $i<$n; $i++) {
$fellows[$i]["tokens"] = explode(" ", $fellows[$i]["full_name"]);
}
return $fellows;
}

public function updateFellowPhoto($fellow, $photo)
Expand Down
10 changes: 3 additions & 7 deletions css/points-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,13 @@ tr.odd td.yellow.sorting_1 { background-color: #FFD500; }
margin-left: 170px;
}

.points-table th.name {
.points-table th.name,
.points-table td.name {
position: absolute;
margin-left: -170px;
margin-left: -171px;
}

.points-table th.name > div {
display: block;
}

.points-table td.name {
position: absolute;
margin-left: -170px;
}
}
2 changes: 1 addition & 1 deletion js/points-center/breakdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var getSlivkanPoints = function() {
// fix height of breakdown so there is no flash of background
$breakdown.parent().css('min-height', $breakdown.parent().height());

if (nuEmail.length > 0) {
if (nuEmail && nuEmail.length > 0) {
localStorage.spc_brk_slivkan = nuEmail;

$.when(
Expand Down
2 changes: 1 addition & 1 deletion js/points-center/submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ var validateFellowName = function(entry) {
entry.removeClass('has-warning');

if (name.length > 0) {
valid = _.findIndex({ full_name: name }) !== -1;
valid = _.findIndex(fellows, { full_name: name }) !== -1;
utils.updateValidity(entry, valid);
} else {
entry.removeClass('has-success has-error');
Expand Down
2 changes: 1 addition & 1 deletion js/points-center/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
};
})();
var adjustWidth = function() {
var width = (tableWrapper.width() - nameColWidth - 6 * totalsColWidth - 2) + 'px';
var width = (tableWrapper.width() - nameColWidth - 6 * totalsColWidth) + 'px';

$('th.end').css({
'width': width,
Expand Down

0 comments on commit b48ecaf

Please sign in to comment.