/** * Created by A.J on 2019/3/14. */$(document).ready(function(){var i="",t="",e="";""!=$("#slt").val()&&(i=$("#suolvetu").html(),$("#suolvetu img").attr("src",$("#slt").val()),$("#shangchuantu").addClass("hidden"),$("#quxiaotu").removeClass("hidden")),$("#caidanfenlei").change(function(){""!=$("#caidanfenlei").val()&&($("#carriedout").removeClass("hidden"),$("#fuji").html('<option value="0">'+$("#yijicaidan").text()+"</option>"),$.post("changeParent",{cid:$(this).val(),id:$("#id").val(),verification:$("#verification").text()},function(i){$("#carriedout").addClass("hidden"),""!=i&&$("#fuji").html($("#fuji").html()+i)}))}),$("#upload").uploadify({auto:!0,fileTypeExts:"*.jpg;*.png;*.gif;*.jpeg",multi:!1,formData:{verification:$("#verification").text()},fileSizeLimit:9999,buttonText:$("#buttonText").text(),showUploadedPercent:!0,showUploadedSize:!1,removeTimeout:3,uploader:"uploadthumb",onUploadComplete:function(i,e){t=$("#domain").text()+e,$("#bendi .panel-body").html('<img src="'+t+'" class="img-responsive" alt="Responsive image">')}}),$("#queding").click(function(){i=$("#suolvetu").html(),$("#xuanbendi").hasClass("active")&&""!=t?($("#suolvetu").html('<img src="'+t+'" class="img-responsive" alt="Responsive image">'),$("#slt").val(t)):$("#xuanwangluo").hasClass("active")&&""!=e&&($("#suolvetu").html('<img src="'+e+'" class="img-responsive" alt="Responsive image">'),$("#slt").val(e)),""==t&&""==e||($("#shangchuantu").addClass("hidden"),$("#quxiaotu").removeClass("hidden")),$("#myModal").modal("hide")}),$("#quxiaotu").click(function(){$.post("delthumb",{slt:$("#slt").val(),verification:$("#verification").text()},function(t){"ok"==t?($("#suolvetu").html(i),$("#slt").val(""),$("#quxiaotu").addClass("hidden"),$("#shangchuantu").removeClass("hidden")):$.alert({title:$("#chucuo").text(),content:t,confirmButton:$("#queding").text()})})}),$("#wangluodizhi").change(function(){e=$("#wangluodizhi").val(),$("#wangluo .panel-body").html('<img src="'+e+'" class="img-responsive">'),$("#slt").val(e)}),$("#baocun").click(function(){if($.catfishcms()){var i=$(this);i.children("span").removeClass("hidden"),$.post("",$("#catfishForm").serialize(),function(t){i.children("span").addClass("hidden"),"ok"==t?($("#id").length<1||""==$("#id").val())&&window.location.reload():$.alert({title:$("#chucuo").text(),content:t,confirmButton:$("#queding").text()})})}})});