From c7dbdc1242e0a4b322ce144eba9b7883d578b3f0 Mon Sep 17 00:00:00 2001 From: Tom Giannattasio Date: Fri, 16 Nov 2012 11:43:21 -0500 Subject: [PATCH] added asset button to visual editor --- cms/static/coffee/src/views/unit.coffee | 4 +- cms/static/img/visual-editor-image-icon.png | Bin 0 -> 1175 bytes cms/static/js/html-editor.js | 108 ++++++++---------- cms/static/js/speed-editor.js | 20 ---- .../themes/advanced/skins/studio/ui.css | 16 +++ cms/static/sass/_unit.scss | 53 +++++++++ cms/templates/unit.html | 44 ++++++- 7 files changed, 161 insertions(+), 84 deletions(-) create mode 100644 cms/static/img/visual-editor-image-icon.png diff --git a/cms/static/coffee/src/views/unit.coffee b/cms/static/coffee/src/views/unit.coffee index 3ca2876b1b..f711d5eb5a 100644 --- a/cms/static/coffee/src/views/unit.coffee +++ b/cms/static/coffee/src/views/unit.coffee @@ -96,6 +96,7 @@ class CMS.Views.UnitEdit extends Backbone.View initProblemEditors(@$editor, $preview) when 'html' @$editor = $($('#html-editor').html()) + $preview = $('
') initHTMLEditor(@$editor, $preview) when 'discussion' @$editor = $($('#discussion-editor').html()) @@ -109,8 +110,7 @@ class CMS.Views.UnitEdit extends Backbone.View $componentActions = $($('#component-actions').html()) @$componentItem.append(@$editor) - if $preview - @$componentItem.append($preview) + @$componentItem.append($preview) @$componentItem.append($componentActions) @$componentItem.hide() diff --git a/cms/static/img/visual-editor-image-icon.png b/cms/static/img/visual-editor-image-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..17f8a5bfb4850e890062cf6155724bc78e1ed887 GIT binary patch literal 1175 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE;=WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2v2cW|hp4h>{3jAFJg2T)jk)8oi3#0-$aN1{?c|g2d$P)DnfH z)bz|eTc!8A_bVx6rr0WloBA5~7C5J7WO`H;r3P2|g(O#HCtIc{+1n}DR9FEG$W1Lt zRH(?!$t$+1uvG$^YXxM3g!Ppaz)DK8ZIvL7itr6kaLzAERWQ{v)=f4rG*mD%(=#+N zH8V5RQ7|$vG}1Q!A~Rh>6Dw0QDv55FG|-pw6wGYnPFt43sj+7T$xvrSfQI&tPC^3CAB!YD6^m>Ge1uOWMX1cerbuV z640d(FXR@$jm;~D1`{yA^eYkz^bPe4Kwg3=^!3HBG&dKny0|1L72#g21{a4^7NqJ2 zr55Lx79|5CE=?I^Re_arQEFmIeo;t%ehw@Y12XbU@{2R_3lyA#%@j0z6O%LZKmwXz z9lpL+o_WP3iFwJXo-VdZKr{3*GgGWAjLe|Z5PB_f>IEf++ybD@E~!PCWvMA{Mftf3U{70R;&zJ}PV=C8 zQ*gV*9H(A=pkwqwQHvDSFd<<20WskT7s!Dp{nR{QdM^Sd?8vLnpD-{ma(cQrhE&{2 z`t$$4J+mpJF!NMKZlT#i%Z-wZCnTQkyQ?z$$>WD!v!+j96T!T^f4+@xox~xYO&d*; zD?WS>oKgGzpYw(tebd-7*_uogrCE$6rYWt9+3i@VBX3tG +