summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/codeq/login.js1
-rw-r--r--js/codeq/profile.js15
2 files changed, 9 insertions, 7 deletions
diff --git a/js/codeq/login.js b/js/codeq/login.js
index 961b708..97bb44b 100644
--- a/js/codeq/login.js
+++ b/js/codeq/login.js
@@ -87,7 +87,6 @@
jqAAILoginBtn.off('click');
$("#screen_login").css('display', 'none');
- $('#signed-in-title').html($('#username').val());
$("#password").val('');
//re-enable the click listener
jqNavigationHomeBtn.on('click', function(e){
diff --git a/js/codeq/profile.js b/js/codeq/profile.js
index 3f4a274..133c947 100644
--- a/js/codeq/profile.js
+++ b/js/codeq/profile.js
@@ -16,17 +16,20 @@
codeq.comms.getUserStat()
.then(function (data) {
if (data.code !== 0) throw new Error('GetUserStat failed, code: ' + data.code + ', message: ' + data.message);
- console.log(data);
- var data = data.stat;
+ data = data.stat;
var columns = ['language', 'problem_group', 'problems_count', 'done', 'in_progress'],
- labels = ['Language', 'Problem group', 'All', 'Done', 'In progress'];
+ labels = ['Language', 'Problem group', 'All', 'Done', 'In progress'],
+ items='<thead><tr>',
+ tr_gui = codeq.tr.getDictionary('gui');
- var items='<thead><tr>';
- $.each(labels, function( key, val ) {
- items+='<th>'+val+'</th>';
+ console.log(tr_gui);
+
+ $.each(columns, function( key, val ) {
+ items+='<th data-tkey="'+ val + '">'+tr_gui[val][codeq.settings['gui_lang']]+'</th>';
});
items+='</tr></thead>';
+
$.each( data, function( object, row ) {
items+='<tr>';
if(row['problem_group']) {