wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.js
/**
	 * Initialize repeater item depths 
	 * 
	 * Applies a left-margin to repeater items consistent with with value in 
	 * each item's '.InputfieldRepeaterItemDepth input' hidden input. 
	 * 
	 * @param $inputfieldRepeater
	 * 
	 */
Initialize repeater item depths

Applies a left-margin to repeater items consistent with with value in
each item's '.InputfieldRepeaterItemDepth input' hidden input.

@param $inputfieldRepeater
Initialize repeater item depths Applies a left - margin to repeater items consistent with with value in each item ' s ' . InputfieldRepeaterItemDepth input ' hidden input . @param $inputfieldRepeater
function initDepths($inputfieldRepeater) {
		$inputfieldRepeater.find('.InputfieldRepeaterItemDepth').each(function() {
			var $wrap = $(this);
			var $depth = $wrap.find('input');
			var depth = $depth.val();
			var $item = $depth.closest('.InputfieldRepeaterItem');
			var currentLeft = $item.css('margin-left');
			if(currentLeft == 'auto') currentLeft = 0;
			currentLeft = parseInt(currentLeft);
			var targetLeft = depth * depthSize;
			if(targetLeft != currentLeft) {
				$item.css('margin-left', targetLeft + 'px');
			}
		});
		$inputfieldRepeater.children('.InputfieldContent').css('position', 'relative');
	}
function initDepths ( $inputfieldRepeater ) { $inputfieldRepeater . find ( '.InputfieldRepeaterItemDepth' ) . each ( function ( ) { var $wrap = $ ( this ) ; var $depth = $wrap . find ( 'input' ) ; var depth = $depth . val ( ) ; var $item = $depth . closest ( '.InputfieldRepeaterItem' ) ; var currentLeft = $item . css ( 'margin-left' ) ; if ( currentLeft == 'auto' ) currentLeft = 0 ; currentLeft = parseInt ( currentLeft ) ; var targetLeft = depth * depthSize ; if ( targetLeft != currentLeft ) { $item . css ( 'margin-left' , targetLeft + 'px' ) ; } } ) ; $inputfieldRepeater . children ( '.InputfieldContent' ) . css ( 'position' , 'relative' ) ; }
Initialize repeater item depths
Initialize repeater item depths