From: Alexander Ebert Date: Wed, 28 Mar 2012 17:12:54 +0000 (+0200) Subject: Fixed sortables X-Git-Tag: 2.0.0_Beta_1~1189^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d6b3f29a7abfff9da4d09e996a77a56bf8a4190;p=GitHub%2FWoltLab%2FWCF.git Fixed sortables --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index d284058435..41000054b0 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2947,7 +2947,7 @@ WCF.Collapsible.Remote = Class.extend({ */ _createButton: function(containerID, buttonContainer) { var $isOpen = this._containers[containerID].data('isOpen'); - var $button = $('').prependTo(buttonContainer); + var $button = $('').prependTo(buttonContainer); $button.data('containerID', containerID).click($.proxy(this._toggleContainer, this)); return $button; @@ -4716,21 +4716,20 @@ WCF.Sortable.List = Class.extend({ // init sortable this._options = $.extend(true, { axis: 'y', - connectWith: '#' + this._containerID * ' .wcf-sortableList', - disableNesting: 'wcf-sortableNoNesting', - errorClass: 'wcf-sortableInvalidTarget', + connectWith: '#' + this._containerID * ' .sortableList', + disableNesting: 'sortableNoNesting', + errorClass: 'sortableInvalidTarget', forcePlaceholderSize: true, helper: 'clone', - items: 'li:not(.wcf-sortableNoSorting)', + items: 'li:not(.sortableNoSorting)', opacity: .6, - placeholder: 'wcf-badgeYellow', + placeholder: 'sortablePlaceholder', tolerance: 'pointer', toleranceElement: '> span' }, options || { }); - $('#' + this._containerID + ' > .wcf-sortableList').wcfNestedSortable(this._options); + $('#' + this._containerID + ' > .sortableList').wcfNestedSortable(this._options); - this._container.find('.wcf-formSubmit > button[data-type="submit"]').click($.proxy(this._submit, this)); - this._container.find('.wcf-formSubmit > button[data-type="reset"]').click($.proxy(this._reset, this)); + this._container.find('.formSubmit > button[data-type="submit"]').click($.proxy(this._submit, this)); }, /** @@ -4738,7 +4737,7 @@ WCF.Sortable.List = Class.extend({ */ _submit: function() { // build structure - this._container.find('.wcf-sortableList').each($.proxy(function(index, list) { + this._container.find('.sortableList').each($.proxy(function(index, list) { var $list = $(list); var $parentID = $list.data('objectID'); @@ -4767,13 +4766,6 @@ WCF.Sortable.List = Class.extend({ this._proxy.sendRequest(); }, - /** - * Reloads current page. - */ - _reset: function() { - window.location.reload(true); - }, - /** * Shows notification upon success. * diff --git a/wcfsetup/install/files/style/bootstrap.less b/wcfsetup/install/files/style/bootstrap.less index 1f31b5de05..6ef605af12 100644 --- a/wcfsetup/install/files/style/bootstrap.less +++ b/wcfsetup/install/files/style/bootstrap.less @@ -13,6 +13,7 @@ @import "footer.less"; @import "dropdown.less"; @import "badge.less"; +@import "sortable.less"; @import "tabular.less"; @import "inputs.less"; diff --git a/wcfsetup/install/files/style/sortable.less b/wcfsetup/install/files/style/sortable.less new file mode 100644 index 0000000000..bb5d194ce0 --- /dev/null +++ b/wcfsetup/install/files/style/sortable.less @@ -0,0 +1,30 @@ +.sortableListContainer .sortablePlaceholder { + background-color: @warningBackgroundColor; + border: 1px solid @warningBorderColor; + border-radius: 5px; + color: @warningColor; + margin: 3px 0; + padding: 4px; +} + +.sortablePlaceholder.sortableInvalidTarget { + background-color: @errorBackgroundColor; + border: 1px solid @errorBorderColor; + color: @errorColor; +} + +.sortableList { + list-style-position: outside; + list-style-type: decimal; + margin-left: 21px; +} + +.sortableNode { + cursor: move; +} + +.sortableNodeLabel { + border-bottom: 1px solid rgba(216, 231, 245, 1); + padding: 7px 7px 11px 0; + display: block; +} \ No newline at end of file diff --git a/wcfsetup/install/files/style/tabular.less b/wcfsetup/install/files/style/tabular.less index b2e9276cd6..19a778840d 100644 --- a/wcfsetup/install/files/style/tabular.less +++ b/wcfsetup/install/files/style/tabular.less @@ -195,4 +195,8 @@ .statusIcons li { display: inline-block; } + + img { + cursor: pointer; + } } \ No newline at end of file