diff --git a/BUGS.md b/BUGS.md
index 3e22340..92f2e4d 100644
--- a/BUGS.md
+++ b/BUGS.md
@@ -1,6 +1,10 @@
# BUGS
+- abrir o teste numa janela maximizada e que nao permite que o aluno a redimensione/mova.
+- detectar scroll e enviar posição para servidor (analise de scroll para detectar copianço? ou simplesmente para analisar como os alunos percorrem o teste)
+- detectar se janela perde focus e alertar o prof (http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active)
+
- usar thread.Lock para aceder a variaveis de estado?
- permitir adicionar imagens nas perguntas.
- debug mode: log levels not working
diff --git a/serve.py b/serve.py
index 7f36009..78e83e4 100755
--- a/serve.py
+++ b/serve.py
@@ -99,6 +99,13 @@ class AdminWebService(object):
elif args['cmd'] == 'reset':
return self.app.reset_password(args['name'])
+ else:
+ print(args)
+ # if args['cmd'] == 'focus':
+ # print('FOCUS', args['name'])
+ # elif args['cmd'] == 'blur':
+ # print('FOCUS', args['name'])
+
# ============================================================================
# Webserver root
# ============================================================================
diff --git a/static/js/question_disabler.js b/static/js/question_disabler.js
index 1d1ecea..862140f 100644
--- a/static/js/question_disabler.js
+++ b/static/js/question_disabler.js
@@ -7,6 +7,6 @@ $(document).ready(function() {
// $(this).parent().parent().className = "panel panel-info";
});
$(function () {
- $('[data-toggle="popover"]').popover()
- })
+ $('[data-toggle="popover"]').popover();
+ });
});
diff --git a/static/js/tabkey_in_textarea.js b/static/js/tabkey_in_textarea.js
index 227abdb..6b984ec 100644
--- a/static/js/tabkey_in_textarea.js
+++ b/static/js/tabkey_in_textarea.js
@@ -1,21 +1,18 @@
-$("textarea").keydown(function(e) {
- if(e.keyCode === 9) { // tab was pressed
- // get caret position/selection
- var start = this.selectionStart;
- var end = this.selectionEnd;
+$(document).ready(function() {
- var $this = $(this);
- var value = $this.val();
+ $("textarea").keydown(function(e) {
+ if(e.keyCode === 9) { // tab was pressed
+ // get caret position/selection
+ var start = this.selectionStart;
+ var end = this.selectionEnd;
+ var value = $(this).val();
- // set textarea value to: text before caret + tab + text after caret
- $this.val(value.substring(0, start)
- + "\t"
- + value.substring(end));
+ // set textarea value to: text before caret + tab + text after caret
+ $(this).val(value.substring(0, start) + " " + value.substring(end));
- // put caret at right position again (add one for the tab)
- this.selectionStart = this.selectionEnd = start + 1;
-
- // prevent the focus lose
- e.preventDefault();
- }
-});
\ No newline at end of file
+ // put caret at right position again (add one for the tab)
+ this.selectionStart = this.selectionEnd = start + 4;
+ e.preventDefault(); // prevent the focus lose
+ }
+ });
+});
diff --git a/templates/test.html b/templates/test.html
index f593bfc..733c0f2 100644
--- a/templates/test.html
+++ b/templates/test.html
@@ -28,6 +28,10 @@
+
+
+
+