Fixed sortables
authorAlexander Ebert <ebert@woltlab.com>
Wed, 28 Mar 2012 17:12:54 +0000 (19:12 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 28 Mar 2012 17:12:54 +0000 (19:12 +0200)
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/bootstrap.less
wcfsetup/install/files/style/sortable.less [new file with mode: 0644]
wcfsetup/install/files/style/tabular.less

index d2840584352b6443878815b577dacab492124125..41000054b06960343ecfc26de7781f0786aaa8c4 100644 (file)
@@ -2947,7 +2947,7 @@ WCF.Collapsible.Remote = Class.extend({
         */
        _createButton: function(containerID, buttonContainer) {
                var $isOpen = this._containers[containerID].data('isOpen');
-               var $button = $('<a class="wcf-containerIcon jsTooltip" title="'+WCF.Language.get('wcf.global.button.collapsible')+'"><img src="' + WCF.Icon.get('wcf.icon.' + ($isOpen ? 'opened' : 'closed')) + '" alt="" /></a>').prependTo(buttonContainer);
+               var $button = $('<a class="icon16 jsTooltip" title="'+WCF.Language.get('wcf.global.button.collapsible')+'"><img src="' + WCF.Icon.get('wcf.icon.' + ($isOpen ? 'opened' : 'closed')) + '" alt="" /></a>').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.
         * 
index 1f31b5de055a0c2e4e102efbe6c81cb5487a127f..6ef605af12492a27717ca1bf9276273df77d39ac 100644 (file)
@@ -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 (file)
index 0000000..bb5d194
--- /dev/null
@@ -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
index b2e9276cd6b59fd9f5ea03f33658e1428d33829c..19a778840d8ce373f4f21d7e1c03860b592e8f4f 100644 (file)
        .statusIcons li {
                display: inline-block;
        }
+       
+       img {
+               cursor: pointer;
+       }
 }
\ No newline at end of file