mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
minify 갱신.
This commit is contained in:
parent
6fa233dcff
commit
c7a8468406
25 changed files with 1247 additions and 1640 deletions
16
modules/importer/tpl/js/importer_admin.min.js
vendored
16
modules/importer/tpl/js/importer_admin.min.js
vendored
|
|
@ -1,14 +1,2 @@
|
|||
/**
|
||||
* @file modules/importer/js/importer_admin.js
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief importer에서 사용하는 javascript
|
||||
**/
|
||||
jQuery(function($){$('.checkxml').find('input:text').change(function(){$(this).closest('.checkxml').find('.x_help-inline').hide()}).end().find('button').click(function(){var $this,$container,$input,$messages,$loading,$form,$syncmember,count;$this=$(this).prop('disabled',true);$form=$this.closest('form');$container=$this.closest('.checkxml');$input=$container.find('input').prop('disabled',true).addClass('loading');$message=$container.find('.x_help-inline').hide()
|
||||
function on_complete(data){var $ul,$ttxml,$xml;$xml=$form.find('>.xml');$ttxml=$form.find('>.ttxml');$message.text(data.result_message);if(data.error||data.exists!='true'){$message.attr('class','x_help-inline').fadeIn(300);$ttxml=$ttxml.filter(':visible');$ttxml.eq(-1).slideUp(100,function(){$ttxml=$ttxml.slice(0,-1).eq(-1).slideUp(100,arguments.callee)});$form.find(':submit').attr('disabled','disabled');return restore()};$message.attr('class','x_help-inline').fadeIn(300);$form.find(':submit').removeAttr('disabled');$syncmember=$form.find('.syncmember:hidden');$input.prop('disabled',false).removeClass('loading');$this.prop('disabled',false);if(data.type=='XML'){$xml.not(':visible').add($syncmember).slideDown(300)}else if(data.type=='TTXML'){$ttxml.not(':visible').add($syncmember).slideDown(300);$form.find('input[name=type]').val('ttxml')}}
|
||||
function restore(){$input.prop('disabled',false).removeClass('loading');$this.prop('disabled',false);$form.find('.syncmember:visible').slideUp(100);return false};show_waiting_message=false;$.exec_json('importer.procImporterAdminCheckXmlFile',{filename:$.trim($input.val())},on_complete)}).end().find('.x_help-inline').hide().end().closest('form').find('>.ttxml').hide().end().end().closest('form').find(':submit').attr('disabled','disabled');$('.syncmember').hide()})
|
||||
function doSync(fo_obj){exec_xml('importer','procImporterAdminSync',[],function(ret){alert(ret.message);location.href=location.href});return false}
|
||||
function doPreProcessing(form,formId){var xml_file,type,resp,prepared=false,$=jQuery,$status,$process,$form;xml_file=form.elements['xml_file'].value;type=form.elements['type'].value;if(!xml_file)return false;$process=$('#process');if(!$('body').children('.x_modal-backdrop').length)$('body').append('<div class="x_modal-backdrop" />');$('a[href="#process"].modalAnchor').trigger('open.mw');exec_xml('importer','procImporterAdminPreProcessing',{type:type,xml_file:xml_file},on_complete,resp=['error','message','type','total','cur','key','status'])
|
||||
function on_complete(ret){var $reload,$cont,fo_proc,elems,i,c,key,to_copy,fo_import;prepared=true;if(ret.status==-1)return alert(ret.message);fo_proc=get_by_id('fo_process');elems=fo_proc.elements;for(i=0,c=resp.length;i<c;i++){key=resp[i];elems[key]?elems[key].value=ret[key]:0};fo_import=get_by_id(formId);if(fo_import){to_copy=['target_module','guestbook_target_module','user_id','unit_count'];for(i=0,c=to_copy.length;i<c;i++){key=to_copy[i];if(fo_import.elements[key])fo_proc.elements[key].value=fo_import.elements[key].value}};jQuery('#preProgressMsg').hide();jQuery('#progressMsg').show();doImport(formId)};return false}
|
||||
function doImport(formId){var form=get_by_id('fo_process'),elems=form.elements,i,c,params={},resp;for(i=0,c=elems.length;i<c;i++)params[elems[i].name]=elems[i].value
|
||||
function on_complete(ret,response_tags){var i,c,key,fo_import;for(i=0,c=resp.length;i<c;i++){key=resp[i];elems[key]?elems[key].value=ret[key]:0};ret.total=parseInt(ret.total,10)||0;ret.cur=parseInt(ret.cur,10)||0;percent=parseInt((ret.cur/ret.total)*100);jQuery('#totalCount').text(ret.total);jQuery('#completeCount').text(ret.cur);jQuery('#progressBar').width(percent+'%');jQuery('#progressPercent').html(percent+"%");if(ret.total>ret.cur){doImport(formId)}else{function resultAlertMessage(){alert(ret.message);jQuery('a[href="#process"].modalAnchor').unbind('before-close.mw').trigger('close.mw').find('#progressBar').width(1).end().find('#progressPercent').html('0%').end();try{form.reset();get_by_id(formId).reset()}catch(e){};jQuery('span.btn > input[type=submit]').attr('disabled','disabled')};fo_import=get_by_id(formId);if(fo_import!=null&&fo_import.isSync.checked){exec_xml('importer','procImporterAdminSync',params,function(ret){if(ret&&(!ret.error||ret.error=='0'))resultAlertMessage()},resp=['error','message'])}else resultAlertMessage()}};show_waiting_message=false;exec_xml('importer','procImporterAdminImport',params,on_complete,resp=['error','message','type','total','cur','key']);show_waiting_message=true;return false}
|
||||
function displayProgress(total,cur){var per,stat,$stat;per=Math.max(total?Math.round(cur/total*100):100,1);$stat=jQuery('#status');if(!$stat.find('div.progress1').length)$stat.html('<div class="progressBox"><div class="progress1"></div><div class="progress2"></div></div>');$stat.find('div.progress1').html(per+' ').css('width',per+'%').end().find('div.progress2').text(cur+'/'+total)}
|
||||
/*! Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
function doSync(){return exec_xml("importer","procImporterAdminSync",[],function(a){alert(a.message),location.href=location.href}),!1}function doPreProcessing(a,b){function c(a){var c,d,e,g,i,j,k;if(h=!0,-1==a.status)return alert(a.message);for(c=get_by_id("fo_process"),d=c.elements,e=0,g=f.length;g>e;e++)i=f[e],d[i]?d[i].value=a[i]:0;if(k=get_by_id(b))for(j=["target_module","guestbook_target_module","user_id","unit_count"],e=0,g=j.length;g>e;e++)i=j[e],k.elements[i]&&(c.elements[i].value=k.elements[i].value);jQuery("#preProgressMsg").hide(),jQuery("#progressMsg").show(),doImport(b)}var d,e,f,g,h=!1,i=jQuery;return d=a.elements.xml_file.value,e=a.elements.type.value,d?(g=i("#process"),i("body").children(".x_modal-backdrop").length||i("body").append('<div class="x_modal-backdrop" />'),i('a[href="#process"].modalAnchor').trigger("open.mw"),exec_xml("importer","procImporterAdminPreProcessing",{type:e,xml_file:d},c,f=["error","message","type","total","cur","key","status"]),!1):!1}function doImport(a){function b(b){function c(){alert(b.message),jQuery('a[href="#process"].modalAnchor').unbind("before-close.mw").trigger("close.mw").find("#progressBar").width(1).end().find("#progressPercent").html("0%").end();try{f.reset(),get_by_id(a).reset()}catch(c){}jQuery("span.btn > input[type=submit]").attr("disabled","disabled")}var d,i,j,k;for(d=0,i=e.length;i>d;d++)j=e[d],g[j]?g[j].value=b[j]:0;b.total=parseInt(b.total,10)||0,b.cur=parseInt(b.cur,10)||0,percent=parseInt(b.cur/b.total*100),jQuery("#totalCount").text(b.total),jQuery("#completeCount").text(b.cur),jQuery("#progressBar").width(percent+"%"),jQuery("#progressPercent").html(percent+"%"),b.total>b.cur?doImport(a):(k=get_by_id(a),null!=k&&k.isSync.checked?exec_xml("importer","procImporterAdminSync",h,function(a){!a||a.error&&"0"!=a.error||c()},e=["error","message"]):c())}var c,d,e,f=get_by_id("fo_process"),g=f.elements,h={};for(c=0,d=g.length;d>c;c++)h[g[c].name]=g[c].value;return show_waiting_message=!1,exec_xml("importer","procImporterAdminImport",h,b,e=["error","message","type","total","cur","key"]),show_waiting_message=!0,!1}function displayProgress(a,b){var c,d;c=Math.max(a?Math.round(b/a*100):100,1),d=jQuery("#status"),d.find("div.progress1").length||d.html('<div class="progressBox"><div class="progress1"></div><div class="progress2"></div></div>'),d.find("div.progress1").html(c+" ").css("width",c+"%").end().find("div.progress2").text(b+"/"+a)}jQuery(function(a){a(".checkxml").find("input:text").change(function(){a(this).closest(".checkxml").find(".x_help-inline").hide()}).end().find("button").click(function(){function b(a){var b,e;return e=g.find(">.xml"),b=g.find(">.ttxml"),$message.text(a.result_message),a.error||"true"!=a.exists?($message.attr("class","x_help-inline").fadeIn(300),b=b.filter(":visible"),b.eq(-1).slideUp(100,function(){b=b.slice(0,-1).eq(-1).slideUp(100,arguments.callee)}),g.find(":submit").attr("disabled","disabled"),c()):($message.attr("class","x_help-inline").fadeIn(300),g.find(":submit").removeAttr("disabled"),h=g.find(".syncmember:hidden"),f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),"XML"==a.type?e.not(":visible").add(h).slideDown(300):"TTXML"==a.type&&(b.not(":visible").add(h).slideDown(300),g.find("input[name=type]").val("ttxml")),void 0)}function c(){return f.prop("disabled",!1).removeClass("loading"),d.prop("disabled",!1),g.find(".syncmember:visible").slideUp(100),!1}var d,e,f,g,h;d=a(this).prop("disabled",!0),g=d.closest("form"),e=d.closest(".checkxml"),f=e.find("input").prop("disabled",!0).addClass("loading"),$message=e.find(".x_help-inline").hide(),show_waiting_message=!1,a.exec_json("importer.procImporterAdminCheckXmlFile",{filename:a.trim(f.val())},b)}).end().find(".x_help-inline").hide().end().closest("form").find(">.ttxml").hide().end().end().closest("form").find(":submit").attr("disabled","disabled"),a(".syncmember").hide()});
|
||||
Loading…
Add table
Add a link
Reference in a new issue