diff --git a/plugins/yetiforce/preview.js b/plugins/yetiforce/preview.js
index 9b0af302..9738d6a2 100644
--- a/plugins/yetiforce/preview.js
+++ b/plugins/yetiforce/preview.js
@@ -44,7 +44,7 @@ function registerEvents(content) {
registerSelectRecord(content);
registerRemoveRecord(content);
registerImportMail(content);
-
+ window.crm.app.registerPopover(content.closest('body'));
var block = content.find('.ytHeader .js-data');
content.find('.hideBtn').click(function () {
var button = $(this);
@@ -63,7 +63,10 @@ function registerEvents(content) {
}
function registerImportMail(content) {
- content.find('.importMail').click(function (e) {
+ let clicked = false;
+ content.find('.importMail').click(function(e) {
+ if (clicked) return false;
+ clicked = true;
window.crm.Vtiger_Helper_Js.showPnotify({
text: window.crm.app.vtranslate('StartedDownloadingEmail'),
type: 'info'
@@ -74,13 +77,17 @@ function registerImportMail(content) {
uid: rcmail.env.uid,
folder: rcmail.env.mailbox,
rcId: rcmail.env.user_id
- }).done(function (data) {
- loadActionBar();
- window.crm.Vtiger_Helper_Js.showPnotify({
- text: window.crm.app.vtranslate('AddFindEmailInRecord'),
- type: 'success'
- });
})
+ .done(function(data) {
+ loadActionBar();
+ window.crm.Vtiger_Helper_Js.showPnotify({
+ text: window.crm.app.vtranslate('AddFindEmailInRecord'),
+ type: 'success'
+ });
+ })
+ .fail(function() {
+ clicked = false;
+ });
});
}
diff --git a/plugins/yetiforce/preview.min.js b/plugins/yetiforce/preview.min.js
index 7384c07a..28f8731d 100644
--- a/plugins/yetiforce/preview.min.js
+++ b/plugins/yetiforce/preview.min.js
@@ -6,5 +6,5 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
-window.rcmail&&rcmail.addEventListener('init',function(){window.crm=getCrmWindow(),loadActionBar(),rcmail.env.message_commands.push('yetiforce.importICS'),rcmail.register_command('yetiforce.importICS',function(part,type){jQuery.ajax({type:'POST',url:'./?_task=mail&_action=plugin.yetiforce.importIcs&_mbox='+urlencode(rcmail.env.mailbox)+'&_uid='+urlencode(rcmail.env.uid)+'&_part='+part+'&_type='+type,async:!1,success:function success(data){data=JSON.parse(data),window.crm.Vtiger_Helper_Js.showPnotify({text:data.message,type:'info',animation:'show'});}});},!0);});function loadActionBar(){var content=$('#ytActionBarContent'),params={module:'OSSMail',view:'MailActionBar',uid:rcmail.env.uid,folder:rcmail.env.mailbox,rcId:rcmail.env.user_id};window.crm.AppConnector.request(params).done(function(response){content.find('.ytHeader').html(response),$('#messagecontent').css('top',content.outerHeight()+$('#messageheader').outerHeight()+'px'),registerEvents(content);});}function registerEvents(content){registerAddRecord(content),registerAddReletedRecord(content),registerSelectRecord(content),registerRemoveRecord(content),registerImportMail(content);var block=content.find('.ytHeader .js-data');content.find('.hideBtn').click(function(){var button=$(this),icon=button.find('.glyphicon');'0'==button.data('type')?(button.data('type','1'),icon.removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down')):(button.data('type','0'),icon.removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up')),block.toggle(),$(window).trigger('resize');});}function registerImportMail(content){content.find('.importMail').click(function(){window.crm.Vtiger_Helper_Js.showPnotify({text:window.crm.app.vtranslate('StartedDownloadingEmail'),type:'info'}),window.crm.AppConnector.request({module:'OSSMail',action:'ImportMail',uid:rcmail.env.uid,folder:rcmail.env.mailbox,rcId:rcmail.env.user_id}).done(function(){loadActionBar(),window.crm.Vtiger_Helper_Js.showPnotify({text:window.crm.app.vtranslate('AddFindEmailInRecord'),type:'success'});});});}function registerRemoveRecord(content){content.find('button.removeRecord').click(function(e){var row=$(e.currentTarget).closest('.rowRelatedRecord');removeRecord(row.data('id'));});}function registerSelectRecord(content){var id=content.find('#mailActionBarID').val();content.find('button.selectRecord').click(function(){var relParams={mailId:id};if(0==$(this).data('type')){var module=$(this).closest('.js-head-container').find('.module').val();if(null===module)return}else{var module=$(this).data('module');relParams.crmid=$(this).closest('.rowRelatedRecord').data('id'),relParams.mod=$(this).closest('.rowRelatedRecord').data('module'),relParams.newModule=module;}showPopup({module:module,src_module:'OSSMailView',src_record:id},relParams);});}function registerAddReletedRecord(content){content.find('#mailActionBarID').val();content.find('button.addRelatedRecord').click(function(e){var targetElement=$(e.currentTarget),row=targetElement.closest('.rowRelatedRecord'),params={sourceModule:row.data('module')};showQuickCreateForm(targetElement.data('module'),row.data('id'),params);});}function registerAddRecord(content){var id=content.find('#mailActionBarID').val();content.find('button.addRecord').click(function(e){var col=$(e.currentTarget).closest('.js-head-container'),selectValue=col.find('.module').val();if(null!==selectValue){var relatedRecords=[];content.find('.js-data').find('.rowRelatedRecord').each(function(i,record){var data=$(record).data();relatedRecords.push({module:data.module,id:data.id});}),showQuickCreateForm(selectValue,id,{relatedRecords:relatedRecords});}});}function removeRecord(crmid){var id=$('#mailActionBarID').val(),params={};params.data={module:'OSSMail',action:'ExecuteActions',mode:'removeRelated',params:{mailId:id,crmid:crmid}},params.async=!1,params.dataType='json',window.crm.AppConnector.request(params).done(function(data){var response=data.result,notifyParams={text:response.data,animation:'show'};response.success&&(notifyParams={text:response.data,type:'info',animation:'show'}),window.crm.Vtiger_Helper_Js.showPnotify(notifyParams),loadActionBar();});}function showPopup(params,actionsParams){actionsParams.newModule=params.module,window.crm.app.showRecordsList(params,function(modal,instance){instance.setSelectEvent(function(responseData){actionsParams.newCrmId=responseData.id,window.crm.AppConnector.request({async:!1,dataType:'json',data:{module:'OSSMail',action:'ExecuteActions',mode:'addRelated',params:actionsParams}}).done(function(data){var response=data.result;if(response.success)var notifyParams={text:response.data,type:'info',animation:'show'};else var notifyParams={text:response.data,animation:'show'};window.crm.Vtiger_Helper_Js.showPnotify(notifyParams),loadActionBar();});});});}function showQuickCreateForm(moduleName,record){var params=2').appendTo(data),$('').appendTo(data),$('').appendTo(data);},ids={link:'modulesLevel0',process:'modulesLevel1',subprocess:'modulesLevel2',subprocess_sl:'modulesLevel3',linkextend:'modulesLevel4'};for(var i in ids){var element=content.find('#'+ids[i]),value=element.length?JSON.parse(element.val()):[];0<=$.inArray(sourceModule,value)&&(relatedParams[i]=record);}'Leads'==moduleName&&(relatedParams.company=rcmail.env.fromName),('Leads'==moduleName||'Contacts'==moduleName)&&(relatedParams.lastname=rcmail.env.fromName),'Project'==moduleName&&(relatedParams.projectname=rcmail.env.subject),'HelpDesk'==moduleName&&(relatedParams.ticket_title=rcmail.env.subject),'Products'==moduleName&&(relatedParams.productname=rcmail.env.subject),'Services'==moduleName&&(relatedParams.servicename=rcmail.env.subject),relatedParams.email=rcmail.env.fromMail,relatedParams.email1=rcmail.env.fromMail;var messageBody=$('#messagebody').clone();messageBody.find('.image-attachment').remove(),relatedParams.description=messageBody.text(),params.relatedRecords!==void 0&&(relatedParams.relatedRecords=params.relatedRecords),relatedParams.sourceModule=sourceModule,relatedParams.sourceRecord=record,relatedParams.relationOperation=!0;var headerInstance=new window.crm.Vtiger_Header_Js;headerInstance.quickCreateModule(moduleName,{callbackFunction:function callbackFunction(){loadActionBar();},callbackPostShown:postShown,data:relatedParams,noCache:!0});}function getCrmWindow(){if(null!==opener&&'object'==opener.parent.CONFIG)return opener.parent;return 'object'==_typeof(parent.CONFIG)?parent:'object'==_typeof(parent.parent.CONFIG)?parent.parent:!('object'!=_typeof(opener.crm.CONFIG))&&opener.crm}
+window.rcmail&&rcmail.addEventListener('init',function(){window.crm=getCrmWindow(),loadActionBar(),rcmail.env.message_commands.push('yetiforce.importICS'),rcmail.register_command('yetiforce.importICS',function(part,type){jQuery.ajax({type:'POST',url:'./?_task=mail&_action=plugin.yetiforce.importIcs&_mbox='+urlencode(rcmail.env.mailbox)+'&_uid='+urlencode(rcmail.env.uid)+'&_part='+part+'&_type='+type,async:!1,success:function success(data){data=JSON.parse(data),window.crm.Vtiger_Helper_Js.showPnotify({text:data.message,type:'info',animation:'show'});}});},!0);});function loadActionBar(){var content=$('#ytActionBarContent'),params={module:'OSSMail',view:'MailActionBar',uid:rcmail.env.uid,folder:rcmail.env.mailbox,rcId:rcmail.env.user_id};window.crm.AppConnector.request(params).done(function(response){content.find('.ytHeader').html(response),$('#messagecontent').css('top',content.outerHeight()+$('#messageheader').outerHeight()+'px'),registerEvents(content);});}function registerEvents(content){registerAddRecord(content),registerAddReletedRecord(content),registerSelectRecord(content),registerRemoveRecord(content),registerImportMail(content),window.crm.app.registerPopover(content.closest('body'));var block=content.find('.ytHeader .js-data');content.find('.hideBtn').click(function(){var button=$(this),icon=button.find('.glyphicon');'0'==button.data('type')?(button.data('type','1'),icon.removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down')):(button.data('type','0'),icon.removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up')),block.toggle(),$(window).trigger('resize');});}function registerImportMail(content){var clicked=!1;content.find('.importMail').click(function(){return !clicked&&void(clicked=!0,window.crm.Vtiger_Helper_Js.showPnotify({text:window.crm.app.vtranslate('StartedDownloadingEmail'),type:'info'}),window.crm.AppConnector.request({module:'OSSMail',action:'ImportMail',uid:rcmail.env.uid,folder:rcmail.env.mailbox,rcId:rcmail.env.user_id}).done(function(){loadActionBar(),window.crm.Vtiger_Helper_Js.showPnotify({text:window.crm.app.vtranslate('AddFindEmailInRecord'),type:'success'});}).fail(function(){clicked=!1;}))});}function registerRemoveRecord(content){content.find('button.removeRecord').click(function(e){var row=$(e.currentTarget).closest('.rowRelatedRecord');removeRecord(row.data('id'));});}function registerSelectRecord(content){var id=content.find('#mailActionBarID').val();content.find('button.selectRecord').click(function(){var relationSelect=content.find('#addRelationSelect').val(),getCacheModule=window.crm.app.moduleCacheGet('selectedModuleName');('undefined'===getCacheModule||relationSelect!==getCacheModule)&&window.crm.app.moduleCacheSet('selectedModuleName',relationSelect);var relParams={mailId:id};if(0==$(this).data('type')){var module=$(this).closest('.js-head-container').find('.module').val();if(null===module)return}else{var module=$(this).data('module');relParams.crmid=$(this).closest('.rowRelatedRecord').data('id'),relParams.mod=$(this).closest('.rowRelatedRecord').data('module'),relParams.newModule=module;}showPopup({module:module,src_module:'OSSMailView',src_record:id},relParams);});}function registerAddReletedRecord(content){content.find('#mailActionBarID').val();content.find('button.addRelatedRecord').click(function(e){var targetElement=$(e.currentTarget),row=targetElement.closest('.rowRelatedRecord'),params={sourceModule:row.data('module')};showQuickCreateForm(targetElement.data('module'),row.data('id'),params);});}function registerAddRecord(content){var id=content.find('#mailActionBarID').val(),getCacheModule=window.crm.app.moduleCacheGet('selectedModuleName');getCacheModule&&content.find('#addRelationSelect').val(getCacheModule),content.find('button.addRecord').click(function(e){var relationSelect=content.find('#addRelationSelect').val();('undefined'===getCacheModule||relationSelect!==getCacheModule)&&window.crm.app.moduleCacheSet('selectedModuleName',relationSelect);var col=$(e.currentTarget).closest('.js-head-container'),selectValue=col.find('.module').val();if(null!==selectValue){var relatedRecords=[];content.find('.js-data').find('.rowRelatedRecord').each(function(i,record){var data=$(record).data();relatedRecords.push({module:data.module,id:data.id});}),showQuickCreateForm(selectValue,id,{relatedRecords:relatedRecords});}});}function removeRecord(crmid){var id=$('#mailActionBarID').val(),params={};params.data={module:'OSSMail',action:'ExecuteActions',mode:'removeRelated',params:{mailId:id,crmid:crmid}},params.async=!1,params.dataType='json',window.crm.AppConnector.request(params).done(function(data){var response=data.result,notifyParams={text:response.data,animation:'show'};response.success&&(notifyParams={text:response.data,type:'info',animation:'show'}),window.crm.Vtiger_Helper_Js.showPnotify(notifyParams),loadActionBar();});}function showPopup(params,actionsParams){actionsParams.newModule=params.module,window.crm.app.showRecordsList(params,function(modal,instance){instance.setSelectEvent(function(responseData){actionsParams.newCrmId=responseData.id,window.crm.AppConnector.request({async:!1,dataType:'json',data:{module:'OSSMail',action:'ExecuteActions',mode:'addRelated',params:actionsParams}}).done(function(data){var response=data.result;if(response.success)var notifyParams={text:response.data,type:'info',animation:'show'};else var notifyParams={text:response.data,animation:'show'};window.crm.Vtiger_Helper_Js.showPnotify(notifyParams),loadActionBar();});});});}function showQuickCreateForm(moduleName,record){var params=2').appendTo(data),$('').appendTo(data),$('').appendTo(data);},ids={link:'modulesLevel0',process:'modulesLevel1',subprocess:'modulesLevel2',subprocess_sl:'modulesLevel3',linkextend:'modulesLevel4'};for(var i in ids){var element=content.find('#'+ids[i]),value=element.length?JSON.parse(element.val()):[];0<=$.inArray(sourceModule,value)&&(relatedParams[i]=record);}'Leads'==moduleName&&(relatedParams.company=rcmail.env.fromName),('Leads'==moduleName||'Contacts'==moduleName)&&(relatedParams.lastname=rcmail.env.fromName),'Project'==moduleName&&(relatedParams.projectname=rcmail.env.subject),'HelpDesk'==moduleName&&(relatedParams.ticket_title=rcmail.env.subject),'Products'==moduleName&&(relatedParams.productname=rcmail.env.subject),'Services'==moduleName&&(relatedParams.servicename=rcmail.env.subject),relatedParams.email=rcmail.env.fromMail,relatedParams.email1=rcmail.env.fromMail;var messageBody=$('#messagebody').clone();messageBody.find('.image-attachment').remove(),relatedParams.description=messageBody.text(),params.relatedRecords!==void 0&&(relatedParams.relatedRecords=params.relatedRecords),relatedParams.sourceModule=sourceModule,relatedParams.sourceRecord=record,relatedParams.relationOperation=!0;var headerInstance=new window.crm.Vtiger_Header_Js;headerInstance.quickCreateModule(moduleName,{callbackFunction:function callbackFunction(){loadActionBar();},callbackPostShown:postShown,data:relatedParams,noCache:!0});}function getCrmWindow(){if(null!==opener&&'object'==opener.parent.CONFIG)return opener.parent;return 'object'==_typeof(parent.CONFIG)?parent:'object'==_typeof(parent.parent.CONFIG)?parent.parent:!('object'!=_typeof(opener.crm.CONFIG))&&opener.crm}
//# sourceMappingURL=preview.min.js.map
diff --git a/plugins/yetiforce/preview.min.js.map b/plugins/yetiforce/preview.min.js.map
index b7e3c10c..4fc96a32 100644
--- a/plugins/yetiforce/preview.min.js.map
+++ b/plugins/yetiforce/preview.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"preview.min.js","sources":["preview.js"],"sourcesContent":["/* {[The file is published on the basis of MIT License]} */\nwindow.rcmail && rcmail.addEventListener('init', function (evt) {\n\t\twindow.crm = getCrmWindow();\n\t\tloadActionBar();\n\t\trcmail.env.message_commands.push('yetiforce.importICS');\n\t\trcmail.register_command('yetiforce.importICS', function (part, type) {\n\t\t\tjQuery.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"./?_task=mail&_action=plugin.yetiforce.importIcs&_mbox=\" + urlencode(rcmail.env.mailbox) + '&_uid=' + urlencode(rcmail.env.uid) + '&_part=' + part + '&_type=' + type,\n\t\t\t\tasync: false,\n\t\t\t\tsuccess: function (data) {\n\t\t\t\t\tdata = JSON.parse(data);\n\t\t\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\t\t\t\ttext: data['message'],\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}, true);\n\t}\n);\n\nfunction loadActionBar() {\n\tvar content = $('#ytActionBarContent');\n\tvar params = {\n\t\tmodule: 'OSSMail',\n\t\tview: 'MailActionBar',\n\t\tuid: rcmail.env.uid,\n\t\tfolder: rcmail.env.mailbox,\n\t\trcId: rcmail.env.user_id\n\t};\n\twindow.crm.AppConnector.request(params).done(function (response) {\n\t\tcontent.find('.ytHeader').html(response);\n\t\t$('#messagecontent').css('top', (content.outerHeight() + $('#messageheader').outerHeight()) + 'px');\n\t\tregisterEvents(content);\n\t});\n}\n\nfunction registerEvents(content) {\n\tregisterAddRecord(content);\n\tregisterAddReletedRecord(content);\n\tregisterSelectRecord(content);\n\tregisterRemoveRecord(content);\n\tregisterImportMail(content);\n\n\tvar block = content.find('.ytHeader .js-data');\n\tcontent.find('.hideBtn').click(function () {\n\t\tvar button = $(this);\n\t\tvar icon = button.find('.glyphicon');\n\n\t\tif (button.data('type') == '0') {\n\t\t\tbutton.data('type', '1');\n\t\t\ticon.removeClass(\"glyphicon-chevron-up\").addClass(\"glyphicon-chevron-down\");\n\t\t} else {\n\t\t\tbutton.data('type', '0');\n\t\t\ticon.removeClass(\"glyphicon-chevron-down\").addClass(\"glyphicon-chevron-up\");\n\t\t}\n\t\tblock.toggle();\n\t\t$(window).trigger(\"resize\");\n\t});\n}\n\nfunction registerImportMail(content) {\n\tcontent.find('.importMail').click(function (e) {\n\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\ttext: window.crm.app.vtranslate('StartedDownloadingEmail'),\n\t\t\ttype: 'info'\n\t\t});\n\t\twindow.crm.AppConnector.request({\n\t\t\tmodule: 'OSSMail',\n\t\t\taction: 'ImportMail',\n\t\t\tuid: rcmail.env.uid,\n\t\t\tfolder: rcmail.env.mailbox,\n\t\t\trcId: rcmail.env.user_id\n\t\t}).done(function (data) {\n\t\t\tloadActionBar();\n\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\t\ttext: window.crm.app.vtranslate('AddFindEmailInRecord'),\n\t\t\t\ttype: 'success'\n\t\t\t});\n\t\t})\n\t});\n}\n\nfunction registerRemoveRecord(content) {\n\tcontent.find('button.removeRecord').click(function (e) {\n\t\tvar row = $(e.currentTarget).closest('.rowRelatedRecord');\n\t\tremoveRecord(row.data('id'));\n\t});\n}\n\nfunction registerSelectRecord(content) {\n\tlet id = content.find('#mailActionBarID').val();\n\tcontent.find('button.selectRecord').click(function (e) {\n\t\tlet relParams = {\n\t\t\tmailId: id\n\t\t};\n\t\tif ($(this).data('type') == 0) {\n\t\t\tvar module = $(this).closest('.js-head-container').find('.module').val();\n\t\t\tif (module === null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tvar module = $(this).data('module');\n\t\t\trelParams.crmid = $(this).closest('.rowRelatedRecord').data('id');\n\t\t\trelParams.mod = $(this).closest('.rowRelatedRecord').data('module');\n\t\t\trelParams.newModule = module;\n\t\t}\n\t\tshowPopup({\n\t\t\tmodule: module,\n\t\t\tsrc_module: 'OSSMailView',\n\t\t\tsrc_record: id,\n\t\t}, relParams);\n\t});\n}\n\nfunction registerAddReletedRecord(content) {\n\tvar id = content.find('#mailActionBarID').val();\n\tcontent.find('button.addRelatedRecord').click(function (e) {\n\t\tvar targetElement = $(e.currentTarget);\n\t\tvar row = targetElement.closest('.rowRelatedRecord');\n\t\tvar params = {sourceModule: row.data('module')};\n\t\tshowQuickCreateForm(targetElement.data('module'), row.data('id'), params);\n\t});\n}\n\nfunction registerAddRecord(content) {\n\tvar id = content.find('#mailActionBarID').val();\n\tcontent.find('button.addRecord').click(function (e) {\n\t\tvar col = $(e.currentTarget).closest('.js-head-container');\n\t\tlet selectValue = col.find('.module').val();\n\t\tif (selectValue !== null) {\n\t\t\tlet relatedRecords = []\n\t\t\tcontent.find('.js-data').find('.rowRelatedRecord').each((i, record) => {\n\t\t\t\tlet data = $(record).data()\n\t\t\t\trelatedRecords.push({module: data.module, id: data.id})\n\t\t\t})\n\t\t\tshowQuickCreateForm(selectValue, id, {relatedRecords: relatedRecords});\n\t\t}\n\t});\n}\n\nfunction removeRecord(crmid) {\n\tconst id = $('#mailActionBarID').val();\n\tlet params = {}\n\tparams.data = {\n\t\tmodule: 'OSSMail',\n\t\taction: 'ExecuteActions',\n\t\tmode: 'removeRelated',\n\t\tparams: {\n\t\t\tmailId: id,\n\t\t\tcrmid: crmid\n\t\t}\n\t}\n\tparams.async = false;\n\tparams.dataType = 'json';\n\twindow.crm.AppConnector.request(params).done(function (data) {\n\t\tconst response = data['result'];\n\t\tlet notifyParams = {\n\t\t\ttext: response['data'],\n\t\t\tanimation: 'show'\n\t\t};\n\t\tif (response['success']) {\n\t\t\tnotifyParams = {\n\t\t\t\ttext: response['data'],\n\t\t\t\ttype: 'info',\n\t\t\t\tanimation: 'show'\n\t\t\t};\n\t\t}\n\t\twindow.crm.Vtiger_Helper_Js.showPnotify(notifyParams);\n\t\tloadActionBar();\n\t});\n}\n\nfunction showPopup(params, actionsParams) {\n\tactionsParams['newModule'] = params['module'];\n\twindow.crm.app.showRecordsList(params, (modal, instance) => {\n\t\tinstance.setSelectEvent((responseData, e) => {\n\t\t\tactionsParams['newCrmId'] = responseData.id;\n\t\t\twindow.crm.AppConnector.request({\n\t\t\t\tasync: false,\n\t\t\t\tdataType: 'json',\n\t\t\t\tdata: {\n\t\t\t\t\tmodule: 'OSSMail',\n\t\t\t\t\taction: 'ExecuteActions',\n\t\t\t\t\tmode: 'addRelated',\n\t\t\t\t\tparams: actionsParams\n\t\t\t\t}\n\t\t\t}).done(function (data) {\n\t\t\t\tlet response = data['result'];\n\t\t\t\tif (response['success']) {\n\t\t\t\t\tvar notifyParams = {\n\t\t\t\t\t\ttext: response['data'],\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tvar notifyParams = {\n\t\t\t\t\t\ttext: response['data'],\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify(notifyParams);\n\t\t\t\tloadActionBar();\n\t\t\t});\n\t\t});\n\t});\n}\n\nfunction showQuickCreateForm(moduleName, record, params = {}) {\n\tconst content = $('#ytActionBarContent');\n\tlet relatedParams = {},\n\t\tsourceModule = 'OSSMailView';\n\tif (params['sourceModule']) {\n\t\tsourceModule = params['sourceModule'];\n\t}\n\tconst postShown = function (data) {\n\t\tvar index, queryParam, queryParamComponents;\n\t\t$('').appendTo(data);\n\t\t$('').appendTo(data);\n\t\t$('').appendTo(data);\n\t}\n\tconst postQuickCreate = function (data) {\n\t\tloadActionBar();\n\t}\n\tconst ids = {\n\t\tlink: 'modulesLevel0',\n\t\tprocess: 'modulesLevel1',\n\t\tsubprocess: 'modulesLevel2',\n\t\tsubprocess_sl: 'modulesLevel3',\n\t\tlinkextend: 'modulesLevel4'\n\t};\n\tfor (var i in ids) {\n\t\tvar element = content.find('#' + ids[i]);\n\t\tvar value = element.length ? JSON.parse(element.val()) : [];\n\t\tif ($.inArray(sourceModule, value) >= 0) {\n\t\t\trelatedParams[i] = record;\n\t\t}\n\t}\n\tif (moduleName == 'Leads') {\n\t\trelatedParams['company'] = rcmail.env.fromName;\n\t}\n\tif (moduleName == 'Leads' || moduleName == 'Contacts') {\n\t\trelatedParams['lastname'] = rcmail.env.fromName;\n\t}\n\tif (moduleName == 'Project') {\n\t\trelatedParams['projectname'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'HelpDesk') {\n\t\trelatedParams['ticket_title'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'Products') {\n\t\trelatedParams['productname'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'Services') {\n\t\trelatedParams['servicename'] = rcmail.env.subject;\n\t}\n\trelatedParams['email'] = rcmail.env.fromMail;\n\trelatedParams['email1'] = rcmail.env.fromMail;\n\tlet messageBody = $('#messagebody').clone()\n\tmessageBody.find('.image-attachment').remove()\n\trelatedParams['description'] = messageBody.text()\n\t//relatedParams['related_to'] = record;\n\tif (params.relatedRecords !== undefined) {\n\t\trelatedParams['relatedRecords'] = params.relatedRecords;\n\t}\n\trelatedParams['sourceModule'] = sourceModule;\n\trelatedParams['sourceRecord'] = record;\n\trelatedParams['relationOperation'] = true;\n\tconst quickCreateParams = {\n\t\tcallbackFunction: (data) => {\n\t\t\tloadActionBar();\n\t\t},\n\t\tcallbackPostShown: postShown,\n\t\tdata: relatedParams,\n\t\tnoCache: true\n\t};\n\tconst headerInstance = new window.crm.Vtiger_Header_Js();\n\theaderInstance.quickCreateModule(moduleName, quickCreateParams);\n}\n\nfunction getCrmWindow() {\n\tif (opener !== null && opener.parent.CONFIG == \"object\") {\n\t\treturn opener.parent;\n\t} else if (typeof parent.CONFIG == \"object\") {\n\t\treturn parent;\n\t} else if (typeof parent.parent.CONFIG == \"object\") {\n\t\treturn parent.parent;\n\t} else if (typeof opener.crm.CONFIG == \"object\") {\n\t\treturn opener.crm;\n\t}\n\treturn false;\n}\n"],"names":["window","rcmail","addEventListener","crm","getCrmWindow","loadActionBar","env","message_commands","push","register_command","part","type","jQuery","ajax","url","urlencode","mailbox","uid","async","success","data","JSON","parse","Vtiger_Helper_Js","showPnotify","text","animation","$","params","module","view","folder","rcId","user_id","AppConnector","request","done","response","content","find","html","css","outerHeight","registerEvents","registerAddRecord","registerAddReletedRecord","registerSelectRecord","registerRemoveRecord","registerImportMail","click","icon","button","removeClass","addClass","block","toggle","trigger","app","vtranslate","action","e","currentTarget","closest","removeRecord","row","val","mailId","id","relParams","crmid","mod","newModule","showPopup","src_module","src_record","targetElement","sourceModule","showQuickCreateForm","selectValue","col","each","i","record","relatedRecords","mode","dataType","notifyParams","actionsParams","showRecordsList","modal","instance","setSelectEvent","responseData","moduleName","relatedParams","appendTo","ids","link","process","subprocess","subprocess_sl","linkextend","value","element","length","inArray","fromName","subject","fromMail","clone","messageBody","remove","Vtiger_Header_Js","headerInstance","quickCreateModule","callbackFunction","callbackPostShown","postShown","noCache","parent","CONFIG","opener"],"mappings":";;;;;;;;AACAA,OAAOC,MAAP,EAAiBA,OAAOC,gBAAP,CAAwB,MAAxB,CAAgC,UAAe,CAC9DF,OAAOG,GAAP,CAAaC,cADiD,CAE9DC,eAF8D,CAG9DJ,OAAOK,GAAP,CAAWC,gBAAX,CAA4BC,IAA5B,CAAiC,qBAAjC,CAH8D,CAI9DP,OAAOQ,gBAAP,CAAwB,qBAAxB,CAA+C,SAAUC,IAAV,CAAgBC,IAAhB,CAAsB,CACpEC,OAAOC,IAAP,CAAY,CACXF,KAAM,MADK,CAEXG,IAAK,0DAA4DC,UAAUd,OAAOK,GAAP,CAAWU,OAArB,CAA5D,CAA4F,QAA5F,CAAuGD,UAAUd,OAAOK,GAAP,CAAWW,GAArB,CAAvG,CAAmI,SAAnI,CAA+IP,IAA/I,CAAsJ,SAAtJ,CAAkKC,IAF5J,CAGXO,QAHW,CAIXC,QAAS,iBAAUC,IAAV,CAAgB,CACxBA,KAAOC,KAAKC,KAAL,CAAWF,IAAX,CADiB,CAExBpB,OAAOG,GAAP,CAAWoB,gBAAX,CAA4BC,WAA5B,CAAwC,CACvCC,KAAML,YADiC,CAEvCT,KAAM,MAFiC,CAGvCe,UAAW,MAH4B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WqG,OA9CkB,EAgD7Db,oBAAyB7F,OAAOK,GAAP,CAAWsG,QAhDyB,CAiD7Dd,qBAA0B7F,OAAOK,GAAP,CAAWsG,QAjDwB,CAkD7D,gBAAkBjF,EAAE,cAAF,EAAkBkF,KAAlB,EAAlB,CACAC,YAAYvE,IAAZ,CAAiB,mBAAjB,EAAsCwE,MAAtC,EAnD6D,CAoD7DjB,0BAA+BgB,YAAYrF,IAAZ,EApD8B,CAsDzDG,OAAOuD,cAAP,SAtDyD,GAuD5DW,6BAAkClE,OAAOuD,cAvDmB,EAyD7DW,2BAAgClB,YAzD6B,CA0D7DkB,2BAAgCZ,MA1D6B,CA2D7DY,kCA3D6D,oBAoEtC,WAAW3F,GAAP,CAAW6G,gBApEuB,CAqE7DC,eAAeC,iBAAf,CAAiCrB,UAAjC,CAT0B,CACzBsB,iBAAkB,2BAAU,CAC3B9G,gBACA,CAHwB,CAIzB+G,kBAAmBC,SAJM,CAKzBjG,KAAM0E,aALmB,CAMzBwB,UANyB,CAS1B,EACA,CAED,qBAAA,EAAwB,CACvB,GAAe,IAAX,WAA2C,QAAxB,SAAOC,MAAP,CAAcC,MAArC,CACC,cAAcD,MAAd,CAFsB,OAGY,QAAxB,UAAOA,OAAOC,MAAd,CAHY,CAIfD,MAJe,CAKmB,QAA/B,UAAOA,OAAOA,MAAP,CAAcC,MAArB,CALY,CAMfD,OAAOA,MANQ,GAOgB,QAA5B,UAAOE,OAAOtH,GAAP,CAAWqH,MAAlB,CAPY,GAQfC,OAAOtH,GAGf"}
\ No newline at end of file
+{"version":3,"file":"preview.min.js","sources":["preview.js"],"sourcesContent":["/* {[The file is published on the basis of MIT License]} */\nwindow.rcmail && rcmail.addEventListener('init', function (evt) {\n\t\twindow.crm = getCrmWindow();\n\t\tloadActionBar();\n\t\trcmail.env.message_commands.push('yetiforce.importICS');\n\t\trcmail.register_command('yetiforce.importICS', function (part, type) {\n\t\t\tjQuery.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: \"./?_task=mail&_action=plugin.yetiforce.importIcs&_mbox=\" + urlencode(rcmail.env.mailbox) + '&_uid=' + urlencode(rcmail.env.uid) + '&_part=' + part + '&_type=' + type,\n\t\t\t\tasync: false,\n\t\t\t\tsuccess: function (data) {\n\t\t\t\t\tdata = JSON.parse(data);\n\t\t\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\t\t\t\ttext: data['message'],\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}, true);\n\t}\n);\n\nfunction loadActionBar() {\n\tvar content = $('#ytActionBarContent');\n\tvar params = {\n\t\tmodule: 'OSSMail',\n\t\tview: 'MailActionBar',\n\t\tuid: rcmail.env.uid,\n\t\tfolder: rcmail.env.mailbox,\n\t\trcId: rcmail.env.user_id\n\t};\n\twindow.crm.AppConnector.request(params).done(function (response) {\n\t\tcontent.find('.ytHeader').html(response);\n\t\t$('#messagecontent').css('top', (content.outerHeight() + $('#messageheader').outerHeight()) + 'px');\n\t\tregisterEvents(content);\n\t});\n}\n\nfunction registerEvents(content) {\n\tregisterAddRecord(content);\n\tregisterAddReletedRecord(content);\n\tregisterSelectRecord(content);\n\tregisterRemoveRecord(content);\n\tregisterImportMail(content);\n\twindow.crm.app.registerPopover(content.closest('body'));\n\tvar block = content.find('.ytHeader .js-data');\n\tcontent.find('.hideBtn').click(function () {\n\t\tvar button = $(this);\n\t\tvar icon = button.find('.glyphicon');\n\n\t\tif (button.data('type') == '0') {\n\t\t\tbutton.data('type', '1');\n\t\t\ticon.removeClass(\"glyphicon-chevron-up\").addClass(\"glyphicon-chevron-down\");\n\t\t} else {\n\t\t\tbutton.data('type', '0');\n\t\t\ticon.removeClass(\"glyphicon-chevron-down\").addClass(\"glyphicon-chevron-up\");\n\t\t}\n\t\tblock.toggle();\n\t\t$(window).trigger(\"resize\");\n\t});\n}\n\nfunction registerImportMail(content) {\n\tlet clicked = false;\n\tcontent.find('.importMail').click(function(e) {\n\t\tif (clicked) return false;\n\t\tclicked = true;\n\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\ttext: window.crm.app.vtranslate('StartedDownloadingEmail'),\n\t\t\ttype: 'info'\n\t\t});\n\t\twindow.crm.AppConnector.request({\n\t\t\tmodule: 'OSSMail',\n\t\t\taction: 'ImportMail',\n\t\t\tuid: rcmail.env.uid,\n\t\t\tfolder: rcmail.env.mailbox,\n\t\t\trcId: rcmail.env.user_id\n\t\t})\n\t\t\t.done(function(data) {\n\t\t\t\tloadActionBar();\n\t\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify({\n\t\t\t\t\ttext: window.crm.app.vtranslate('AddFindEmailInRecord'),\n\t\t\t\t\ttype: 'success'\n\t\t\t\t});\n\t\t\t})\n\t\t\t.fail(function() {\n\t\t\t\tclicked = false;\n\t\t\t});\n\t});\n}\n\nfunction registerRemoveRecord(content) {\n\tcontent.find('button.removeRecord').click(function (e) {\n\t\tvar row = $(e.currentTarget).closest('.rowRelatedRecord');\n\t\tremoveRecord(row.data('id'));\n\t});\n}\n\nfunction registerSelectRecord(content) {\n\tlet id = content.find('#mailActionBarID').val();\n\tcontent.find('button.selectRecord').click(function (e) {\n\t\tlet relationSelect = content.find('#addRelationSelect').val();\n\t\tlet getCacheModule = window.crm.app.moduleCacheGet('selectedModuleName');\n\t\tif (getCacheModule === 'undefined' || relationSelect !== getCacheModule) {\n\t\t\twindow.crm.app.moduleCacheSet('selectedModuleName', relationSelect);\n\t\t}\n\t\tlet relParams = {\n\t\t\tmailId: id\n\t\t};\n\t\tif ($(this).data('type') == 0) {\n\t\t\tvar module = $(this).closest('.js-head-container').find('.module').val();\n\t\t\tif (module === null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tvar module = $(this).data('module');\n\t\t\trelParams.crmid = $(this).closest('.rowRelatedRecord').data('id');\n\t\t\trelParams.mod = $(this).closest('.rowRelatedRecord').data('module');\n\t\t\trelParams.newModule = module;\n\t\t}\n\t\tshowPopup({\n\t\t\tmodule: module,\n\t\t\tsrc_module: 'OSSMailView',\n\t\t\tsrc_record: id,\n\t\t}, relParams);\n\t});\n}\n\nfunction registerAddReletedRecord(content) {\n\tvar id = content.find('#mailActionBarID').val();\n\tcontent.find('button.addRelatedRecord').click(function (e) {\n\t\tvar targetElement = $(e.currentTarget);\n\t\tvar row = targetElement.closest('.rowRelatedRecord');\n\t\tvar params = {sourceModule: row.data('module')};\n\t\tshowQuickCreateForm(targetElement.data('module'), row.data('id'), params);\n\t});\n}\n\nfunction registerAddRecord(content) {\n\tvar id = content.find('#mailActionBarID').val();\n\tlet getCacheModule = window.crm.app.moduleCacheGet('selectedModuleName');\n\tif (getCacheModule) {\n\t\tcontent.find('#addRelationSelect').val(getCacheModule);\n\t}\n\tcontent.find('button.addRecord').click(function(e) {\n\t\tvar relationSelect = content.find('#addRelationSelect').val();\n\t\tif (getCacheModule === 'undefined' || relationSelect !== getCacheModule) {\n\t\t\twindow.crm.app.moduleCacheSet('selectedModuleName', relationSelect);\n\t\t}\n\t\tvar col = $(e.currentTarget).closest('.js-head-container');\n\t\tlet selectValue = col.find('.module').val();\n\t\tif (selectValue !== null) {\n\t\t\tlet relatedRecords = []\n\t\t\tcontent.find('.js-data').find('.rowRelatedRecord').each((i, record) => {\n\t\t\t\tlet data = $(record).data()\n\t\t\t\trelatedRecords.push({module: data.module, id: data.id})\n\t\t\t})\n\t\t\tshowQuickCreateForm(selectValue, id, {relatedRecords: relatedRecords});\n\t\t}\n\t});\n}\n\nfunction removeRecord(crmid) {\n\tconst id = $('#mailActionBarID').val();\n\tlet params = {}\n\tparams.data = {\n\t\tmodule: 'OSSMail',\n\t\taction: 'ExecuteActions',\n\t\tmode: 'removeRelated',\n\t\tparams: {\n\t\t\tmailId: id,\n\t\t\tcrmid: crmid\n\t\t}\n\t}\n\tparams.async = false;\n\tparams.dataType = 'json';\n\twindow.crm.AppConnector.request(params).done(function (data) {\n\t\tconst response = data['result'];\n\t\tlet notifyParams = {\n\t\t\ttext: response['data'],\n\t\t\tanimation: 'show'\n\t\t};\n\t\tif (response['success']) {\n\t\t\tnotifyParams = {\n\t\t\t\ttext: response['data'],\n\t\t\t\ttype: 'info',\n\t\t\t\tanimation: 'show'\n\t\t\t};\n\t\t}\n\t\twindow.crm.Vtiger_Helper_Js.showPnotify(notifyParams);\n\t\tloadActionBar();\n\t});\n}\n\nfunction showPopup(params, actionsParams) {\n\tactionsParams['newModule'] = params['module'];\n\twindow.crm.app.showRecordsList(params, (modal, instance) => {\n\t\tinstance.setSelectEvent((responseData, e) => {\n\t\t\tactionsParams['newCrmId'] = responseData.id;\n\t\t\twindow.crm.AppConnector.request({\n\t\t\t\tasync: false,\n\t\t\t\tdataType: 'json',\n\t\t\t\tdata: {\n\t\t\t\t\tmodule: 'OSSMail',\n\t\t\t\t\taction: 'ExecuteActions',\n\t\t\t\t\tmode: 'addRelated',\n\t\t\t\t\tparams: actionsParams\n\t\t\t\t}\n\t\t\t}).done(function (data) {\n\t\t\t\tlet response = data['result'];\n\t\t\t\tif (response['success']) {\n\t\t\t\t\tvar notifyParams = {\n\t\t\t\t\t\ttext: response['data'],\n\t\t\t\t\t\ttype: 'info',\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tvar notifyParams = {\n\t\t\t\t\t\ttext: response['data'],\n\t\t\t\t\t\tanimation: 'show'\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\twindow.crm.Vtiger_Helper_Js.showPnotify(notifyParams);\n\t\t\t\tloadActionBar();\n\t\t\t});\n\t\t});\n\t});\n}\n\nfunction showQuickCreateForm(moduleName, record, params = {}) {\n\tconst content = $('#ytActionBarContent');\n\tlet relatedParams = {},\n\t\tsourceModule = 'OSSMailView';\n\tif (params['sourceModule']) {\n\t\tsourceModule = params['sourceModule'];\n\t}\n\tconst postShown = function (data) {\n\t\tvar index, queryParam, queryParamComponents;\n\t\t$('').appendTo(data);\n\t\t$('').appendTo(data);\n\t\t$('').appendTo(data);\n\t}\n\tconst postQuickCreate = function (data) {\n\t\tloadActionBar();\n\t}\n\tconst ids = {\n\t\tlink: 'modulesLevel0',\n\t\tprocess: 'modulesLevel1',\n\t\tsubprocess: 'modulesLevel2',\n\t\tsubprocess_sl: 'modulesLevel3',\n\t\tlinkextend: 'modulesLevel4'\n\t};\n\tfor (var i in ids) {\n\t\tvar element = content.find('#' + ids[i]);\n\t\tvar value = element.length ? JSON.parse(element.val()) : [];\n\t\tif ($.inArray(sourceModule, value) >= 0) {\n\t\t\trelatedParams[i] = record;\n\t\t}\n\t}\n\tif (moduleName == 'Leads') {\n\t\trelatedParams['company'] = rcmail.env.fromName;\n\t}\n\tif (moduleName == 'Leads' || moduleName == 'Contacts') {\n\t\trelatedParams['lastname'] = rcmail.env.fromName;\n\t}\n\tif (moduleName == 'Project') {\n\t\trelatedParams['projectname'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'HelpDesk') {\n\t\trelatedParams['ticket_title'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'Products') {\n\t\trelatedParams['productname'] = rcmail.env.subject;\n\t}\n\tif (moduleName == 'Services') {\n\t\trelatedParams['servicename'] = rcmail.env.subject;\n\t}\n\trelatedParams['email'] = rcmail.env.fromMail;\n\trelatedParams['email1'] = rcmail.env.fromMail;\n\tlet messageBody = $('#messagebody').clone()\n\tmessageBody.find('.image-attachment').remove()\n\trelatedParams['description'] = messageBody.text()\n\t//relatedParams['related_to'] = record;\n\tif (params.relatedRecords !== undefined) {\n\t\trelatedParams['relatedRecords'] = params.relatedRecords;\n\t}\n\trelatedParams['sourceModule'] = sourceModule;\n\trelatedParams['sourceRecord'] = record;\n\trelatedParams['relationOperation'] = true;\n\tconst quickCreateParams = {\n\t\tcallbackFunction: (data) => {\n\t\t\tloadActionBar();\n\t\t},\n\t\tcallbackPostShown: postShown,\n\t\tdata: relatedParams,\n\t\tnoCache: true\n\t};\n\tconst headerInstance = new window.crm.Vtiger_Header_Js();\n\theaderInstance.quickCreateModule(moduleName, quickCreateParams);\n}\n\nfunction getCrmWindow() {\n\tif (opener !== null && opener.parent.CONFIG == \"object\") {\n\t\treturn opener.parent;\n\t} else if (typeof parent.CONFIG == \"object\") {\n\t\treturn parent;\n\t} else if (typeof parent.parent.CONFIG == \"object\") {\n\t\treturn parent.parent;\n\t} else if (typeof opener.crm.CONFIG == \"object\") {\n\t\treturn opener.crm;\n\t}\n\treturn false;\n}\n"],"names":["window","rcmail","addEventListener","crm","getCrmWindow","loadActionBar","env","message_commands","push","register_command","part","type","jQuery","ajax","url","urlencode","mailbox","uid","async","success","data","JSON","parse","Vtiger_Helper_Js","showPnotify","text","animation","$","params","module","view","folder","rcId","user_id","AppConnector","request","done","response","content","find","html","css","outerHeight","registerEvents","registerAddRecord","registerAddReletedRecord","registerSelectRecord","registerRemoveRecord","registerImportMail","app","registerPopover","closest","click","icon","button","removeClass","addClass","block","toggle","trigger","clicked","vtranslate","action","fail","e","currentTarget","removeRecord","row","val","getCacheModule","moduleCacheGet","relationSelect","moduleCacheSet","mailId","id","relParams","crmid","mod","newModule","showPopup","src_module","src_record","targetElement","sourceModule","showQuickCreateForm","selectValue","col","each","i","record","relatedRecords","mode","dataType","notifyParams","actionsParams","showRecordsList","modal","instance","setSelectEvent","responseData","moduleName","relatedParams","appendTo","ids","link","process","subprocess","subprocess_sl","linkextend","value","element","length","inArray","fromName","subject","fromMail","clone","messageBody","remove","Vtiger_Header_Js","headerInstance","quickCreateModule","callbackFunction","callbackPostShown","postShown","noCache","parent","CONFIG","opener"],"mappings":";;;;;;;;AACAA,OAAOC,MAAP,EAAiBA,OAAOC,gBAAP,CAAwB,MAAxB,CAAgC,UAAe,CAC9DF,OAAOG,GAAP,CAAaC,cADiD,CAE9DC,eAF8D,CAG9DJ,OAAOK,GAAP,CAAWC,gBAAX,CAA4BC,IAA5B,CAAiC,qBAAjC,CAH8D,CAI9DP,OAAOQ,gBAAP,C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5Db,0BAA+BpG,OAAOK,GAAP,CAAW4G,OA3CkB,EA6C3C,UAAd,YA7CyD,GA8C5Db,0BAA+BpG,OAAOK,GAAP,CAAW4G,OA9CkB,EAgD7Db,oBAAyBpG,OAAOK,GAAP,CAAW6G,QAhDyB,CAiD7Dd,qBAA0BpG,OAAOK,GAAP,CAAW6G,QAjDwB,CAkD7D,gBAAkBxF,EAAE,cAAF,EAAkByF,KAAlB,EAAlB,CACAC,YAAY9E,IAAZ,CAAiB,mBAAjB,EAAsC+E,MAAtC,EAnD6D,CAoD7DjB,0BAA+BgB,YAAY5F,IAAZ,EApD8B,CAsDzDG,OAAO8D,cAAP,SAtDyD,GAuD5DW,6BAAkCzE,OAAO8D,cAvDmB,EAyD7DW,2BAAgClB,YAzD6B,CA0D7DkB,2BAAgCZ,MA1D6B,CA2D7DY,kCA3D6D,oBAoEtC,WAAWlG,GAAP,CAAWoH,gBApEuB,CAqE7DC,eAAeC,iBAAf,CAAiCrB,UAAjC,CAT0B,CACzBsB,iBAAkB,2BAAU,CAC3BrH,gBACA,CAHwB,CAIzBsH,kBAAmBC,SAJM,CAKzBxG,KAAMiF,aALmB,CAMzBwB,UANyB,CAS1B,EACA,CAED,qBAAA,EAAwB,CACvB,GAAe,IAAX,WAA2C,QAAxB,SAAOC,MAAP,CAAcC,MAArC,CACC,cAAcD,MAAd,CAFsB,OAGY,QAAxB,UAAOA,OAAOC,MAAd,CAHY,CAIfD,MAJe,CAKmB,QAA/B,UAAOA,OAAOA,MAAP,CAAcC,MAArB,CALY,CAMfD,OAAOA,MANQ,GAOgB,QAA5B,UAAOE,OAAO7H,GAAP,CAAW4H,MAAlB,CAPY,GAQfC,OAAO7H,GAGf"}
\ No newline at end of file
diff --git a/version.php b/version.php
index d319fa79..a2341f0e 100644
--- a/version.php
+++ b/version.php
@@ -1,6 +1,6 @@
'2019.07.26',
- 'version' => '0.0.77'
+ 'patch' => '2019.09.13',
+ 'version' => '0.0.80'
];