Dante 11 years ago
parent
commit
fbee610986

+ 1 - 0
changelog.txt

@@ -1,6 +1,7 @@
 LASTEST NOT RELEASED
 ------------------------------
 * PULL REQUEST: #72 *
+* PULL REQUEST: #83 *
 
 V1.33.4
 ------------------------------

+ 76 - 76
dist/css/bootstrap-dialog.css

@@ -1,120 +1,120 @@
 .bootstrap-dialog {
-  /* dialog types */
-  /* dialog sizes */
-  /**
-     * Icon animation
-     * Copied from font-awesome: http://fontawesome.io/
-     **/
-  /** End of icon animation **/
+
 }
 .bootstrap-dialog .modal-header {
-  border-top-left-radius: 4px;
-  border-top-right-radius: 4px;
+    border-top-left-radius: 4px;
+    border-top-right-radius: 4px;
 }
 .bootstrap-dialog .bootstrap-dialog-title {
-  color: #fff;
-  display: inline-block;
+    color: #fff;
+    display: inline-block;
 }
-.bootstrap-dialog .bootstrap-dialog-button-icon {
-  margin-right: 3px;
+.bootstrap-dialog.type-default .bootstrap-dialog-title {
+    color: #333;
+}
+.bootstrap-dialog.size-normal .bootstrap-dialog-title {
+    font-size: 16px;
+}
+.bootstrap-dialog.size-large .bootstrap-dialog-title {
+    font-size: 24px;
 }
 .bootstrap-dialog .bootstrap-dialog-close-button {
-  float: right;
-  filter: alpha(opacity=90);
-  -moz-opacity: 0.9;
-  -khtml-opacity: 0.9;
-  opacity: 0.9;
+    float: right;
+    filter:alpha(opacity=90);
+    -moz-opacity:0.9;
+    -khtml-opacity: 0.9;
+    opacity: 0.9;
+}
+.bootstrap-dialog.size-normal .bootstrap-dialog-close-button {
+    font-size: 20px;
+}
+.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
+    font-size: 30px;
 }
 .bootstrap-dialog .bootstrap-dialog-close-button:hover {
-  cursor: pointer;
-  filter: alpha(opacity=100);
-  -moz-opacity: 1;
-  -khtml-opacity: 1;
-  opacity: 1;
+    cursor: pointer;
+    filter: alpha(opacity=100);
+    -moz-opacity: 1;
+    -khtml-opacity: 1;
+    opacity: 1;
 }
