|
|
@ -148,7 +148,10 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
Env.$container.html('');
|
|
|
|
Env.$container.html('');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var show = false;
|
|
|
|
|
|
|
|
|
|
|
|
if ($oldInput && !$oldInput.attr('data-uid')) {
|
|
|
|
if ($oldInput && !$oldInput.attr('data-uid')) {
|
|
|
|
|
|
|
|
show = true;
|
|
|
|
Env.$container.append($oldInput);
|
|
|
|
Env.$container.append($oldInput);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -158,7 +161,6 @@ define([
|
|
|
|
var done = [];
|
|
|
|
var done = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var show = false;
|
|
|
|
|
|
|
|
order.forEach(function (key) {
|
|
|
|
order.forEach(function (key) {
|
|
|
|
// Avoir duplicates
|
|
|
|
// Avoir duplicates
|
|
|
|
if (done.indexOf(key) !== -1) { return; }
|
|
|
|
if (done.indexOf(key) !== -1) { return; }
|
|
|
@ -278,9 +280,17 @@ define([
|
|
|
|
var onChange = function (Env) {
|
|
|
|
var onChange = function (Env) {
|
|
|
|
var md = Util.clone(Env.metadataMgr.getMetadata());
|
|
|
|
var md = Util.clone(Env.metadataMgr.getMetadata());
|
|
|
|
Env.comments = md.comments;
|
|
|
|
Env.comments = md.comments;
|
|
|
|
if (!Env.comments || !Env.comments.data) { Env.comments = Util.clone(COMMENTS); }
|
|
|
|
var changed = false;
|
|
|
|
|
|
|
|
if (!Env.comments || !Env.comments.data) {
|
|
|
|
|
|
|
|
changed = true;
|
|
|
|
|
|
|
|
Env.comments = Util.clone(COMMENTS);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (Env.ready === 0) {
|
|
|
|
if (Env.ready === 0) {
|
|
|
|
Env.ready = true;
|
|
|
|
Env.ready = true;
|
|
|
|
|
|
|
|
if (changed) {
|
|
|
|
|
|
|
|
updateMetadata(Env);
|
|
|
|
|
|
|
|
Env.framework.localChange();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
redrawComments(Env);
|
|
|
|
redrawComments(Env);
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -392,7 +402,7 @@ sel.forEach(function (el) {
|
|
|
|
|
|
|
|
|
|
|
|
Env.framework.localChange();
|
|
|
|
Env.framework.localChange();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
Env.$container.prepend(form);
|
|
|
|
Env.$container.prepend(form).show();;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|