/*** Created by A.J on 2020/8/16.*/$(document).ready(function(){$(".confirm").on("click", function(){var obj = $(this);$.confirm({title: $("#quedingshanchu").text(),content: $("#bukehuifu").text(),buttons: {confirm: {text: $('#jixu').text(),btnClass: 'btn-info',keys: ['enter'],action: function () {obj.children("i:last").removeClass("d-none");$.post("delplugin", { plugin: obj.data("plugin"), 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']}}});});$("input.custom-control-input").on("click", function(){var tobj = $(this);var ischk = 0;if($(this).prop("checked") == true){ischk = 1;}$.post("manaplugin", { plugin: tobj.data("plugin"), chk: ischk, verification:$("#verification").text()}, function(data){if(data != 'ok'){if(ischk == 1){tobj.prop("checked", false);}else{tobj.prop("checked", true);}$.alert({title: $('#chucuo').text(),content: data,buttons: {confirm: {text: $('#queding').text(),btnClass: 'btn-info',keys: ['enter']}}});}});});$("#submitupreform").on("click", function(){var obj = $(this);$.confirm({title: "",content: $("#quedingshangchuan").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");$("#uploadpluginModal").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);});});