* @param string className
* @param integer offset
* @param object options
+ * @param boolean isSimpleSorting
*/
- init: function(containerID, className, offset, options) {
+ init: function(containerID, className, offset, options, isSimpleSorting) {
this._containerID = $.wcfEscapeID(containerID);
this._container = $('#' + this._containerID);
this._className = className;
// init sortable
this._options = $.extend(true, {
axis: 'y',
- connectWith: '#' + this._containerID * ' .sortableList',
+ connectWith: '#' + this._containerID + ' .sortableList',
disableNesting: 'sortableNoNesting',
errorClass: 'sortableInvalidTarget',
forcePlaceholderSize: true,
tolerance: 'pointer',
toleranceElement: '> span'
}, options || { });
- $('#' + this._containerID + ' > .sortableList').wcfNestedSortable(this._options);
+
+ if (isSimpleSorting) {
+ $('#' + this._containerID + ' .sortableList').sortable(this._options);
+ }
+ else {
+ $('#' + this._containerID + ' > .sortableList').wcfNestedSortable(this._options);
+ }
this._container.find('.formSubmit > button[data-type="submit"]').click($.proxy(this._submit, this));
},
background-color: @wcfWarningBackgroundColor;
border: 1px solid @wcfWarningBackgroundColor2;
color: @wcfWarningColor;
- margin: 3px 0;
- padding: 4px;
+ margin: @wcfGapTiny 0;
+ padding: @wcfGapTiny;
.borderRadius();
}
.sortableList {
list-style-position: outside;
list-style-type: decimal;
- margin-left: 21px;
+ margin-left: @wcfGapLarge;
}
.sortableNode {
}
.sortableNodeLabel {
- border-bottom: 1px solid rgba(216, 231, 245, 1); /* todo */
- padding: 7px 7px 11px 0;
+ padding: @wcfGapSmall @wcfGapSmall @wcfGapSmall 0;
display: block;
+}
+
+.sortableList:not(.simpleSortableList) .sortableNodeLabel {
+ border-bottom: 1px solid rgba(216, 231, 245, 1); /* todo */
+ padding-bottom: @wcfGapMedium;
+}
+
+.simpleSortableList {
+ min-height: @wcfGapLarge;
}
\ No newline at end of file