Skip to content

Commit

Permalink
sort fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rendoir committed May 30, 2018
1 parent 834b20e commit 0b2a307
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2787,8 +2787,8 @@ function sortAnswers() {
var aCorrect = a.classList.contains('border-success');
var bCorrect = b.classList.contains('border-success');
if (aCorrect || bCorrect) return aCorrect < bCorrect;
var aValue = parseInt(a.querySelector('.score').innerHTML);
var bValue = parseInt(b.querySelector('.score').innerHTML);
var aValue = parseInt(a.querySelector('.sort_score ').innerHTML);
var bValue = parseInt(b.querySelector('.sort_score ').innerHTML);
return aValue < bValue;
});

Expand Down
4 changes: 2 additions & 2 deletions resources/assets/js/answers/editAnswer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function editAnswer(editTrigger) {
}

let editor = $("#edit-editor");
let mde = editor.data("mde");
let mde = editor.data("mde");
mde.value(markdown.innerHTML);

let callFunction = function () {
Expand Down Expand Up @@ -86,4 +86,4 @@ function markdownToJs(markdown) {

module.exports = {
editAnswer
};
};
4 changes: 2 additions & 2 deletions resources/assets/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ function sortAnswers() {
let bCorrect = b.classList.contains('border-success');
if(aCorrect || bCorrect)
return aCorrect < bCorrect;
let aValue = parseInt(a.querySelector('.score').innerHTML);
let bValue = parseInt(b.querySelector('.score').innerHTML);
let aValue = parseInt(a.querySelector('.sort_score ').innerHTML);
let bValue = parseInt(b.querySelector('.sort_score ').innerHTML);
return aValue < bValue;
});

Expand Down
4 changes: 2 additions & 2 deletions resources/views/templates/abstractAnswer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="col-1 d-flex flex-column align-items-start">
<div class="p-2 mt-3 mb-auto">
<i class="fas fa-trophy"></i>
<p class="text-center mb-0 w-100 score">{{score}}</p>
<p class="text-center mb-0 w-100 sort_score score">{{score}}</p>
</div>
</div>
<div class="col-11">
Expand Down Expand Up @@ -45,7 +45,7 @@
<div class="col-2 col-sm-1 py-3 d-flex flex-column align-items-center justify-content-between">
<div class="p-2">
<i class="fas fa-trophy"></i>
<p class="text-center mb-0 w-100 {{^is_owner}}score{{/is_owner}}">{{score}}</p>
<p class="text-center mb-0 w-100 sort_score {{^is_owner}}score{{/is_owner}}">{{score}}</p>
</div>
{{^is_owner}}
<div class="d-flex flex-column justify-content-around {{^is_mod}}mb-sm-n-100{{/is_mod}}">
Expand Down

0 comments on commit 0b2a307

Please sign in to comment.