/*** Created by A.J on 2019/11/12.*/$(document).ready(function(){$(".delconfirm").on("click", function(){var obj = $(this);$.confirm({title: $("#quedingshanchu").text(),content: $("#bukehuifu").html(),buttons: {confirm: {text: $('#jixu').text(),btnClass: 'btn-info',keys: ['enter'],action: function () {obj.children("i:last").removeClass("d-none");$.post("deldbbackup", { fn: obj.next().val(), verification:$("#verification").text()},function(data){obj.children("i:last").addClass("d-none");if(data == 'ok'){obj.parent().parent().remove();}else{$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});}},cancel: {text: $('#quxiao').text(),btnClass: 'btn-default',keys: ['esc']}}});});$(".reconfirm").on("click", function(){var obj = $(this);$.confirm({title: $("#quedinghuanyuan").text(),content: $("#huanyuanshuoming").html(),buttons: {confirm: {text: $('#jixu').text(),btnClass: 'btn-info',keys: ['enter'],action: function () {obj.children("i:last").removeClass("d-none");$("#dbbackupModal").modal();$.post("redbbackup", { fn: obj.next().val(), verification:$("#verification").text()},function(data){obj.children("i:last").addClass("d-none");$('#dbbackupModal').modal('hide');if(data == 'ok'){var aobj = $.alert({title: "",content: $('#redbbackupok').text(),buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});setTimeout(function(){aobj.close();},2500);}else{$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});}},cancel: {text: $('#quxiao').text(),btnClass: 'btn-default',keys: ['esc']}}});});$("#submitupreform").on("click", function(){var obj = $(this);$.confirm({title: $("#quedinghuanyuan").text(),content: $("#huanyuanshuoming").html(),buttons: {confirm: {text: $('#jixu').text(),btnClass: 'btn-info',keys: ['enter'],action: function () {if($("#file").val() == ""){$.alert({title: $('#chucuo').text(),content: $('#notselected').text(),buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}else{obj.children("i:last").removeClass("d-none");$("#dbbackupModal").modal();$("#upreform").submit();}}},cancel: {text: $('#quxiao').text(),btnClass: 'btn-default',keys: ['esc']}}});});$('#file').on('change',function(){var fileName = $(this).val();$(this).next('.custom-file-label').html(fileName);});});