Improved UI/UX for list indent/outdent
authorAlexander Ebert <ebert@woltlab.com>
Sat, 7 Jan 2017 11:18:35 +0000 (12:18 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 7 Jan 2017 11:18:41 +0000 (12:18 +0100)
com.woltlab.wcf/templates/wysiwyg.tpl
wcfsetup/install/files/acp/templates/wysiwyg.tpl
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabButton.js
wcfsetup/install/files/style/ui/redactor.scss
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index e1b9aef2294148f52a6f8039f6294dd4f6ddb911..5b91b76e1ba238a571de4ec7e5a678bb9852f7ae 100644 (file)
@@ -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}',
index e1b9aef2294148f52a6f8039f6294dd4f6ddb911..5b91b76e1ba238a571de4ec7e5a678bb9852f7ae 100644 (file)
@@ -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}',
index 617ffa7c58654a3712612be116626359fa4437cb..2622325489685cf93009ad6f98b2586439b485b0 100644 (file)
@@ -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`
index d1415a933cd6d0c2455a8f609652ed4359c7867b..39ebb683659d01a84d529376f0727529676b1745 100644 (file)
                cursor: default;
                opacity: .6;
                
-               &:hover {
-                       background-color: transparent !important;
+               > a:hover {
+                       background-color: $wcfDropdownBackground !important;
                        color: $wcfDropdownText !important;
+                       cursor: default !important;
                }
        }
 }
index 8bf83ece6be3dd4b87b0e6be56559a7cdfa8d371..4f3155ca70b5cb5d23372904724ad5cb6177e197 100644 (file)
@@ -2440,6 +2440,9 @@ Fehler sind beispielsweise:
                <item name="wcf.editor.link.url"><![CDATA[Link]]></item>
                <item name="wcf.editor.link.text"><![CDATA[Text]]></item>
                
+               <item name="wcf.editor.list.indent"><![CDATA[Einrücken]]></item>
+               <item name="wcf.editor.list.outdent"><![CDATA[Ausrücken]]></item>
+               
                <item name="wcf.editor.quote.author"><![CDATA[Quelle]]></item>
                <item name="wcf.editor.quote.edit"><![CDATA[Zitat bearbeiten]]></item>
                <item name="wcf.editor.quote.title"><![CDATA[{if $author}Zitat von {$author}{else}Zitat{/if}]]></item>
index 4eab1457d640d34bfc53211e2b7d8229ef8266d5..7c9cb6142c125e62d50f77773d04cd9516af940a 100644 (file)
@@ -2396,6 +2396,9 @@ Errors are:
                <item name="wcf.editor.link.url"><![CDATA[Link]]></item>
                <item name="wcf.editor.link.text"><![CDATA[Text]]></item>
                
+               <item name="wcf.editor.list.indent"><![CDATA[Indent]]></item>
+               <item name="wcf.editor.list.outdent"><![CDATA[Outdent]]></item>
+               
                <item name="wcf.editor.quote.author"><![CDATA[Source]]></item>
                <item name="wcf.editor.quote.edit"><![CDATA[Edit Quote]]></item>
                <item name="wcf.editor.quote.title"><![CDATA[{if $author}Quote from {$author}{else}Quote{/if}]]></item>