Nakupanda BootstrapDialog MultiModal
by mreis1
HTML
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
JavaScript
/* ================================================
* Make use of Bootstrap's modal more monkey-friendly.
*
* For Bootstrap 3.
*
* javanoob@hotmail.com
*
* https://github.com/nakupanda/bootstrap3-dialog
*
* Licensed under The MIT License.
* ================================================ */
(function($) {
"use strict";
var BootstrapDialog = function(options) {
this.defaultOptions = {
id: BootstrapDialog.newGuid(),
type: BootstrapDialog.TYPE_PRIMARY,
size: BootstrapDialog.SIZE_NORMAL,
cssClass: '',
title: null,
message: null,
buttons: [],
closable: true,
spinicon: BootstrapDialog.ICON_SPINNER,
data: {},
onshow: null,
onhide: null,
autodestroy: true,
draggable: false
};
this.indexedButtons = {};
this.registeredButtonHotkeys = {};
this.draggableData = {
isMouseDown: false,
mouseOffset: {}
};
this.realized = false;
this.opened = false;
this.initOptions(options);
this.holdThisInstance();
};
/**
* Some constants.
*/
BootstrapDialog.NAMESPACE = 'bootstrap-dialog';
BootstrapDialog.TYPE_DEFAULT = 'type-default';
BootstrapDialog.TYPE_INFO = 'type-info';
BootstrapDialog.TYPE_PRIMARY = 'type-primary';
BootstrapDialog.TYPE_SUCCESS = 'type-success';
BootstrapDialog.TYPE_WARNING = 'type-warning';
BootstrapDialog.TYPE_DANGER = 'type-danger';
BootstrapDialog.DEFAULT_TEXTS = {};
BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DEFAULT] = 'Information';
BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_INFO] = 'Information';
BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_PRIMARY] = 'Information';
BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_SUCCESS] = 'Success';
...