Fixed part of prompt.
This commit is contained in:
@ -33,7 +33,7 @@ var CodeOceanEditor = {
|
|||||||
runmode: this.NONE,
|
runmode: this.NONE,
|
||||||
|
|
||||||
numMessages: 0,
|
numMessages: 0,
|
||||||
prompt: $('#prompt'),
|
prompt: '#prompt',
|
||||||
lastCopyText: null,
|
lastCopyText: null,
|
||||||
|
|
||||||
autosaveTimer: null,
|
autosaveTimer: null,
|
||||||
|
@ -154,16 +154,18 @@ CodeOceanEditorEvaluation = {
|
|||||||
//TODO: Move Prompt Part in own component
|
//TODO: Move Prompt Part in own component
|
||||||
showPrompt: function(msg) {
|
showPrompt: function(msg) {
|
||||||
var label = $('#prompt .input-group-addon');
|
var label = $('#prompt .input-group-addon');
|
||||||
|
var prompt = $(this.prompt)
|
||||||
label.text(msg.data || label.data('prompt'));
|
label.text(msg.data || label.data('prompt'));
|
||||||
if (this.prompt.isPresent() && this.prompt.hasClass('hidden')) {
|
if (prompt.isPresent() && prompt.hasClass('hidden')) {
|
||||||
this.prompt.removeClass('hidden');
|
prompt.removeClass('hidden');
|
||||||
}
|
}
|
||||||
$('#prompt input').focus();
|
$('#prompt input').focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
hidePrompt: function() {
|
hidePrompt: function() {
|
||||||
if (this.prompt.isPresent() && !this.prompt.hasClass('hidden')) {
|
var prompt = $(this.prompt)
|
||||||
this.prompt.addClass('hidden');
|
if (prompt.isPresent() && !prompt.hasClass('hidden')) {
|
||||||
|
prompt.addClass('hidden');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -4,13 +4,16 @@ div id='output_sidebar_uncollapsed' class='hidden col-sm-12' data-message-no-out
|
|||||||
.row
|
.row
|
||||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-minus-square', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_sidebar'))
|
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-minus-square', id: 'toggle-sidebar-output', label: t('exercises.editor.collapse_sidebar'))
|
||||||
hr
|
hr
|
||||||
|
div
|
||||||
|
#turtlediv
|
||||||
|
canvas#turtlecanvas.hidden width=400 height=400 style='border-style:solid;border-width:thin'
|
||||||
|
hr
|
||||||
div
|
div
|
||||||
#hint
|
#hint
|
||||||
.panel.panel-warning
|
.panel.panel-warning
|
||||||
.panel-heading = t('exercises.implement.hint')
|
.panel-heading = t('exercises.implement.hint')
|
||||||
.panel-body
|
.panel-body
|
||||||
div
|
div
|
||||||
// todo set to full width if turtle isnt used
|
|
||||||
#prompt.input-group.hidden
|
#prompt.input-group.hidden
|
||||||
span.input-group-addon data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
|
span.input-group-addon data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
|
||||||
input#prompt-input.form-control type='text'
|
input#prompt-input.form-control type='text'
|
||||||
@ -21,9 +24,4 @@ div id='output_sidebar_uncollapsed' class='hidden col-sm-12' data-message-no-out
|
|||||||
- if CodeOcean::Config.new(:code_ocean).read[:flowr][:enabled]
|
- if CodeOcean::Config.new(:code_ocean).read[:flowr][:enabled]
|
||||||
#flowrHint.panel.panel-info data-url=CodeOcean::Config.new(:code_ocean).read[:flowr][:url] role='tab'
|
#flowrHint.panel.panel-info data-url=CodeOcean::Config.new(:code_ocean).read[:flowr][:url] role='tab'
|
||||||
.panel-heading = 'Gain more insights here'
|
.panel-heading = 'Gain more insights here'
|
||||||
.panel-body
|
.panel-body
|
||||||
hr
|
|
||||||
div
|
|
||||||
#turtlediv
|
|
||||||
// todo what should the canvas default size be?
|
|
||||||
canvas#turtlecanvas.hidden width=400 height=400 style='border-style:solid;border-width:thin'
|
|
Reference in New Issue
Block a user