浏览代码

Improving default configs

Dante 11 年之前
父节点
当前提交
0859f1c540
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      js/bootstrap-dialog.js

+ 7 - 5
js/bootstrap-dialog.js

@@ -14,7 +14,13 @@
     "use strict";
 
     var BootstrapDialog = function(options) {
-        this.defaultOptions = $.extend(true, {}, BootstrapDialog.defaultOptions);
+        this.defaultOptions = $.extend(true, {
+            id: BootstrapDialog.newGuid(),
+            buttons: [],
+            data: {},
+            onshow: null,
+            onhide: null
+        }, BootstrapDialog.defaultOptions);
         this.indexedButtons = {};
         this.registeredButtonHotkeys = {};
         this.draggableData = {
@@ -66,12 +72,8 @@
         title: null,
         message: null,
         nl2br: true,
-        buttons: [],
         closable: true,
         spinicon: BootstrapDialog.ICON_SPINNER,
-        data: {},
-        onshow: null,
-        onhide: null,
         autodestroy: true,
         draggable: false
     };