Added optional offset (defaults to zero)
authorAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 14:44:11 +0000 (15:44 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 16 Mar 2012 14:44:11 +0000 (15:44 +0100)
Closes #529

wcfsetup/install/files/js/WCF.js

index 5fa4f6ada0308a3f8dacda0622317b603827ea75..1a21cfa85a519ced4ddc151a3d493fbabc237989 100644 (file)
@@ -4250,6 +4250,12 @@ WCF.Sortable.List.prototype = {
         */
        _notification: null,
        
+       /**
+        * show order offset
+        * @var integer
+        */
+       _offset: 0,
+       
        /**
         * list of options
         * @var object
@@ -4273,12 +4279,14 @@ WCF.Sortable.List.prototype = {
         * 
         * @param       string          containerID
         * @param       string          className
+        * @param       integer         offset
         * @param       object          options
         */
-       init: function(containerID, className, options) {
+       init: function(containerID, className, offset, options) {
                this._containerID = $.wcfEscapeID(containerID);
                this._container = $('#' + this._containerID);
                this._className = className;
+               this._offset = (offset) ? offset : 0;
                this._proxy = new WCF.Action.Proxy({
                        success: $.proxy(this._success, this)
                });
@@ -4330,6 +4338,7 @@ WCF.Sortable.List.prototype = {
                        className: this._className,
                        parameters: {
                                data: {
+                                       offset: this._offset,
                                        structure: this._structure
                                }
                        }