mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
add BootstrapDialog
This commit is contained in:
parent
de47b638ac
commit
6a8e087c6d
@ -0,0 +1,36 @@
|
||||
var BootstrapDialog = new Class({
|
||||
|
||||
initialize: function () {
|
||||
this.content = $('<div></div>');
|
||||
},
|
||||
|
||||
|
||||
show: function (title) {
|
||||
$assert(title, "message can not be null");
|
||||
|
||||
var modalDialog = $('<div class="modal fade">' +
|
||||
'<div class="modal-dialog">' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header">' +
|
||||
'<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>' +
|
||||
'<h2 class="modal-title">' + title + '</h2>' +
|
||||
'</div>' +
|
||||
'<div class="modal-body">' +
|
||||
this.content.html() +
|
||||
'</div>' +
|
||||
|
||||
'<div class="modal-footer">' +
|
||||
'<button type="button" class="btn btn-primary">Accept</button>' +
|
||||
'<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>');
|
||||
|
||||
modalDialog.modal();
|
||||
},
|
||||
|
||||
appendToContent:function (content){
|
||||
this.content.append(content);
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user