Removed duplicated code block
authorAlexander Ebert <ebert@woltlab.com>
Thu, 15 Feb 2018 14:20:30 +0000 (15:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 15 Feb 2018 14:20:30 +0000 (15:20 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabList.js

index 194d40ddf04f9b17bd1a31acda662a4c31e2a71c..2847d5a733db0c3805b76347136147d669f6c112 100644 (file)
@@ -99,37 +99,6 @@ $.Redactor.prototype.WoltLabList = function() {
                                
                                return nodes;
                        }).bind(this);
-                       
-                       this.list.toggle = (function(type) {
-                               if (this.utils.inBlocks(['table', 'td', 'th', 'tr'])) {
-                                       return;
-                               }
-                               
-                               type = (type === 'orderedlist') ? 'ol' : type;
-                               type = (type === 'unorderedlist') ? 'ul' : type;
-                               
-                               type = type.toLowerCase();
-                               
-                               this.buffer.set();
-                               this.selection.save();
-                               
-                               var nodes = this.list._getBlocks();
-                               var block = this.selection.block();
-                               
-                               // WoltLab modification: the selector matches lists outside the editor
-                               //var $list = $(block).parents('ul, ol').last();
-                               var $list = $(block).parent().closest('ol, ul', this.core.editor()[0]);
-                               // WoltLab modification END
-                               if (nodes.length === 0 && $list.length !== 0) {
-                                       nodes = [$list.get(0)];
-                               }
-                               
-                               nodes = (this.list._isUnformat(type, nodes)) ? this.list._unformat(type, nodes) : this.list._format(type, nodes);
-                               
-                               this.selection.restore();
-                               
-                               return nodes;
-                       }).bind(this);
                }
        };
 };