Commit 16ca55d6 authored by Nigel McNie's avatar Nigel McNie
Browse files

Ensure that when a new blocktype is dragged onto a view, any existing configure form is closed.

Together with the next commit, solves #1720
parent a03f28b1
......@@ -845,6 +845,16 @@ function ViewManager() {
var configureButton = getFirstElementByTagAndClassName('input', 'configurebutton', blockinstance);
if (configureButton) {
self.rewriteConfigureButton(configureButton);
if (self.currentConfigureData) {
self.currentConfigureData['contentdiv'].innerHTML = self.currentConfigureData['oldcontent'];
removeNodeAttribute(self.currentConfigureData['button'], 'disabled');
self.currentConfigureData = null;
}
self.currentConfigureData = {
'contentdiv': getFirstElementByTagAndClassName('div', 'blockinstance-content', blockinstance),
'oldcontent': '',
'button' : configureButton
};
setNodeAttribute(configureButton, 'disabled', 'disabled');
}
......
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