Browse Source

Refs #251
Close icon on the top right is configurable

Dante 9 years ago
parent
commit
e8b730ca16
4 changed files with 8 additions and 4 deletions
  1. 1 1
      changelog.txt
  2. 3 1
      dist/js/bootstrap-dialog.js
  3. 1 1
      dist/js/bootstrap-dialog.min.js
  4. 3 1
      src/js/bootstrap-dialog.js

+ 1 - 1
changelog.txt

@@ -1,6 +1,6 @@
 LASTEST NOT RELEASED
 ------------------------------
-NONE
+* Refs #251 Close icon on the top right is configurable *
 
 V1.35.1
 ------------------------------

+ 3 - 1
dist/js/bootstrap-dialog.js

@@ -238,6 +238,7 @@
         closable: true,
         closeByBackdrop: true,
         closeByKeyboard: true,
+        closeIcon: '×',
         spinicon: BootstrapDialog.ICON_SPINNER,
         autodestroy: true,
         draggable: false,
@@ -778,7 +779,8 @@
         createCloseButton: function () {
             var $container = $('<div></div>');
             $container.addClass(this.getNamespace('close-button'));
-            var $icon = $('<button class="close">&times;</button>');
+            var $icon = $('<button class="close"></button>');
+            $icon.append(this.options.closeIcon);
             $container.append($icon);
             $container.on('click', {dialog: this}, function (event) {
                 event.data.dialog.close();

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


+ 3 - 1
src/js/bootstrap-dialog.js

@@ -238,6 +238,7 @@
         closable: true,
         closeByBackdrop: true,
         closeByKeyboard: true,
+        closeIcon: '&#215;',
         spinicon: BootstrapDialog.ICON_SPINNER,
         autodestroy: true,
         draggable: false,
@@ -778,7 +779,8 @@
         createCloseButton: function () {
             var $container = $('<div></div>');
             $container.addClass(this.getNamespace('close-button'));
-            var $icon = $('<button class="close">&times;</button>');
+            var $icon = $('<button class="close"></button>');
+            $icon.append(this.options.closeIcon);
             $container.append($icon);
             $container.on('click', {dialog: this}, function (event) {
                 event.data.dialog.close();