1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 07:47:00 +02:00

Minor adjustment to improve repeater depth drag behavior in AdminThemeReno. Still not there yet, but this adjustment improves it a little bit. Works much better in AdminThemeDefault for some reason.

This commit is contained in:
Ryan Cramer
2016-12-07 15:24:42 -05:00
parent c44329817c
commit d92674fd4a
2 changed files with 2 additions and 10 deletions

View File

@@ -386,7 +386,7 @@ function InputfieldRepeaterInit($this) {
if(!lastLeft) lastLeft = 0;
var left = lastLeft + ui.position.left;
left -= InputfieldRepeaterDepthSize / 2;
if(left > 10 && left < InputfieldRepeaterDepthSize) left = InputfieldRepeaterDepthSize;
if(left > 25 && left < InputfieldRepeaterDepthSize) left = InputfieldRepeaterDepthSize;
var depth = Math.round(left / InputfieldRepeaterDepthSize);
if(depth < 1) depth = 0;
if(depth > maxDepth) depth = maxDepth;
@@ -437,14 +437,6 @@ function InputfieldRepeaterInit($this) {
$addItem.css('display', 'block');
//$addItem.find('.InputfieldRepeaterTrash').click(InputfieldRepeaterDeleteClick);
InputfieldRepeaterAdjustLabel($addItem, true);
/*
$nestedItems = $addItem.find('.InputfieldRepeater').find('.InputfieldRepeaterItem');
if($nestedItems.length) {
$nestedItems.each(function() {
InputfieldRepeaterAdjustLabel($(this));
});
}
*/
$addLink.trigger('repeateradd', [ $addItem ]);
}

File diff suppressed because one or more lines are too long