From: Alexander Ebert Date: Thu, 25 Jun 2015 13:35:37 +0000 (+0200) Subject: Temporary fix for undo/redo button on mobile X-Git-Tag: 2.1.5~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f9003413fb312f8d1b78a78b1bb56937f422bb63;p=GitHub%2FWoltLab%2FWCF.git Temporary fix for undo/redo button on mobile --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js index 7ea3d5e511..0439866292 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js @@ -88,13 +88,16 @@ RedactorPlugins.wbutton = function() { // handle image insert this.button.addCallback(this.button.get('image'), $.proxy(this.wbutton.insertImage, this)); - // handle redo/undo buttons - var $undoButton = this.button.addAfter('html', 'undo', WCF.Language.get('wcf.bbcode.button.undo')); - var $redoButton = this.button.addAfter('undo', 'redo', WCF.Language.get('wcf.bbcode.button.redo')); - this.button.addCallback($undoButton, this.buffer.undo); - this.button.addCallback($redoButton, this.buffer.redo); + // handle redo/undo buttons (for some reason not available on mobile, disabled for now) + if (this.utils.isDesktop()) { + var $undoButton = this.button.addAfter('html', 'undo', WCF.Language.get('wcf.bbcode.button.undo')); + var $redoButton = this.button.addAfter('undo', 'redo', WCF.Language.get('wcf.bbcode.button.redo')); + this.button.addCallback($undoButton, this.buffer.undo); + this.button.addCallback($redoButton, this.buffer.redo); + + $redoButton.parent().addClass('separator'); + } - $redoButton.parent().addClass('separator'); }, /**