From f9003413fb312f8d1b78a78b1bb56937f422bb63 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 25 Jun 2015 15:35:37 +0200 Subject: [PATCH] Temporary fix for undo/redo button on mobile --- .../files/js/3rdParty/redactor/plugins/wbutton.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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'); }, /** -- 2.20.1