

<script type="text/javascript" language="javascript">

	$(document).ready(function () {	
	
		$("#<?php echo$this->field;?>").click(function(){
			var value = $("[name='<?php echo$this->field;?>']").val();
			if( value ){ $( "#<?php echo$this->module_id; ?>" ).load( "<?php echo $this->url(array('controller' => 'admin', 'action' => 'producteditstandardsize'), 'default', true); ?>", {product_id: <?php echo$this->product_id; ?>, module_id: '<?php echo$this->module_id; ?>', add: value}, function(){} );}
		});
	
		$(".<?php echo$this->field;?>_r").click(function(){
			var value = $(this).attr('cmd');
			if( value ) $( "#<?php echo$this->module_id; ?>" ).load( "<?php echo $this->url(array('controller' => 'admin', 'action' => 'producteditstandardsize'), 'default', true); ?>", {product_id: <?php echo$this->product_id; ?>, module_id: '<?php echo$this->module_id; ?>', remove: value}, function(){} );
		});

	
	});

</script>



<div style="background-color:#eee;padding-bottom:5px;border:1px solid #ccc;">
<div class="row">
	<?php foreach ($this->dataTable as $key => $val): ?>
		<div class="col-xs-3 col-sm-3 col-md-3 text-center">
			<div style="margin:5px;padding:5px;border:1px solid #aaa;"><?php echo$val[$this->field];?> <a href="javascript:void(0);" class="<?php echo$this->field;?>_r" cmd="<?php echo$val[$this->field];?>"><i class='fa fa-remove'style="color:red;"></i></a></div>
		</div> 
	<?php endforeach; ?>
</div>
<div class="row">
	<center>
	<input type="number" step="1" min="0" name="<?php echo$this->field;?>" class="form-control" style="width:150px;display:inline;" />
	<a href="javascript:void(0);" class="btn btn-danger btn-sm" id="<?php echo$this->field;?>" ><i class='fa fa-plus'></i></a>
	</center>
</div>
</div>