diff --git a/changelog.txt b/changelog.txt index 16705c671fe..f068d5a85ee 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Version 4.1.5 (2014-08-xx) Fixed bug where empty list elements would result in empty LI elements without it's parent container. Fixed bug where backspace in empty caret formated element could produce an type error exception of Gecko. Fixed bug where lists pasted from word with a custom start index above 9 wouldn't be properly handled. + Fixed so custom images for menubutton/splitbutton can be provided. Patch contributed by Naim Hammadi. Version 4.1.4 (2014-08-21) Added new media_filter_html option to media plugin that blocks any conditional comments, scripts etc within a video element. Added new content_security_policy option allows you to set custom policy for iframe contents. Patch contributed by Francois Chagnon. diff --git a/js/tinymce/classes/ui/MenuButton.js b/js/tinymce/classes/ui/MenuButton.js index d773389f114..34e5275f424 100644 --- a/js/tinymce/classes/ui/MenuButton.js +++ b/js/tinymce/classes/ui/MenuButton.js @@ -147,28 +147,29 @@ define("tinymce/ui/MenuButton", [ * @method renderHtml * @return {String} HTML representing the control. */ - renderHtml: function () { - var self = this, id = self._id, prefix = self.classPrefix; - var icon = self.settings.icon, image; - - image = self.settings.image; - if (image) { - icon = 'none'; - - // Support for [high dpi, low dpi] image sources - if (typeof image != "string") { - image = window.getSelection ? image[0] : image[1]; - } - - image = ' style="background-image: url(\'' + image + '\')"'; - } else { - image = ''; - } - icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; - - self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button'); - - return ( + renderHtml: function () { + var self = this, id = self._id, prefix = self.classPrefix; + var icon = self.settings.icon, image; + + image = self.settings.image; + if (image) { + icon = 'none'; + + // Support for [high dpi, low dpi] image sources + if (typeof image != "string") { + image = window.getSelection ? image[0] : image[1]; + } + + image = ' style="background-image: url(\'' + image + '\')"'; + } else { + image = ''; + } + + icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; + + self.aria('role', self.parent() instanceof MenuBar ? 'menuitem' : 'button'); + + return ( '
' + '' + '
' - ); + ); }, /** diff --git a/js/tinymce/classes/ui/SplitButton.js b/js/tinymce/classes/ui/SplitButton.js index 4ef2f1e0cf6..3085678280e 100644 --- a/js/tinymce/classes/ui/SplitButton.js +++ b/js/tinymce/classes/ui/SplitButton.js @@ -67,25 +67,27 @@ define("tinymce/ui/SplitButton", [ * @method renderHtml * @return {String} HTML representing the control. */ - renderHtml: function () { - var self = this, id = self._id, prefix = self.classPrefix, image; - var icon = self.settings.icon; - - image = self.settings.image; - if (image) { - icon = 'none'; - - // Support for [high dpi, low dpi] image sources - if (typeof image != "string") { - image = window.getSelection ? image[0] : image[1]; - } - - image = ' style="background-image: url(\'' + image + '\')"'; - } else { - image = ''; - } - icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; - return ( + renderHtml: function () { + var self = this, id = self._id, prefix = self.classPrefix, image; + var icon = self.settings.icon; + + image = self.settings.image; + if (image) { + icon = 'none'; + + // Support for [high dpi, low dpi] image sources + if (typeof image != "string") { + image = window.getSelection ? image[0] : image[1]; + } + + image = ' style="background-image: url(\'' + image + '\')"'; + } else { + image = ''; + } + + icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + icon : ''; + + return ( '
' + '' + '
' - ); + ); }, /**