Fixed part of prompt.
This commit is contained in:
@ -33,7 +33,7 @@ var CodeOceanEditor = {
|
||||
runmode: this.NONE,
|
||||
|
||||
numMessages: 0,
|
||||
prompt: $('#prompt'),
|
||||
prompt: '#prompt',
|
||||
lastCopyText: null,
|
||||
|
||||
autosaveTimer: null,
|
||||
|
@ -154,16 +154,18 @@ CodeOceanEditorEvaluation = {
|
||||
//TODO: Move Prompt Part in own component
|
||||
showPrompt: function(msg) {
|
||||
var label = $('#prompt .input-group-addon');
|
||||
var prompt = $(this.prompt)
|
||||
label.text(msg.data || label.data('prompt'));
|
||||
if (this.prompt.isPresent() && this.prompt.hasClass('hidden')) {
|
||||
this.prompt.removeClass('hidden');
|
||||
if (prompt.isPresent() && prompt.hasClass('hidden')) {
|
||||
prompt.removeClass('hidden');
|
||||
}
|
||||
$('#prompt input').focus();
|
||||
},
|
||||
|
||||
hidePrompt: function() {
|
||||
if (this.prompt.isPresent() && !this.prompt.hasClass('hidden')) {
|
||||
this.prompt.addClass('hidden');
|
||||
var prompt = $(this.prompt)
|
||||
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
|
||||
= 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
|
||||
div
|
||||
#turtlediv
|
||||
canvas#turtlecanvas.hidden width=400 height=400 style='border-style:solid;border-width:thin'
|
||||
hr
|
||||
div
|
||||
#hint
|
||||
.panel.panel-warning
|
||||
.panel-heading = t('exercises.implement.hint')
|
||||
.panel-body
|
||||
div
|
||||
// todo set to full width if turtle isnt used
|
||||
#prompt.input-group.hidden
|
||||
span.input-group-addon data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
|
||||
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]
|
||||
#flowrHint.panel.panel-info data-url=CodeOcean::Config.new(:code_ocean).read[:flowr][:url] role='tab'
|
||||
.panel-heading = 'Gain more insights here'
|
||||
.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'
|
||||
.panel-body
|
Reference in New Issue
Block a user