GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Commit 30d772d5 authored by Andreas Gärtner's avatar Andreas Gärtner

Task #15893: Add real time clock to QuestionToolbar.

parent 6ebc9a77
......@@ -48,6 +48,12 @@ Ext.define('ARSnova.view.components.QuestionToolbar', {
}
});
this.clockElement = Ext.create('Ext.Component', {
cls: 'x-toolbar-title x-title',
hidden: true,
align: 'left'
});
this.answerCounter = Ext.create('Ext.Component', {
cls: "x-toolbar-title alignRight counterText",
align: 'right'
......@@ -62,6 +68,7 @@ Ext.define('ARSnova.view.components.QuestionToolbar', {
this.add([
this.backButton,
this.clockElement,
this.answerCounter,
this.statisticsButton
]);
......@@ -113,6 +120,12 @@ Ext.define('ARSnova.view.components.QuestionToolbar', {
this.answerCounter.setHtml(counter.join(" "));
},
updateTime: function () {
var actualTime = new Date().toTimeString().substring(0, 8);
this.clockElement.setHtml(actualTime);
this.clockElement.setHidden(false);
},
checkStatistics: function (question, isDisabled) {
if (typeof question !== 'undefined' && !!question.showStatistic && isDisabled && question.questionType !== 'flashcard') {
this.statisticsButton.show();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment