implementation ready for testing

This commit is contained in:
yqbk
2016-08-17 15:53:16 +02:00
parent 476188990f
commit 7bead2c473
6 changed files with 7 additions and 16 deletions

View File

@ -403,8 +403,6 @@ $(function() {
$('.editor').each(function(index, element) { $('.editor').each(function(index, element) {
var editor = ace.edit(element); var editor = ace.edit(element);
console.log('ace', element)
if (qa_api) { if (qa_api) {
editor.getSession().on("change", function (deltaObject) { editor.getSession().on("change", function (deltaObject) {
qa_api.executeCommand('syncEditor', [active_file, deltaObject]); qa_api.executeCommand('syncEditor', [active_file, deltaObject]);
@ -836,9 +834,9 @@ $(function() {
var showFrame = function(frame) { var showFrame = function(frame) {
active_frame = frame; active_frame = frame;
// should not be hidden to generate multiple ace editors in edit mode $('.frame').hide();
//$('.frame').hide(); frame.show();
$('.frame').show();
}; };
var showOutput = function(event) { var showOutput = function(event) {

View File

@ -4,14 +4,12 @@ button i.fa-spin {
.editor { .editor {
height: 100%; height: 100%;
width: auto; width: 100%;
margin: 12px;
} }
.frame { .frame {
display: none; display: none;
height: 200px; height: 400px;
width: auto;
audio, img, video { audio, img, video {
max-width: 100%; max-width: 100%;
@ -57,11 +55,8 @@ button i.fa-spin {
#files { #files {
overflow: auto; overflow: auto;
} }
#hint { #hint {
display: none; display: none;
} }

View File

@ -63,7 +63,6 @@ class ExercisesController < ApplicationController
end end
def edit def edit
end end
def import_proforma_xml def import_proforma_xml

View File

@ -1,4 +1,3 @@
//- id = f.object.id
= form_for(file) do |f| = form_for(file) do |f|
li.panel.panel-default li.panel.panel-default
.panel-heading role="tab" id="heading" .panel-heading role="tab" id="heading"

View File

@ -31,7 +31,7 @@
h2 = t('activerecord.attributes.exercise.files') h2 = t('activerecord.attributes.exercise.files')
ul#files.list-unstyled.panel-group ul#files.list-unstyled.panel-group
= @exercise.files.each do |file| - @exercise.files.each do |file|
= render partial: 'file_form', locals: { file: file } = render partial: 'file_form', locals: { file: file }
a#add-file.btn.btn-default.btn-sm.pull-right href='#' = t('.add_file') a#add-file.btn.btn-default.btn-sm.pull-right href='#' = t('.add_file')

View File

@ -1,3 +1,3 @@
h1 = @exercise h1 = @exercise
= render('form', exercise: @exercise, files: @files) = render('form')