Copy successful
'; $("body").append(dom); $("body>.downloadlist-copy-tip-box").fadeIn(function(){ setTimeout(function(){ $(this).fadeOut(function() { $(this).remove(); }); }.bind(this),2000); }); } }) }) } function bindEvent4SubmitAccessPassword(downloadAccessPasswordId) { var downloadPop = $('#'+downloadAccessPasswordId); downloadPop.fadeIn(); downloadPop.find('a.pop-close').unbind('click').bind('click',function(ev) { downloadPop.fadeOut(); ev.stopPropagation(); }); downloadPop.find(".pop-input").on("input propertyChange",function(){ if ($(this).val() != "") { $(this).nextAll(".err-tip").hide(); } }); downloadPop.find('a[submitAccessPassword=true]').unbind('click').bind('click',function() { var encodeFileId = $.trim(downloadPop.find('input[name=encodeFileId]').val()); var previewImg = $(".sitewidget-downloadList-20150513195244 .preview-img-btn[encodefileid="+encodeFileId+"]"); var prewImgUrl = $(".preview-img-btn[encodefileid="+encodeFileId+"]").attr("data-new_file_url") || ""; var url = '/phoenix/admin/download/submitAccessPassword'; var postData = {}; postData['fileId'] = $.trim(downloadPop.find('input[name=encodeFileId]').val()); postData['accessPassword'] = $.trim(downloadPop.find('input[name=accessPassword]').val()); postData['dp'] = "0"; phoenixSite.ajax({ url: url, type: 'post', data: postData, done: function(result){ result = $.parseJSON(result); if ($.isEmptyObject(result)) { downloadPop.fadeOut(); return; } if (result['authAccessPassword']) { downloadPop.find('.err-tip').html('Password is wrong').show(); return; } if (previewImg && previewImg.length > 0) { downloadPop.fadeOut(); $("body").append('