summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMarko Pušnik <marko.pusnik@guru.si>2015-10-15 15:58:05 +0200
committerMarko Pušnik <marko.pusnik@guru.si>2015-10-15 15:58:05 +0200
commit4738f0cdef0fb52d530748e6d2b62bf0454d8c33 (patch)
tree632ed1860167e73a5c6583ece7fe9f84fc20e93e /js
parenta78e4ac73f8a7b5fb664c703562717d165ff7760 (diff)
profile page translations
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']) {