From: Alexander Ebert Date: Sat, 7 Jan 2017 11:18:35 +0000 (+0100) Subject: Improved UI/UX for list indent/outdent X-Git-Tag: 3.0.0~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de61bfd1f6b0ef046f893b7e1cdabdf89e4c6ebc;p=GitHub%2FWoltLab%2FWCF.git Improved UI/UX for list indent/outdent --- diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index e1b9aef229..5b91b76e1b 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -87,6 +87,9 @@ 'wcf.editor.link.url': '{lang}wcf.editor.link.url{/lang}', 'wcf.editor.link.text': '{lang}wcf.editor.link.text{/lang}', + 'wcf.editor.list.indent': '{lang}wcf.editor.list.indent{/lang}', + 'wcf.editor.list.outdent': '{lang}wcf.editor.list.outdent{/lang}', + 'wcf.editor.quote.author': '{lang}wcf.editor.quote.author{/lang}', 'wcf.editor.quote.edit': '{lang}wcf.editor.quote.edit{/lang}', 'wcf.editor.quote.title': '{lang __literal=true}wcf.editor.quote.title{/lang}', diff --git a/wcfsetup/install/files/acp/templates/wysiwyg.tpl b/wcfsetup/install/files/acp/templates/wysiwyg.tpl index e1b9aef229..5b91b76e1b 100644 --- a/wcfsetup/install/files/acp/templates/wysiwyg.tpl +++ b/wcfsetup/install/files/acp/templates/wysiwyg.tpl @@ -87,6 +87,9 @@ 'wcf.editor.link.url': '{lang}wcf.editor.link.url{/lang}', 'wcf.editor.link.text': '{lang}wcf.editor.link.text{/lang}', + 'wcf.editor.list.indent': '{lang}wcf.editor.list.indent{/lang}', + 'wcf.editor.list.outdent': '{lang}wcf.editor.list.outdent{/lang}', + 'wcf.editor.quote.author': '{lang}wcf.editor.quote.author{/lang}', 'wcf.editor.quote.edit': '{lang}wcf.editor.quote.edit{/lang}', 'wcf.editor.quote.title': '{lang __literal=true}wcf.editor.quote.title{/lang}', diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js index 617ffa7c58..2622325489 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js @@ -63,10 +63,18 @@ $.Redactor.prototype.WoltLabButton = function() { if (!button[0]) { throw new Error("Missing button element for '" + buttonName + "'."); } + // set title //noinspection JSUnresolvedVariable elAttr(button[0], 'title', buttonData.title); button[0].classList.add('jsTooltip'); + + // update dropdown label for list + if (buttonName == 'lists') { + var dropdown = button.data('dropdown'); + elBySel('.redactor-dropdown-outdent span', dropdown[0]).textContent = WCF.Language.get('wcf.editor.list.outdent'); + elBySel('.redactor-dropdown-indent span', dropdown[0]).textContent = WCF.Language.get('wcf.editor.list.indent'); + } } // enforce button order as provided with `opts.buttons` diff --git a/wcfsetup/install/files/style/ui/redactor.scss b/wcfsetup/install/files/style/ui/redactor.scss index d1415a933c..39ebb68365 100644 --- a/wcfsetup/install/files/style/ui/redactor.scss +++ b/wcfsetup/install/files/style/ui/redactor.scss @@ -135,9 +135,10 @@ cursor: default; opacity: .6; - &:hover { - background-color: transparent !important; + > a:hover { + background-color: $wcfDropdownBackground !important; color: $wcfDropdownText !important; + cursor: default !important; } } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 8bf83ece6b..4f3155ca70 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2440,6 +2440,9 @@ Fehler sind beispielsweise: + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 4eab1457d6..7c9cb6142c 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2396,6 +2396,9 @@ Errors are: + + +