mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
BootstrapDialog.Request implementation using modal body
This commit is contained in:
parent
2459a14c9b
commit
9855e032ef
@ -2,9 +2,9 @@ BootstrapDialog.Request = new Class({
|
|||||||
|
|
||||||
Extends: BootstrapDialog,
|
Extends: BootstrapDialog,
|
||||||
|
|
||||||
initialize: function(url, requestOptions, options) {
|
initialize: function(url, title, options) {
|
||||||
//this.parent(options);
|
this.parent(title, options);
|
||||||
this.requestOptions = requestOptions || {};
|
this.requestOptions = {};
|
||||||
this.requestOptions.cache = false;
|
this.requestOptions.cache = false;
|
||||||
var me = this;
|
var me = this;
|
||||||
this.requestOptions.fail = function(xhr) {
|
this.requestOptions.fail = function(xhr) {
|
||||||
@ -28,21 +28,15 @@ BootstrapDialog.Request = new Class({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
var request = $('<div></div>');
|
this._native.find('.modal-body').load(url, function () {
|
||||||
request.load(url, function() {
|
me.acceptButton.unbind('click').click(function () {
|
||||||
me._native = $(this).find('.modal');
|
submitDialogForm();
|
||||||
if (!me._native) {
|
});
|
||||||
throw new Error('modal not found');
|
me._native.on('hidden.bs.modal', function () {
|
||||||
} else {
|
$(this).remove();
|
||||||
$(document.body).append(me._native);
|
});
|
||||||
me.show();
|
me.show();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this._native.on('hidden.bs.modal', function () {
|
|
||||||
$(this).remove();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user