working icons

This commit is contained in:
yqbk
2016-07-25 15:59:48 +02:00
parent 52fd18c80e
commit 9c1b221fba
7 changed files with 11 additions and 13 deletions

View File

@ -29,6 +29,7 @@ gem 'sass-rails', '~> 4.0.3'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'slim'
gem 'bootstrap_pagedown'
gem 'pagedown-rails', '~> 1.1.4'
gem 'sorcery'
gem 'thread_safe'
gem 'turbolinks'

View File

@ -177,6 +177,8 @@ GEM
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
pagedown-rails (1.1.4)
railties (> 3.1)
parser (2.3.0.6)
ast (~> 2.2)
pg (0.18.4)
@ -385,6 +387,7 @@ DEPENDENCIES
newrelic_rpm
nokogiri
nyan-cat-formatter
pagedown-rails (~> 1.1.4)
pg
pry
puma (~> 2.15.3)

View File

@ -22,5 +22,8 @@
//= require turbolinks
//= require_tree ../../../lib
//= require_tree .
//= require markdown.converter
//= require markdown.sanitizer
//= require markdown.editor

View File

@ -158,7 +158,7 @@ $(function() {
execution_environments = $('form').data('execution-environments');
file_types = $('form').data('file-types');
// new MarkdownEditor('#exercise_instructions');
new MarkdownEditor('#exercise_description');
//new MarkdownEditor('#exercise_description');
// todo: add an ace editor for each file
new PagedownEditor('#exercise_description');

View File

@ -15,4 +15,5 @@
*= require_tree ../../../vendor/assets/stylesheets/
*= require_self
*= require bootstrap_pagedown
*= require markdown
*/

View File

@ -8,18 +8,8 @@
= f.text_field(:title, class: 'form-control', required: true)
.form-group
= f.label(:description)
= f.hidden_field(:description)
.form-control.markdown
/.form-group
= f.label(:description)
= f.hidden_field(:description)
= f.pagedown_editor :description
.form-control.markdown
/.wmd-panel
.wmd-button-bar
textarea.wmd-input
.wmd-preview
/=f.input :description, :as => :pagedown, :input_html => { :preview => true }
.form-group
= f.label(:execution_environment_id)
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control')

View File

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