Sindbad~EG File Manager

Current Path : /home/frekansk/.trash/wp-content/plugins/learnpress/assets/js/dist/admin/pages/
Upload File :
Current File : /home/frekansk/.trash/wp-content/plugins/learnpress/assets/js/dist/admin/pages/sync-data.min.js

!function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=7)}({7:function(e,t){var s,n,i,c,r,o,l,a;s=jQuery,n={id:"sync-base",syncing:!1,items:!1,completed:!1,callback:null,methodGetItems:"",itemsKey:"",chunkSize:50,sync:function(e){if(!this.syncing){if(this.callback=e,!1===this.items)this.get_items();else if(!this.dispatch())return this.completed=!0,void this.callToCallback();this.syncing=!0}},init:function(){this.syncing=!1,this.items=!1,this.completed=!1},is_completed:function(){return this.completed},dispatch:function(){var e=this,t=!!this.items&&this.items.splice(0,this.chunkSize);return!(!t||0===t.length||(s.ajax({url:"",data:{"lp-ajax":this.id,sync:t},method:"post",success:function(t){t=LP.parseJSON(t),e.syncing=!1,"success"!==t.result&&(e.completed=!0),e.callToCallback(),e.is_completed()||e.sync(e.callback)}}),0))},callToCallback:function(){this.callback&&this.callback.call(this)},get_items:function(){var e=this;s.ajax({url:"",data:{"lp-ajax":this.id,sync:this.methodGetItems},success:function(t){e.syncing=!1,(t=LP.parseJSON(t))[e.itemsKey]?(e.items=t[e.itemsKey],e.sync(e.callback)):(e.completed=!0,e.items=[],e.callToCallback())}})}},i=s.extend({},n,{id:"sync-course-orders",methodGetItems:"get-courses",itemsKey:"courses"}),c=s.extend({},n,{id:"sync-user-courses",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),r=s.extend({},n,{id:"sync-user-orders",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),o=s.extend({},n,{id:"sync-course-final-quiz",methodGetItems:"get-courses",itemsKey:"courses",chunkSize:500}),l=s.extend({},n,{id:"sync-remove-older-data",methodGetItems:"remove-older-data",itemsKey:"_nothing_here",chunkSize:500}),a=s.extend({},n,{id:"sync-calculate-course-results",methodGetItems:"get-users",itemsKey:"users",chunkSize:1}),window.LP_Sync_Data={syncs:[],syncing:0,options:{},start:function(e){if(this.syncs=[],this.options=s.extend({onInit:function(){},onStart:function(){},onCompleted:function(){},onCompletedAll:function(){}},e||{}),this.get_syncs()){this.reset(),this.options.onInit.call(this);var t=this,n=0,i=this.syncs.length;this.sync(n,(function e(s){if(s.is_completed()){if(n++,t.options.onCompleted.call(t,s),n>=i)return void t.options.onCompletedAll.call(t);t.sync(n,e)}}))}},reset:function(){for(var e in this.syncs)try{this[this.syncs[e]].init()}catch(e){}},sync:function(e,t){var s=this,n=this[this.syncs[e]];s.options.onStart.call(s,n),n.sync((function(){t.call(s,n)}))},get_syncs:function(){var e=s('input[name^="lp-repair"]:checked').serializeJSON()["lp-repair"];if(!e)return!1;for(var t in e)"yes"===e[t]&&this[t=t.replace(/[-]+/g,"_")]&&this.syncs.push(t);return this.syncs},get_sync:function(e){return this[e=e.replace(/[-]+/g,"_")]},sync_course_orders:i,sync_user_orders:r,sync_user_courses:c,sync_course_final_quiz:o,sync_remove_older_data:l,sync_calculate_course_results:a},s(document).ready((function(){var e,t;e=s("#learn-press-check-all-syncs"),t=s("#learn-press-syncs").find('[name^="lp-repair"]'),e.on("click",(function(){t.prop("checked",this.checked)})),t.on("click",(function(){e.prop("checked",t.filter(":checked").length===t.length)}))})).on("click",".lp-button-repair",(function(){function e(e){return s("ul#learn-press-syncs").find('input[name*="'+e+'"]')}LP_Sync_Data.start({onInit:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!0)},onStart:function(t){e(t.id).closest("li").addClass("syncing")},onCompleted:function(t){e(t.id).closest("li").removeClass("syncing").addClass("synced")},onCompletedAll:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!1)}})}))}});

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists