update editors with remove button

This commit is contained in:
Mariela Michalek
2014-04-18 17:13:44 -03:00
parent 65286f0443
commit 2f82ce6d54
2 changed files with 38 additions and 10 deletions

View File

@@ -24,8 +24,10 @@ mindplot.widget.LinkEditor = new Class({
this.parent($msg("LINK"), {
cancelButton: true,
closeButton: true,
acceptButton: true
acceptButton: true,
removeButton: true
});
this._model = model;
var panel = this._buildPanel(model);
this.setContent(panel);
},
@@ -83,10 +85,10 @@ mindplot.widget.LinkEditor = new Class({
});
// result.addEvent('keydown', function (event) {
// event.stopPropagation();
// });
//
if (typeof model.getValue() != 'undefined'){
this.showRemoveButton();
}
result.append(form);
return result;
},
@@ -95,6 +97,15 @@ mindplot.widget.LinkEditor = new Class({
$("#linkFormId").submit();
},
onRemoveClick: function() {
this._model.setValue(null);
this.close();
},
hideRemoveButton:function(){
this.parent();
},
close:function () {
this.parent();
}