<{if $xoops_isadmin}>
<div id="blocksadmin">
<div title="<{$smarty.const.THEME_BLOCKSADMIN01A}>" id="adminimg01" class="adminimgid<{$block.id}>"></div>
<div title="<{$smarty.const.THEME_BLOCKSADMIN01B}>" id="adminimg01a" class="adminimgaid<{$block.id}>"></div>

<div id="adminimgbox" class="adminimgbox<{$block.id}>">
<ul>
<li><div id="adminimg"><a title="<{$smarty.const.THEME_BLOCKSADMIN02}>" href="<{xoAppUrl}>modules/system/admin.php?fct=blocksadmin&op=edit&bid=<{$block.id}>" target="_blank"><i class="fa-solid fa-pen"></i></a></div></li>

<li><div id="adminimg"><a title="<{$smarty.const.THEME_BLOCKSADMIN03}>"  href="<{xoAppUrl}>modules/system/admin.php?fct=blocksadmin&op=clone&bid=<{$block.id}>" target="_blank"><i class="fa-solid fa-copy"></i></a></div></li>

<{if $block.module &&  $block.module neq 'system'}>
<li><div id="adminimg"><a title="<{$smarty.const.THEME_BLOCKSADMIN04}>" href="<{xoAppUrl}>modules/<{$block.module}>/admin/index.php" target="_blank"><i class="fa-solid fa-gear"></i></a></div></li>
<{elseif $block.module neq 'system'}>
<li><div id="adminimg"><a title="<{$smarty.const.THEME_BLOCKSADMIN05}>" href="<{xoAppUrl}>modules/system/admin.php?fct=blocksadmin&op=delete&bid=<{$block.id}>" target="_blank"><i class="fa-solid fa-trash-can"></i></a></div></li>
<{/if}>

<{if $block.title|truncate:7:"":true eq $smarty.const.THEME_NOBOX}>
<li><div id="adminimg"><a class='blockseach' id='blocksoperating<{$block.id}>' name='<{$block.id}>,1,<{$block.title}>' title="<{$smarty.const.THEME_BLOCKSADMIN07}>"  href="javascript:void(0);' onclick='return false;" ><i class="fa-regular fa-square-check"></i></a></div></li>
<{else}>
<li><div id="adminimg"><a class='blockseach' id='blocksoperating<{$block.id}>' name='<{$block.id}>,0,<{$block.title}>' title="<{$smarty.const.THEME_BLOCKSADMIN06}>"  href="javascript:void(0);' onclick='return false;" ><i class="fa-solid fa-circle-xmark"></i></a></div></li>
<{/if}>
<li><div id="adminimg"><a  id='blockicon<{$block.id}>' name='' title="<{$smarty.const.THEME_BLOCKSADMIN08}>"  href="javascript:void(0);' onclick='return false;" ><i class="fa-solid fa-image"></i></a></div></li>
</ul>


</div>
</div>
<div style="clear: both;"></div>



<script type="text/javascript">
$(document).ready(function(){
  $(".adminimgid<{$block.id}>").click(function(){
  $('.adminimgid<{$block.id}>').toggleClass('adminimg-transition');	
  $(".adminimgbox<{$block.id}>").css({"animation-name":"slidein","opacity":"0.9","display":"block"}); 
  });
  $(".adminimgaid<{$block.id}>").click(function(){
  $('.adminimgid<{$block.id}>').toggleClass('adminimg-transition');
  $(".adminimgbox<{$block.id}>").css("display", "none");
  });


$("#blockicon<{$block.id}>").click(function(){

swal({
  title: "<{$smarty.const.THEME_BLOCKSADMIN09}>",
  text: "<{$smarty.const.THEME_BLOCKSADMIN10}>",
  type: "input",
  showCancelButton: true,
  closeOnConfirm: false,
  animation: "slide-from-top",
  inputPlaceholder: "<{$smarty.const.THEME_BLOCKSADMIN11}>"
},
function(inputValue){
  if (inputValue === false) return false;  
  if (inputValue === "") {
    swal.showInputError("<{$smarty.const.THEME_BLOCKSADMIN12}>");
    return false
  }  



$.ajax({
    url: xoopsjsurl + '/modules/neillibrary/ajax.php',
    type: 'POST', 
    data: { id: 168,
            dbid: <{$block.id}>,
            var1: inputValue              	         	     			       		
	  },
    success: function(response) {
    swal("<{$smarty.const.THEME_BLOCKSADMIN13}>");
    $('#bimg<{$block.id}>').html(inputValue); 
    }, 
    error: function() {
    console.log('ajax error!'); 
    }
    })
    });
    });
    });


$(window).load(function() {	
$(".adminimgid<{$block.id}>,.adminimgaid<{$block.id}>").css("cursor", "pointer");
});
</script>
<{/if}>


<script type="text/javascript">
$(document).ready(function(){
$.ajax({
    url: xoopsjsurl + '/modules/neillibrary/ajax.php',
    type: 'POST', 
    data: { id: 167,
            dbid: <{$block.id}>             	         	     			       		
 	  },
        success: function(response) {
    $('#bimg<{$block.id}>').html(response); 
    }, 
    error: function() {
    console.log('ajax error!'); 
    }
})
});
</script>
