{extends file=$smarty.const.SMARTY_LAYOUT_MAIN_GENERAL_PAGINATED_LISTING}

{block name="js" append}
	<script type="text/javascript">
		MVC.scheduleOnLoad(function(){
			MVC.listing.prototype.setDefaultSelectedItemsWithConfirmation = function(element){
				MVC.callbackWithConfirmation(
					"{$_LANG['confirm']}",
					"{$lang['setDefault']['confirmation']}",
					this.backend_callUpdateOperation.bind(this, 'setDefault', {
						'listing[selection][add][]':	MVC.listing.installedHandlers.listing.getItemId(element),
						'listing[selection][clear]' :	'all'
					})
				);
			}
		});

	</script>
{/block}