<template include="./plugin/hfdr_umbbs/overwrite/view/htm/my.common.template-1.htm">
	
	<slot name="my_body">
		<ul class="list-unstyled threadlist mb-0">
			<?php include _include(APP_PATH.'view/htm/thread_list.inc.htm');?>
		</ul>
		</div>
		
		<?php if($pagination) { ?>
		<div class="card card-site-info border-1">
			<nav class="my-3"><ul class="pagination my-4 justify-content-center"><?php echo $pagination; ?></ul></nav>
			</div>
		<?php } ?>
		
		</div>
	</slot>
	
</template>

<script>
$(function() {
	$(".threadlist .thread").unbind("click");
});

$(document).on('click', '.js-haya-favorite-remove', function() {
	var thiz = $(this);
	var tid = thiz.attr("data-tid");
	var url = '<?php echo url("my-favorite-delete");?>';
	
	$.confirm('<?php echo lang('haya_favorite_add_favorite_confirm_title'); ?>', function() {
		$.xpost(url, {'tid': tid}, function(code, msg){
			if (code == 1) {
				$(".threadlist li[data-tid="+tid+"]").remove();
			} else {
				$.alert(msg);
			}
		});
	}, {'body': '<?php echo lang('haya_favorite_add_favorite_confirm_content'); ?>'});
	
	return false;
});
</script>

<script>
$('a[data-active="my-favorite"]').addClass('active');
</script>

<script>
$('li[data-active="fid-00"]').addClass('active');
</script>

