Commit b42f4f5e by Filippo Valsorda

Restore the form to change the background image

parent 15fca813
...@@ -206,6 +206,10 @@ ...@@ -206,6 +206,10 @@
margin-left: 0; margin-left: 0;
} }
.xblock--drag-and-drop .drag-builder .target-image-form input {
width: 50%;
}
.xblock--drag-and-drop .zones-form .zone-row label { .xblock--drag-and-drop .zones-form .zone-row label {
display: inline-block; display: inline-block;
width: 18%; width: 18%;
......
...@@ -162,6 +162,7 @@ function DragAndDropEditBlock(runtime, element) { ...@@ -162,6 +162,7 @@ function DragAndDropEditBlock(runtime, element) {
e.preventDefault(); e.preventDefault();
_fn.data.targetImg = $('.target-image-form input', element).val(); _fn.data.targetImg = $('.target-image-form input', element).val();
_fn.$target.css('background', 'url(' + _fn.data.targetImg + ') no-repeat');
// Placeholder shim for IE9 // Placeholder shim for IE9
$.placeholder.shim(); $.placeholder.shim();
......
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
<h3>Zone Positions</h3> <h3>Zone Positions</h3>
</header> </header>
<section class="tab-content"> <section class="tab-content">
<section class="tab-content target-image-form">
<label>New background URL:</label>
<input type="text">
<button class="btn">Change background</button>
</section>
<div class="items"> <div class="items">
<form class="zones-form"></form> <form class="zones-form"></form>
<a href="#" class="add-zone add-element"><div class="icon add"></div>Add a zone</a> <a href="#" class="add-zone add-element"><div class="icon add"></div>Add a zone</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment