var BootstrapDialog = new Class({ Implements: Options, options: { cancelButton: false, closeButton: false, acceptButton: true, removeButton:false, errorMessage: false, onEventData:{} }, initialize: function (title, options) { this.setOptions(options); this.options.onEventData.dialog = this; this._native = $('').append(''); var content = $(''); var header = this._buildHeader(title); if (header) { content.append(header); } var body = $(''); if(this.options.errorMessage){ var error = $('
'); error.hide(); body.append(error); } content.append(body); var footer = this._buildFooter(); if (footer) { content.append(footer); } this._native.find(".modal-dialog").append(content); this._native.on('hidden.bs.modal', function() { $(this).remove(); }); this._native.on('shown.bs.modal', this.onDialogShown); }, _buildFooter: function() { var footer = null; if (this.options.acceptButton || this.options.removeButton || this.options.cancelButton) { footer = $('