From d5a0a8fffb82357b613b76e916ff5b68b3f27a28 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 8 Oct 2016 13:02:27 +0200 Subject: [PATCH] Fixed sorting on mobile devices --- wcfsetup/install/files/acp/templates/smileyList.tpl | 10 +++++++++- wcfsetup/install/files/js/WCF.Poll.js | 12 +++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/smileyList.tpl b/wcfsetup/install/files/acp/templates/smileyList.tpl index c101ad73fb..7d346963a2 100644 --- a/wcfsetup/install/files/acp/templates/smileyList.tpl +++ b/wcfsetup/install/files/acp/templates/smileyList.tpl @@ -2,9 +2,16 @@ {if $objects|count} {/if} @@ -48,6 +55,7 @@ {@$smiley->getHtml()} {lang}{$smiley->smileyTitle}{/lang} {$smiley->smileyCode}{foreach from=$smiley->getAliases() item='alias'} {$alias}{/foreach} + diff --git a/wcfsetup/install/files/js/WCF.Poll.js b/wcfsetup/install/files/js/WCF.Poll.js index b4e354300f..a35006c162 100644 --- a/wcfsetup/install/files/js/WCF.Poll.js +++ b/wcfsetup/install/files/js/WCF.Poll.js @@ -73,9 +73,14 @@ WCF.Poll.Management = Class.extend({ } // init sorting - new WCF.Sortable.List(containerID, '', undefined, { - toleranceElement: '> div' - }, true); + require(['WoltLabSuite/Core/Ui/Sortable/List'], function (UiSortableList) { + new UiSortableList({ + containerId: containerID, + options: { + toleranceElement: '> div' + } + }); + }); }, /** @@ -115,6 +120,7 @@ WCF.Poll.Management = Class.extend({ // insert buttons var $container = $('
').appendTo($listItem); + $('').appendTo($container); $('').click($.proxy(this._addOption, this)).appendTo($container); $('').click($.proxy(this._removeOption, this)).appendTo($container); -- 2.20.1