").append(divImg),
delCheck = $("
").click(function(){
event.stopPropagation();
}),
editButton = $("
").click(function(){
event.stopPropagation();
makeFormAddCursor(false, {element: self, index: index})
})
divCont.append($("
").append(editButton,delCheck),divImgBox,divTitle)
$(ListBox).append(divCont)
if(self.active){
activeTrue = true
$(divCont).addClass("acive_cursor")
divImg.one('load', function(){
setCursor(self, this)
}).one('error', function(){
setCursor()
})
}
})
if(firststart || !activeTrue){
$(".element_cur_cont:eq(0)").addClass("acive_cursor")
setCursor("crosshair")
}
$(".checkbox_del_cur").on("change",function(){
$(".checkbox_del_cur:checked").length ? $(".del_cur").fadeIn('slow').css("display","inline-block").text(`Удалить [${$(".checkbox_del_cur:checked").length}]`):$(".del_cur").fadeOut('slow')
})
}
function defaultValueForm(elem){
$(elem).find("#name_scope,#link_scope,#previewName,#previewImg").each(function(){
switch(this.id){
case 'name_scope':
case 'link_scope': this.value = ''
break;
case 'previewName': this.innerText='Default'
break;
case 'previewImg': this.src = defaultCursorImage
break;
}
})
$(".cur_preview").css('cursor','crosshair')
}
function ImgSizeData(img, val){
$(img).one('load', function(){
const w = this.naturalWidth,
h = this.naturalHeight
if(w>128 || h>128) alert(selLang.alertMesImage[0]+w+"px x "+h+"px!\n"+selLang.alertMesImage[1])
$(".cur_preview").css('cursor','url('+this.src+'), not-allowed')
if(this.src !== defaultCursorImage) $(this).data("sizes", {w:w, h:h});
else $(this).data("sizes", {w:null, h:null})
}).one('error', function(){
this.src = defaultCursorImage
$(".cur_preview").css('cursor','crosshair')
}).attr('src', val)
}
function makeFormAddCursor(editmake = false, params = null){
let $makeCurForm = $(".makeCursor_form"),
$cur_overlay = $(".cur_overlay")
if($makeCurForm.length == 0){
$makeCurForm = $("