Browse Source

Support bootstrap v3.3.4

Dante 10 years ago
parent
commit
9b7745e33f

+ 1 - 1
bower.json

@@ -1,7 +1,7 @@
 {
     "name": "bootstrap3-dialog",
     "description": "Make use of Bootstrap Modal more monkey-friendly. http://nakupanda.github.io/bootstrap3-dialog/",
-    "version": "1.34.2",
+    "version": "1.34.3",
     "keywords": [
         "css",
         "js",

+ 5 - 1
changelog.txt

@@ -1,8 +1,12 @@
 LASTEST NOT RELEASED
 ------------------------------
+NONE
+
+V1.34.3
+------------------------------
 * Fixed #125, a bug that dialog footer won't be shown if it was hidden by a no button realization. *
 * Refs #126. Adding a data 'button' to the created button. Passing original event object to button callback action(dialog, event). *
-
+* Support Bootstrap v3.3.4
 
 V1.34.2
 ------------------------------

+ 5 - 7
dist/js/bootstrap-dialog.js

@@ -48,8 +48,10 @@
             version = 'v3.1';
         } else if (/3\.2\.\d+/.test($.fn.modal.Constructor.VERSION)) {
             version = 'v3.2';
+        } else if (/3\.3\.[1,2]/.test($.fn.modal.Constructor.VERSION)) {
+            version = 'v3.3';  // v3.3.1, v3.3.2
         } else {
-            version = 'v3.3';  // v3.3+
+            version = 'v3.3.4';
         }
 
         return version;
@@ -136,6 +138,7 @@
             }, this));
         }
     };
+    BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.3.4'] = $.extend({}, BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.3']);
     BootstrapDialogModal.prototype = {
         constructor: BootstrapDialogModal,
         /**
@@ -189,14 +192,12 @@
      *  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';
@@ -207,18 +208,15 @@
     BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK';
     BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel';
     BootstrapDialog.DEFAULT_TEXTS['CONFIRM'] = 'Confirmation';
-
     BootstrapDialog.SIZE_NORMAL = 'size-normal';
     BootstrapDialog.SIZE_SMALL = 'size-small';
     BootstrapDialog.SIZE_WIDE = 'size-wide';    // size-wide is equal to modal-lg
     BootstrapDialog.SIZE_LARGE = 'size-large';
-
     BootstrapDialog.BUTTON_SIZES = {};
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_NORMAL] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_SMALL] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_WIDE] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_LARGE] = 'btn-lg';
-
     BootstrapDialog.ICON_SPINNER = 'glyphicon glyphicon-asterisk';
 
     /**
@@ -308,7 +306,6 @@
             !this.isRealized() && this.realize();
             this.getModal().modal('show');
             this.updateZIndex();
-            this.setOpened(true);
 
             return this;
         }
@@ -319,6 +316,7 @@
         open: BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']['open']
     };
     BootstrapDialog.METHODS_TO_OVERRIDE['v3.3'] = {};
+    BootstrapDialog.METHODS_TO_OVERRIDE['v3.3.4'] = $.extend({}, BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']);
     BootstrapDialog.prototype = {
         constructor: BootstrapDialog,
         initOptions: function(options) {

File diff suppressed because it is too large
+ 1 - 1
dist/js/bootstrap-dialog.min.js


+ 5 - 7
examples/assets/bootstrap-dialog/js/bootstrap-dialog.js

@@ -48,8 +48,10 @@
             version = 'v3.1';
         } else if (/3\.2\.\d+/.test($.fn.modal.Constructor.VERSION)) {
             version = 'v3.2';
+        } else if (/3\.3\.[1,2]/.test($.fn.modal.Constructor.VERSION)) {
+            version = 'v3.3';  // v3.3.1, v3.3.2
         } else {
-            version = 'v3.3';  // v3.3+
+            version = 'v3.3.4';
         }
 
         return version;
@@ -136,6 +138,7 @@
             }, this));
         }
     };
+    BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.3.4'] = $.extend({}, BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.3']);
     BootstrapDialogModal.prototype = {
         constructor: BootstrapDialogModal,
         /**
@@ -189,14 +192,12 @@
      *  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';
@@ -207,18 +208,15 @@
     BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK';
     BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel';
     BootstrapDialog.DEFAULT_TEXTS['CONFIRM'] = 'Confirmation';
-
     BootstrapDialog.SIZE_NORMAL = 'size-normal';
     BootstrapDialog.SIZE_SMALL = 'size-small';
     BootstrapDialog.SIZE_WIDE = 'size-wide';    // size-wide is equal to modal-lg
     BootstrapDialog.SIZE_LARGE = 'size-large';
-
     BootstrapDialog.BUTTON_SIZES = {};
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_NORMAL] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_SMALL] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_WIDE] = '';
     BootstrapDialog.BUTTON_SIZES[BootstrapDialog.SIZE_LARGE] = 'btn-lg';
-
     BootstrapDialog.ICON_SPINNER = 'glyphicon glyphicon-asterisk';
 
     /**
@@ -308,7 +306,6 @@
             !this.isRealized() && this.realize();
             this.getModal().modal('show');
             this.updateZIndex();
-            this.setOpened(true);
 
             return this;
         }
@@ -319,6 +316,7 @@
         open: BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']['open']
     };
     BootstrapDialog.METHODS_TO_OVERRIDE['v3.3'] = {};
+    BootstrapDialog.METHODS_TO_OVERRIDE['v3.3.4'] = $.extend({}, BootstrapDialog.METHODS_TO_OVERRIDE['v3.1']);
     BootstrapDialog.prototype = {
         constructor: BootstrapDialog,
         initOptions: function(options) {

File diff suppressed because it is too large
+ 1 - 1
examples/assets/bootstrap-dialog/js/bootstrap-dialog.min.js


+ 1 - 5
examples/index.html

@@ -2,15 +2,11 @@
 <html>
 <head>
 <script src="assets/jquery/jquery-1.10.2.min.js"></script>
-<!--
 <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
 <script src="assets/bootstrap/js/bootstrap.min.js"></script>
--->
-<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
-<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
 <script src="assets/prettify/run_prettify.js"></script>
 <link href="assets/bootstrap-dialog/css/bootstrap-dialog.min.css" rel="stylesheet" type="text/css" />
-<script src="../src/js/bootstrap-dialog.js"></script>
+<script src="assets/bootstrap-dialog/js/bootstrap-dialog.min.js"></script>
 <meta charset="utf-8" />
 <title>BootstrapDialog examples</title>
 <style>

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "bootstrap3-dialog",
-  "version": "1.34.2",
+  "version": "1.34.3",
   "description": "Make use of Bootstrap Modal more monkey-friendly.",
   "private": true,
   "directories": {