-.bootstrap-dialog.type-default .modal-header {
-  background-color: #fff;
+.bootstrap-dialog.size-normal .bootstrap-dialog-message {
+    font-size: 14px;
 }
-.bootstrap-dialog.type-default .bootstrap-dialog-title {
-  color: #333;
+.bootstrap-dialog.size-large .bootstrap-dialog-message {
+    font-size: 18px;
+}
+.bootstrap-dialog.type-default .modal-header {
+    background-color: #fff;
 }
 .bootstrap-dialog.type-info .modal-header {
-  background-color: #5bc0de;
+    background-color: #5bc0de;
 }
 .bootstrap-dialog.type-primary .modal-header {
-  background-color: #428bca;
+    background-color: #428bca;
 }
 .bootstrap-dialog.type-success .modal-header {
-  background-color: #5cb85c;
+    background-color: #5cb85c;
 }
 .bootstrap-dialog.type-warning .modal-header {
-  background-color: #f0ad4e;
+    background-color: #f0ad4e;
 }
 .bootstrap-dialog.type-danger .modal-header {
-  background-color: #d9534f;
-}
-.bootstrap-dialog.size-normal .bootstrap-dialog-title {
-  font-size: 16px;
-}
-.bootstrap-dialog.size-normal .bootstrap-dialog-close-button {
-  font-size: 20px;
+    background-color: #d9534f;
 }
-.bootstrap-dialog.size-normal .bootstrap-dialog-message {
-  font-size: 14px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-title {
-  font-size: 24px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
-  font-size: 30px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-message {
-  font-size: 18px;
-}
-.bootstrap-dialog .icon-spin {
-  display: inline-block;
-  -moz-animation: spin 2s infinite linear;
-  -o-animation: spin 2s infinite linear;
-  -webkit-animation: spin 2s infinite linear;
-  animation: spin 2s infinite linear;
+.bootstrap-dialog .bootstrap-dialog-button-icon {
+    margin-right: 3px;
+}
+
+/**
+ * Icon animation
+ * Copied from font-awesome: http://fontawesome.io/
+ **/
+.icon-spin {
+    display: inline-block;
+    -moz-animation: spin 2s infinite linear;
+    -o-animation: spin 2s infinite linear;
+    -webkit-animation: spin 2s infinite linear;
+    animation: spin 2s infinite linear;
 }
 @-moz-keyframes spin {
-  0% {
+    0% {
     -moz-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -moz-transform: rotate(359deg);
-  }
+}
 }
 @-webkit-keyframes spin {
-  0% {
+    0% {
     -webkit-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -webkit-transform: rotate(359deg);
-  }
+}
 }
 @-o-keyframes spin {
-  0% {
+    0% {
     -o-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -o-transform: rotate(359deg);
-  }
+}
 }
 @-ms-keyframes spin {
-  0% {
+    0% {
     -ms-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -ms-transform: rotate(359deg);
-  }
+}
 }
 @keyframes spin {
-  0% {
+    0% {
     transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     transform: rotate(359deg);
-  }
 }
+}
+/** End of icon animation **/

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


+ 23 - 21
dist/js/bootstrap-dialog.js

@@ -2,13 +2,13 @@
 
 /* ================================================
  * 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(root, factory) {
@@ -74,6 +74,8 @@
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_SUCCESS] = 'Success';
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_WARNING] = 'Warning';
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DANGER] = 'Danger';
+    BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK';
+    BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel';
 
     BootstrapDialog.SIZE_NORMAL = 'size-normal';
     BootstrapDialog.SIZE_LARGE = 'size-large';
@@ -437,9 +439,9 @@
         },
         /**
          * If there is id provided for a button option, it will be in dialog.indexedButtons list.
-         * 
+         *
          * In that case you can use dialog.getButton(id) to find the button.
-         * 
+         *
          * @param {type} id
          * @returns {undefined}
          */
@@ -602,9 +604,9 @@
         },
         /**
          * Dynamically add extra functions to $button
-         * 
+         *
          * Using '$this' to reference 'this' is just for better readability.
-         * 
+         *
          * @param {type} $button
          * @returns {_L13.BootstrapDialog.prototype}
          */
@@ -676,7 +678,7 @@
         },
         /**
          * Invoke this only after the dialog is realized.
-         * 
+         *
          * @param {type} enable
          * @returns {undefined}
          */
@@ -689,7 +691,7 @@
         },
         /**
          * Invoke this only after the dialog is realized.
-         * 
+         *
          * @returns {undefined}
          */
         updateClosable: function() {
@@ -910,7 +912,7 @@
 
     /**
      * Shortcut function: show
-     * 
+     *
      * @param {type} options
      * @returns the created dialog instance
      */
@@ -920,7 +922,7 @@
 
     /**
      * Alert window
-     * 
+     *
      * @returns the created dialog instance
      */
     BootstrapDialog.alert = function() {
@@ -930,7 +932,7 @@
             title: null,
             message: null,
             closable: true,
-            buttonLabel: 'OK',
+            buttonLabel: Bootstrap.DEFAULT_TEXTS.OK,
             callback: null
         };
 
@@ -940,7 +942,7 @@
             options = $.extend(true, defaultOptions, {
                 message: arguments[0],
                 closable: false,
-                buttonLabel: 'OK',
+                buttonLabel: Bootstrap.DEFAULT_TEXTS.OK,
                 callback: typeof arguments[1] !== 'undefined' ? arguments[1] : null
             });
         }
@@ -969,7 +971,7 @@
 
     /**
      * Confirm window
-     * 
+     *
      * @param {type} message
      * @param {type} callback
      * @returns the created dialog instance
@@ -983,13 +985,13 @@
                 'callback': callback
             },
             buttons: [{
-                    label: 'Cancel',
+                    label: Bootstrap.DEFAULT_TEXTS.CANCEL,
                     action: function(dialog) {
                         typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(false);
                         dialog.close();
                     }
                 }, {
-                    label: 'OK',
+                    label: Bootstrap.DEFAULT_TEXTS.OK,
                     cssClass: 'btn-primary',
                     action: function(dialog) {
                         typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(true);
@@ -1001,7 +1003,7 @@
 
     /**
      * Warning window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1014,7 +1016,7 @@
 
     /**
      * Danger window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1027,7 +1029,7 @@
 
     /**
      * Success window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1040,4 +1042,4 @@
 
     return BootstrapDialog;
 
-}));
+}));

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


+ 76 - 76
examples/assets/bootstrap-dialog/css/bootstrap-dialog.css

@@ -1,120 +1,120 @@
 .bootstrap-dialog {
-  /* dialog types */
-  /* dialog sizes */
-  /**
-     * Icon animation
-     * Copied from font-awesome: http://fontawesome.io/
-     **/
-  /** End of icon animation **/
+
 }
 .bootstrap-dialog .modal-header {
-  border-top-left-radius: 4px;
-  border-top-right-radius: 4px;
+    border-top-left-radius: 4px;
+    border-top-right-radius: 4px;
 }
 .bootstrap-dialog .bootstrap-dialog-title {
-  color: #fff;
-  display: inline-block;
+    color: #fff;
+    display: inline-block;
 }
-.bootstrap-dialog .bootstrap-dialog-button-icon {
-  margin-right: 3px;
+.bootstrap-dialog.type-default .bootstrap-dialog-title {
+    color: #333;
+}
+.bootstrap-dialog.size-normal .bootstrap-dialog-title {
+    font-size: 16px;
+}
+.bootstrap-dialog.size-large .bootstrap-dialog-title {
+    font-size: 24px;
 }
 .bootstrap-dialog .bootstrap-dialog-close-button {
-  float: right;
-  filter: alpha(opacity=90);
-  -moz-opacity: 0.9;
-  -khtml-opacity: 0.9;
-  opacity: 0.9;
+    float: right;
+    filter:alpha(opacity=90);
+    -moz-opacity:0.9;
+    -khtml-opacity: 0.9;
+    opacity: 0.9;
+}
+.bootstrap-dialog.size-normal .bootstrap-dialog-close-button {
+    font-size: 20px;
+}
+.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
+    font-size: 30px;
 }
 .bootstrap-dialog .bootstrap-dialog-close-button:hover {
-  cursor: pointer;
-  filter: alpha(opacity=100);
-  -moz-opacity: 1;
-  -khtml-opacity: 1;
-  opacity: 1;
+    cursor: pointer;
+    filter: alpha(opacity=100);
+    -moz-opacity: 1;
+    -khtml-opacity: 1;
+    opacity: 1;
 }
-.bootstrap-dialog.type-default .modal-header {
-  background-color: #fff;
+.bootstrap-dialog.size-normal .bootstrap-dialog-message {
+    font-size: 14px;
 }
-.bootstrap-dialog.type-default .bootstrap-dialog-title {
-  color: #333;
+.bootstrap-dialog.size-large .bootstrap-dialog-message {
+    font-size: 18px;
+}
+.bootstrap-dialog.type-default .modal-header {
+    background-color: #fff;
 }
 .bootstrap-dialog.type-info .modal-header {
-  background-color: #5bc0de;
+    background-color: #5bc0de;
 }
 .bootstrap-dialog.type-primary .modal-header {
-  background-color: #428bca;
+    background-color: #428bca;
 }
 .bootstrap-dialog.type-success .modal-header {
-  background-color: #5cb85c;
+    background-color: #5cb85c;
 }
 .bootstrap-dialog.type-warning .modal-header {
-  background-color: #f0ad4e;
+    background-color: #f0ad4e;
 }
 .bootstrap-dialog.type-danger .modal-header {
-  background-color: #d9534f;
-}
-.bootstrap-dialog.size-normal .bootstrap-dialog-title {
-  font-size: 16px;
-}
-.bootstrap-dialog.size-normal .bootstrap-dialog-close-button {
-  font-size: 20px;
+    background-color: #d9534f;
 }
-.bootstrap-dialog.size-normal .bootstrap-dialog-message {
-  font-size: 14px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-title {
-  font-size: 24px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-close-button {
-  font-size: 30px;
-}
-.bootstrap-dialog.size-large .bootstrap-dialog-message {
-  font-size: 18px;
-}
-.bootstrap-dialog .icon-spin {
-  display: inline-block;
-  -moz-animation: spin 2s infinite linear;
-  -o-animation: spin 2s infinite linear;
-  -webkit-animation: spin 2s infinite linear;
-  animation: spin 2s infinite linear;
+.bootstrap-dialog .bootstrap-dialog-button-icon {
+    margin-right: 3px;
+}
+
+/**
+ * Icon animation
+ * Copied from font-awesome: http://fontawesome.io/
+ **/
+.icon-spin {
+    display: inline-block;
+    -moz-animation: spin 2s infinite linear;
+    -o-animation: spin 2s infinite linear;
+    -webkit-animation: spin 2s infinite linear;
+    animation: spin 2s infinite linear;
 }
 @-moz-keyframes spin {
-  0% {
+    0% {
     -moz-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -moz-transform: rotate(359deg);
-  }
+}
 }
 @-webkit-keyframes spin {
-  0% {
+    0% {
     -webkit-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -webkit-transform: rotate(359deg);
-  }
+}
 }
 @-o-keyframes spin {
-  0% {
+    0% {
     -o-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -o-transform: rotate(359deg);
-  }
+}
 }
 @-ms-keyframes spin {
-  0% {
+    0% {
     -ms-transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     -ms-transform: rotate(359deg);
-  }
+}
 }
 @keyframes spin {
-  0% {
+    0% {
     transform: rotate(0deg);
-  }
-  100% {
+}
+100% {
     transform: rotate(359deg);
-  }
 }
+}
+/** End of icon animation **/

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


+ 23 - 21
examples/assets/bootstrap-dialog/js/bootstrap-dialog.js

@@ -2,13 +2,13 @@
 
 /* ================================================
  * 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(root, factory) {
@@ -74,6 +74,8 @@
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_SUCCESS] = 'Success';
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_WARNING] = 'Warning';
     BootstrapDialog.DEFAULT_TEXTS[BootstrapDialog.TYPE_DANGER] = 'Danger';
+    BootstrapDialog.DEFAULT_TEXTS['OK'] = 'OK';
+    BootstrapDialog.DEFAULT_TEXTS['CANCEL'] = 'Cancel';
 
     BootstrapDialog.SIZE_NORMAL = 'size-normal';
     BootstrapDialog.SIZE_LARGE = 'size-large';
@@ -437,9 +439,9 @@
         },
         /**
          * If there is id provided for a button option, it will be in dialog.indexedButtons list.
-         * 
+         *
          * In that case you can use dialog.getButton(id) to find the button.
-         * 
+         *
          * @param {type} id
          * @returns {undefined}
          */
@@ -602,9 +604,9 @@
         },
         /**
          * Dynamically add extra functions to $button
-         * 
+         *
          * Using '$this' to reference 'this' is just for better readability.
-         * 
+         *
          * @param {type} $button
          * @returns {_L13.BootstrapDialog.prototype}
          */
@@ -676,7 +678,7 @@
         },
         /**
          * Invoke this only after the dialog is realized.
-         * 
+         *
          * @param {type} enable
          * @returns {undefined}
          */
@@ -689,7 +691,7 @@
         },
         /**
          * Invoke this only after the dialog is realized.
-         * 
+         *
          * @returns {undefined}
          */
         updateClosable: function() {
@@ -910,7 +912,7 @@
 
     /**
      * Shortcut function: show
-     * 
+     *
      * @param {type} options
      * @returns the created dialog instance
      */
@@ -920,7 +922,7 @@
 
     /**
      * Alert window
-     * 
+     *
      * @returns the created dialog instance
      */
     BootstrapDialog.alert = function() {
@@ -930,7 +932,7 @@
             title: null,
             message: null,
             closable: true,
-            buttonLabel: 'OK',
+            buttonLabel: Bootstrap.DEFAULT_TEXTS.OK,
             callback: null
         };
 
@@ -940,7 +942,7 @@
             options = $.extend(true, defaultOptions, {
                 message: arguments[0],
                 closable: false,
-                buttonLabel: 'OK',
+                buttonLabel: Bootstrap.DEFAULT_TEXTS.OK,
                 callback: typeof arguments[1] !== 'undefined' ? arguments[1] : null
             });
         }
@@ -969,7 +971,7 @@
 
     /**
      * Confirm window
-     * 
+     *
      * @param {type} message
      * @param {type} callback
      * @returns the created dialog instance
@@ -983,13 +985,13 @@
                 'callback': callback
             },
             buttons: [{
-                    label: 'Cancel',
+                    label: Bootstrap.DEFAULT_TEXTS.CANCEL,
                     action: function(dialog) {
                         typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(false);
                         dialog.close();
                     }
                 }, {
-                    label: 'OK',
+                    label: Bootstrap.DEFAULT_TEXTS.OK,
                     cssClass: 'btn-primary',
                     action: function(dialog) {
                         typeof dialog.getData('callback') === 'function' && dialog.getData('callback')(true);
@@ -1001,7 +1003,7 @@
 
     /**
      * Warning window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1014,7 +1016,7 @@
 
     /**
      * Danger window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1027,7 +1029,7 @@
 
     /**
      * Success window
-     * 
+     *
      * @param {type} message
      * @returns the created dialog instance
      */
@@ -1040,4 +1042,4 @@
 
     return BootstrapDialog;
 
-}));
+}));

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