Commit 3fc71a8f by Jonathan Piacenti

More compatible handling of zone alignment selection in studio.

parent 63d6bf01
...@@ -177,7 +177,8 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -177,7 +177,8 @@ function DragAndDropEditBlock(runtime, element, params) {
_fn.build.form.zone.add(); _fn.build.form.zone.add();
}) })
.on('click', '.remove-zone', _fn.build.form.zone.remove) .on('click', '.remove-zone', _fn.build.form.zone.remove)
.on('input', '.zone-row input, .zone-row select', _fn.build.form.zone.changedInputHandler) .on('input', '.zone-row input', _fn.build.form.zone.changedInputHandler)
.on('change', '.align-select', _fn.build.form.zone.changedInputHandler)
.on('click', '.target-image-form button', function(e) { .on('click', '.target-image-form button', function(e) {
e.preventDefault(); e.preventDefault();
...@@ -329,24 +330,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -329,24 +330,6 @@ function DragAndDropEditBlock(runtime, element, params) {
}); });
}, },
getZoneNames: function() {
var zoneNames = [];
var $form = _fn.build.$el.zones.form.find('.title');
$form.each(function(i, el) {
var val = $(el).val();
if (val.length > 0) {
zoneNames.push(val);
}
});
return zoneNames;
},
getZoneAlignNames: function() {
var alignNames = ["", "left", "center", "right"];
return alignNames;
},
changedInputHandler: function(ev) { changedInputHandler: function(ev) {
// Called when any of the inputs have changed. // Called when any of the inputs have changed.
var $changedInput = $(ev.currentTarget); var $changedInput = $(ev.currentTarget);
...@@ -496,6 +479,7 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -496,6 +479,7 @@ function DragAndDropEditBlock(runtime, element, params) {
correct: $el.find('.success-feedback').val(), correct: $el.find('.success-feedback').val(),
incorrect: $el.find('.error-feedback').val() incorrect: $el.find('.error-feedback').val()
}, },
imageURL: imageURL, imageURL: imageURL,
imageDescription: imageDescription, imageDescription: imageDescription,
}; };
......
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