mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
BootstrapDialog improvements and design
This commit is contained in:
parent
616b782c5d
commit
c78ae247f4
@ -79,15 +79,12 @@ var BootstrapDialog = new Class({
|
||||
},
|
||||
|
||||
onAcceptClick: function(event) {
|
||||
//this method should be abstract
|
||||
throw "Unsupported operation";
|
||||
},
|
||||
|
||||
onDialogShown: function() {
|
||||
|
||||
},
|
||||
onDialogShown: function() {},
|
||||
onRemoveClick: function(event) {
|
||||
event.data.model.setValue(null);
|
||||
event.data.dialog.close();
|
||||
throw "Unsupported operation";
|
||||
},
|
||||
|
||||
show: function () {
|
||||
@ -95,8 +92,9 @@ var BootstrapDialog = new Class({
|
||||
},
|
||||
|
||||
setContent: function(content) {
|
||||
// faltaria remover body previo
|
||||
this._native.find('.modal-body').append(content);
|
||||
var modalBody = this._native.find('.modal-body');
|
||||
modalBody.empty();
|
||||
modalBody.append(content);
|
||||
},
|
||||
|
||||
css: function(options){
|
||||
@ -114,9 +112,5 @@ var BootstrapDialog = new Class({
|
||||
|
||||
cleanError: function(){
|
||||
this._native.find('.alert-danger').hide();
|
||||
},
|
||||
|
||||
showRemoveButton: function(){
|
||||
this.removeButton.show();
|
||||
}
|
||||
});
|
||||
|
@ -26,7 +26,7 @@ mindplot.widget.LinkEditor = new Class({
|
||||
cancelButton: true,
|
||||
closeButton: true,
|
||||
acceptButton: true,
|
||||
removeButton: true,
|
||||
removeButton: typeof model.getValue() != 'undefined',
|
||||
errorMessage: true,
|
||||
onRemoveClickData: {model: this._model}
|
||||
});
|
||||
@ -97,10 +97,6 @@ mindplot.widget.LinkEditor = new Class({
|
||||
}
|
||||
);
|
||||
|
||||
if (typeof model.getValue() != 'undefined'){
|
||||
this.showRemoveButton();
|
||||
}
|
||||
|
||||
result.append(this.form);
|
||||
return result;
|
||||
},
|
||||
|
@ -26,7 +26,7 @@ mindplot.widget.NoteEditor = new Class({
|
||||
cancelButton: true,
|
||||
closeButton: true,
|
||||
acceptButton: true,
|
||||
removeButton: true,
|
||||
removeButton: typeof model.getValue() != 'undefined',
|
||||
onRemoveClickData: {model: this._model}
|
||||
});
|
||||
this.css({margin:"150px auto"});
|
||||
@ -72,9 +72,6 @@ mindplot.widget.NoteEditor = new Class({
|
||||
});
|
||||
});
|
||||
|
||||
if (typeof model.getValue() != 'undefined'){
|
||||
this.showRemoveButton();
|
||||
}
|
||||
result.append(form);
|
||||
return result;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user