Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
* @author bhagyaraj.p , ardip.das ,bibek.das,arunish.sinha
* JS For ETLCustomMapping
*/
Ext.ns('cms.slimfast.admin.etl');
function resolveCollectionSlimfastPath(URL) {
URL = '/Collections/collectionsSlimfast/' + URL;
return URL;
}
//-------------------------------------------Target Picklist Grid-------------------------------------------
//--------------------------------------------------------------------------------------------------------------------
cms.slimfast.admin.etl.targetFieldsArray = [
['pkTargetId', 'Reason Id', 'int'],
['targetColumn',common.i18n.getDisplayValue("TARGET COLUMN","Target Column"), 'string'],
['targetType', common.i18n.getDisplayValue("CLS_TARGET_DATA_TYPE", "Target Data Type"), 'string']
];
var targetHeaderMap = {};
for (var i = 1; i < cms.slimfast.admin.etl.targetFieldsArray.length; i++) {
var iArray = cms.slimfast.admin.etl.targetFieldsArray[i];
targetHeaderMap[iArray[0]] = iArray[1];
}
var filterMap = {};
var rs = new Array();
var gridConfig = {
filters: filterMap,
renderers: rs,
singleSelect: true
};
cms.slimfast.admin.etl.targetStore = dms.common.createStore('pkTargetId', resolveCollectionSlimfastPath('cmsSlimfastETLgetTargetColumnsCmsDocHeader.do'), cms.slimfast.admin.etl.targetFieldsArray, null, null, null, null, true, null, true);
var buttonsArrayEmpty = [];
cms.slimfast.admin.etl.targetPickListGrid = dms.special.component.createPickListGrid('targetPickListGrid',
targetHeaderMap, cms.slimfast.admin.etl.targetStore, gridConfig);
//-------------------------------------------Source Picklist Grid-------------------------------------------
//------------------------------------------------------------------------------------------------------------------------
cms.slimfast.admin.etl.sourceFieldsArray = [
['pkSourceId', 'Reason Id', 'int'],
['sourceColumn',common.i18n.getDisplayValue("SOURCE_COLUMN", "Source Column"), 'string'],
['sourceType', common.i18n.getDisplayValue("CLS_SOURCE_DATA_TYPE", "Source Data Type"), 'string']
];
var sourceHeaderMap = {};
for (var i = 1; i < cms.slimfast.admin.etl.sourceFieldsArray.length; i++) {
var iArray = cms.slimfast.admin.etl.sourceFieldsArray[i];
sourceHeaderMap[iArray[0]] = iArray[1];
}
var filterMap = {};
var rs = new Array();
var gridConfig = {
filters: filterMap,
renderers: rs,
singleSelect: true
};
cms.slimfast.admin.etl.sourceStore = dms.common.createStore('pkSourceId', resolveCollectionSlimfastPath('cmsSlimfastETLgetSourceColumnsAcctDocHeader.do'), cms.slimfast.admin.etl.sourceFieldsArray, null, null, null, null, true, null, true);
var buttonsArrayEmpty = [];
cms.slimfast.admin.etl.sourcePickListGrid = dms.special.component.createPickListGrid('sourcePickListGrid',
sourceHeaderMap, cms.slimfast.admin.etl.sourceStore, gridConfig);
//------------------------------------------- Picklist Custom Buttons -------------------------------
var sourceSelected = null;
var targetSelected = null;
var sourceTypeCheck=null;
var targetTypeCheck=null;
var sourceLength =0 ;
var targetLength =0 ;
var selectSourceBtn = Ext.create('Ext.Button', {
text: common.i18n.getDisplayValue(
"CLS_SELECT",
"Select"
),
id: 'sourcePicklistSelect',
disabled:true,
handler: function () {
if (sourceSelected != null) {
Ext.getCmp('cmsSlimfastAdminETLSourceField').setValue(sourceSelected.data['sourceColumn']);
sourceTypeCheck = sourceSelected.data['sourceType'];
}
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().deselectAll();
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().clearSelections();
this.up('window').close();
}
});
var closeSourceBtn = Ext.create('Ext.Button', {
text: common.i18n.getDisplayValue(
"CLS_CLOSE",
"Close"
),
id: 'cmsSlimfastAdminETLsourcePicklistClose',
handler: function () {
sourceSelected = null;
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().deselectAll();
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().clearSelections();
this.up('window').close();
}
});
var selectTargeteBtn = Ext.create('Ext.Button', {
text: common.i18n.getDisplayValue(
"CLS_SELECT",
"Select"
),
xtype: 'button',
id: 'targetPicklistSelect',
disabled:true,
handler: function () {
if (targetSelected != null) {
Ext.getCmp('cmsSlimfastAdminETLtargetField').setValue(targetSelected.data['targetColumn']);
targetTypeCheck = targetSelected.data['targetType'];
}
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().deselectAll();
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().clearSelections();
this.up('window').close();
}
});
var closeTargetBtn = Ext.create('Ext.Button', {
text: common.i18n.getDisplayValue(
"CLS_CLOSE",
"Close"
),
xtype: 'button',
id: 'targetPicklistClose',
handler: function () {
targetSelected = null;
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().deselectAll();
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().clearSelections();
this.up('window').close();
}
});
//------------------------------------------- ADD / EDIT Form for ETL Custom Mapping -------------------------------
//------------------------------------------------------------------------------------------------------------------
cms.slimfast.admin.etl.createForm = function (getData) {
sourceLength = 0;
targetLength = 0;
var cmsSlimfastAdminETLformFieldspanel = Ext.create('Ext.form.Panel', {
frame: true,
monitorValid: true,
bodyStyle: "padding: 25px",
buttonAlign: 'center',
autoScroll: true,
//Static Fields for the mappping form
items: [
{
xtype: 'textfield',
id: 'cmsSlimfastAdminETLSourceField',
name: 'sourceColumn',
//mandatory
fieldLabel: common.i18n.getDisplayValue(
"SOURCE_COLUMN",
"Source Column"
),
triggers: {
triggerCls: {
cls: 'fa-trigger special-picklist-form-field',
handler: function () {
if (!this.disabled) {
onTriggerClick:
Ext.create('Ext.window.Window', {
title: common.i18n.getDisplayValue(
"CLS_SOURCE_COLUMN_SELECTION",
"Source Column Selection"
),
autoId: 'etlPickListGridSourceWindow',
width: screen.width * .5,
height: screen.height * .6,
minWidth: screen.width * .3,
minHeight: screen.height * .25,
maxWidth: screen.width * 9,
maxHeight: screen.height * .85,
modal: true,
constrain: true,
layout: 'fit',
closeAction: 'hide',
items: cms.slimfast.admin.etl.sourcePickListGrid,
listeners:{
'close':function(win){
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().deselectAll();
try{
var resetStore = cms.slimfast.admin.etl.sourcePickListGrid.getStore();
if(resetStore.sorters){
resetStore.sorters.clear();
}
if(resetStore.lastOptions && resetStore.lastOptions.sorters){
resetStore.lastOptions.sorters=null;
}
if(resetStore.getProxy() && resetStore.getProxy().extraParams){
resetStore.getProxy().extraParams.sort= undefined;
resetStore.getProxy().extraParams.dir=undefined;
}
resetStore.reload()
}catch(e){}
}
},
bbar: [
'->',
selectSourceBtn,
closeSourceBtn
]
}).show();
}
}
}
},
labelSeparator: '<span style="color:red"> * </span>',
padding: "2px",
width: screen.width * 0.30,
labelWidth: screen.width * 0.09,
clearOnSubmit: true,
allowBlank: false,
editable: false,
},
{
xtype: 'textfield',
id: 'cmsSlimfastAdminETLtargetField',
name: 'targetColumn',
//mandatory
fieldLabel: common.i18n.getDisplayValue(
"TARGET COLUMN",
"Target Column"
),
triggers: {
triggerCls: {
cls: 'fa-trigger special-picklist-form-field',
handler: function () {
if (!this.disabled) {
onTriggerClick:
Ext.create('Ext.window.Window', {
title: common.i18n.getDisplayValue(
"CLS_TARGET_COLUMN_SELECTION",
"Target Column Selection"
),
autoId: 'etlPickListGridTargetWindow',
width: screen.width * .5,
height: screen.height * .6,
minWidth: screen.width * .3,
minHeight: screen.height * .25,
maxWidth: screen.width * 9,
maxHeight: screen.height * .85,
modal: true,
constrain: true,
layout: 'fit',
closeAction: 'hide',
//autoDestroy: false,
items: cms.slimfast.admin.etl.targetPickListGrid,
listeners:{
'close':function(win){
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().deselectAll();
try{
var resetStore = cms.slimfast.admin.etl.targetPickListGrid.getStore();
if(resetStore.sorters){
resetStore.sorters.clear();
}
if(resetStore.lastOptions && resetStore.lastOptions.sorters){
resetStore.lastOptions.sorters=null;
}
if(resetStore.getProxy() && resetStore.getProxy().extraParams){
resetStore.getProxy().extraParams.sort= undefined;
resetStore.getProxy().extraParams.dir=undefined;
}
resetStore.reload()
}catch(e){}
}
},
bbar: [
'->',
selectTargeteBtn,
closeTargetBtn
],
}).show();
}
}
}
},
labelSeparator: '<span style="color:red"> * </span>',
padding: "2px",
width: screen.width * 0.30,
labelWidth: screen.width * 0.09,
clearOnSubmit: true,
allowBlank: false,
editable: false,
},
{
xtype: 'combobox',
id: 'cmsSlimfastAdminETLMethodField',
name: 'methodName',
fieldLabel: common.i18n.getDisplayValue(
"ADMN_CLS_MAPNG_SAINVMPNGS_MTD",
"Method"
),
multiSelect: false,
editable: false,
allowBlank: true,
padding: "2px",
width: screen.width * 0.30,
labelWidth: screen.width * 0.09,
clearOnSubmit: true,
store: Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data: [
{
'abbr': '',
'name': ''
},
{
'abbr': 'AssignSignBasedOnDebitCreditIndicator',
'name': 'AssignSignBasedOnDebitCreditIndicator'
}, {
'abbr': 'assignDebitCreditIndicatorBasedOnSign',
'name': 'assignDebitCreditIndicatorBasedOnSign'
}, {
'abbr': 'markInvoicesYesNoBasedOnRegex',
'name': 'markInvoicesYesNoBasedOnRegex'
}]
}),
valueField: 'abbr',
displayField: 'name',
}, {
xtype: 'combobox',
id: 'cmsSlimfastAdminETLClassField',
name: 'className',
fieldLabel: common.i18n.getDisplayValue(
"CLASS",
"Class"
),
padding: "2px",
width: screen.width * 0.30,
labelWidth: screen.width * 0.09,
allowBlank: true,
multiSelect: false,
editable: false,
store: Ext.create('Ext.data.Store', {
fields: ['abbr', 'name'],
data: [
{
'abbr': '',
'name': ''
},
{
'abbr': 'routines.HEXCMSMappings',
'name': 'routines.HEXCMSMappings'
}]
}),
valueField: 'abbr',
displayField: 'name',
}, {
xtype: 'textfield',
id: 'cmsSlimfastAdminETLMethodForField',
name: 'methodFor',
fieldLabel: common.i18n.getDisplayValue(
"METHOD_FOR",
"Method for"
),
padding: "2px",
width: screen.width * 0.30,
labelWidth: screen.width * 0.09,
clearOnSubmit: true,
}],
listeners: {
//Once the form panel get rendered on UI this listener gets invoked to render the associated fields.
afterrender: function (form) {
if (getData != null) {
//ADDING CUSTOM CONDITIONS
var fill_source = Ext.getCmp("cmsSlimfastAdminETLSourceField");
fill_source.setValue(getData.get("sourceColumn"));
fill_source.setDisabled(true);
var fill_target = Ext.getCmp("cmsSlimfastAdminETLtargetField");
fill_target.setValue(getData.get("targetColumn"));
var fill_method = Ext.getCmp("cmsSlimfastAdminETLMethodField");
fill_method.setRawValue(getData.get("methodName"));
var fill_class = Ext.getCmp("cmsSlimfastAdminETLClassField");
fill_class.setRawValue(getData.get("className"));
var fill_methodFor = Ext.getCmp("cmsSlimfastAdminETLMethodForField");
fill_methodFor.setValue(getData.get("methodFor"));
}
}
},
buttons: [
{
itemId: 'cmsSlimfastAdminETLSubmitButton',
text: common.i18n.getDisplayValue("COMMON_MSG_SUBMIT", "Submit"),
actionIdentifier: cms.slimfast.admin.etl.dataTypeId + ":" + cms.slimfast.admin.etl.menuId + ":cmsSlimfastETLAddOrEditCustomMapping",
formBind: true,
handler: function () {
{
sourceTypeCheck = null;
targetTypeCheck=null;
var ischanged = true;
var cmsSlimfastAdminETLAddEntryWindowPanel = Ext.getCmp('cmsSlimfastAdminETLAddEntryWindow');
var cmsSlimfastAdminETLEditEntryWindowPanel = Ext.getCmp('cmsSlimfastAdminETLEditEntryWindow');
if (getData === undefined) {
pkId = null;
}
else {
pkId = getData.get('pkCustomMappingId');
}
if (ischanged) {
var waitBox = Ext.MessageBox.wait(
common.i18n.getDisplayValue("COMMON_MSG_PLESE_WAIT", "Please wait"),
common.i18n.getDisplayValue("COMMON_MSG_UPDATING", "Saving Mapping Details")
);
var fill_source = Ext.getCmp("cmsSlimfastAdminETLSourceField");
fill_source.setDisabled(false); // We also need to send the sourceColumn so disabling it
var datas = this.up('form').getForm().getValues();
Ext.Ajax.request({
url: resolveCollectionSlimfastPath('cmsSlimfastETLaddOrEditCustomMapping.do'),
method: 'POST',
params: {
sourceColumn: datas['sourceColumn'],
targetColumn: datas['targetColumn'],
methodFor: datas['methodFor'],
methodName: datas['methodName'],
className: datas['className'],
mappingId: pkId,
},
success: function (result, request) {
waitBox.hide();
var responseText = Ext.util.JSON.decode(result.responseText);
if (responseText.success === false) {
Ext.Msg.show({
title: common.i18n.getDisplayValue("COMMON_MSG_INFO", "INFO"),
msg: common.i18n.getDisplayValue("MAPPING_ALREADY_EXISTS", "Mapping Already Exists"),
buttons: Ext.Msg.OK,
icon: Ext.Msg.INFO,
iconCls: 'icon'
});
}
//handling ui changes
if (cmsSlimfastAdminETLAddEntryWindowPanel === undefined) {
cmsSlimfastAdminETLEditEntryWindowPanel.close();
}
else {
cmsSlimfastAdminETLAddEntryWindowPanel.close();
}
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getStore().reload();
Ext.getCmp("cmsSlimfastAdminETLCustomMappingEditButton").setDisabled(true);
Ext.getCmp("cmsSlimfastAdminETLCustomMappingDeleteButton").setDisabled(true);
},
failure: function (result, request) {
waitBox.hide();
Ext.Msg.show
({
title: common.i18n.getDisplayValue("COMMON_MSG_STATUS", "Status"),
msg: common.i18n.getDisplayValue("COMMON_MSG_FAILED_DETAILS", "Cannot Modify Entry"),
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR,
iconCls: 'icon'
});
if (cmsSlimfastAdminETLAddEntryWindowPanel === undefined) {
cmsSlimfastAdminETLEditEntryWindowPanel.close();
}
else {
cmsSlimfastAdminETLAddEntryWindowPanel.close();
}
}
});
}
else {
if (cmsSlimfastAdminETLAddEntryWindowPanel === undefined) {
cmsSlimfastAdminETLEditEntryWindowPanel.close();
}
else {
cmsSlimfastAdminETLAddEntryWindowPanel.close();
}
Ext.Msg.alert(
common.i18n.getDisplayValue("COMMON_MSG_STATUS", "Status"),
common.i18n.getDisplayValue("NO_CHANGES_UPDATE", "No changes to update")
);
}
}
}
},
{
text: common.i18n.getDisplayValue("COMMON_MSG_CANCEL", "Cancel"),
handler: function () {
sourceTypeCheck = null;
targetTypeCheck=null;
var cmsSlimfastAdminETLAddEntryWindowPanel = Ext.getCmp('cmsSlimfastAdminETLAddEntryWindow');
var cmsSlimfastAdminETLEditEntryWindowPanel = Ext.getCmp('cmsSlimfastAdminETLEditEntryWindow');
if (cmsSlimfastAdminETLAddEntryWindowPanel === undefined) {
cmsSlimfastAdminETLEditEntryWindowPanel.close();
}
else {
cmsSlimfastAdminETLAddEntryWindowPanel.close();
}
}
},
]
});
return cmsSlimfastAdminETLformFieldspanel;
}
//-------------------------------------------- Add / Edit form ends -----------------------------------------------
//-------------------------------------------- Mapping Grid Panel ----------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------
cms.slimfast.admin.etl.gridPanel = function (attributes) {
var layoutList = dms.common.getLayoutsList(
cms.slimfast.admin.etl.dataTypeId,
true
);
var fields = dms.common.getFields(
1,
cms.slimfast.admin.etl.dataTypeId,
undefined,
true
);
//cms.slimfast.admin.etl.ThirdPartyPortalArray = fields;
var headerArray = layoutList[1].split(",");
var gridConfig = {
singleSelect: false,
};
var headerMap = {};
for (var j = 0; j < headerArray.length; j++) {
for (var i = 0; i < fields.length; i++) {
var iArray = fields[i];
if (headerArray[j] == iArray[0]) {
headerMap[iArray[0]] = iArray[1];
}
}
}
var gridStore = dms.common.createStore(
"manageETLCustomMappingStore",
resolveCollectionSlimfastPath('cmsSlimfastETLgetCustomMapping.do'),
fields,
null,
null,
null,
null,
true
);
cms.slimfast.admin.etl.ETLCustomMappingGridPanel = dms.special.component.createPickListGrid(
"manageETLCustomMappingGridPanel",
headerMap,
gridStore,
gridConfig,
null,
null,
cms.slimfast.admin.etl.dataTypeId,
"manageETLCustomMappingGridPanel"
);
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getSelectionModel().on("selectionchange", function () {
var selected = cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getSelectionModel().getSelection()
if (selected.length == 1) {
editButton.setDisabled(false);
deleteButton.setDisabled(false);
}
else if (selected.length > 1) {
editButton.setDisabled(true);
deleteButton.setDisabled(false);
}
else {
deleteButton.setDisabled(true);
editButton.setDisabled(true);
}
});
//-------------------------------------------- Source/Target DataType Validation -----------------------------------------------
cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().on("selectionchange", function () {
sourceSelected = cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().getSelection()[0];
sourceLength = cms.slimfast.admin.etl.sourcePickListGrid.getSelectionModel().getSelection().length;
if (sourceLength == 1) {
Ext.getCmp('sourcePicklistSelect').setDisabled(false);
if (targetTypeCheck != null) {
if (targetTypeCheck != sourceSelected.data['sourceType']) {
Ext.Msg.alert( common.i18n.getDisplayValue("CLS_ALERT", "Alert"),
common.i18n.getDisplayValue("CLS_ALERT_DATA_TYPE"," Entries with different datatypes are being selected ")+ "<br><br>"+common.i18n.getDisplayValue("CLS_SOURCE_DATA_TYPE", "Source Data Type")+" : "+sourceSelected.data['sourceType']+ "<br><br>"+ common.i18n.getDisplayValue("CLS_TARGET_DATA_TYPE", "Target Data Type")+" : "+targetTypeCheck);
}
}
}
else {
Ext.getCmp('sourcePicklistSelect').setDisabled(true);
}
});
cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().on("selectionchange", function () {
targetSelected = cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().getSelection()[0];
targetLength = cms.slimfast.admin.etl.targetPickListGrid.getSelectionModel().getSelection().length;
if (targetLength == 1) {
Ext.getCmp('targetPicklistSelect').setDisabled(false);
if (sourceTypeCheck != null) {
if (sourceTypeCheck != targetSelected.data['targetType']) {
Ext.Msg.alert( common.i18n.getDisplayValue("CLS_ALERT", "Alert"),
common.i18n.getDisplayValue("CLS_ALERT_DATA_TYPE"," Entries with different datatypes are being selected ")+ "<br><br>"+common.i18n.getDisplayValue("CLS_SOURCE_DATA_TYPE", "Source Data Type")+" : "+sourceTypeCheck+ "<br><br>"+ common.i18n.getDisplayValue("CLS_TARGET_DATA_TYPE", "Target Data Type")+" : "+targetSelected.data['targetType']);
}
}
}
else {
Ext.getCmp('targetPicklistSelect').setDisabled(true);
}
});
var addButton = new Ext.button.Button({
text: common.i18n.getDisplayValue(
"ADD_MAPPING",
"Add Mapping"
),
tooltip: 'Add Mapping ',
iconCls: 'add-new',
id: "cmsSlimfastAdminETLCustomMappingAddButton",
margin: "0 7 0 4",
handler: function () {
sourceTypeCheck=null;
targetTypeCheck=null;
cmsSlimfastAdminETLAddEntryWindowPanel = Ext.create('Ext.window.Window', {
title: common.i18n.getDisplayValue(
"MANAGE_ETL_CUSTOM_MAPPING",
'Manage ETL Custom Mapping'
),
id: 'cmsSlimfastAdminETLAddEntryWindow',
modal: true,
width: 580,
resizable: false,
padding: "10px 30px 30px 30px",
items: [cms.slimfast.admin.etl.createForm()]
}).show();
},
});
var editButton = new Ext.button.Button({
text: common.i18n.getDisplayValue(
"DMS_ADMN_CLM_TO_PREDED_EDIT_MAP",
"Edit Mapping"
),
tooltip: 'Edit ',
iconCls: 'DMS-Edit-big',
id: "cmsSlimfastAdminETLCustomMappingEditButton",
margin: "0 7 0 4",
disabled: true,
handler: function () {
sourceTypeCheck=null;
targetTypeCheck=null;
cmsSlimfastAdminETLEditEntryWindowPanel = Ext.create('Ext.window.Window', {
title: common.i18n.getDisplayValue(
"MANAGE_ETL_CUSTOM_MAPPING",
'Manage ETL Custom Mapping'
),
id: 'cmsSlimfastAdminETLEditEntryWindow',
modal: true,
width: 580,
resizable: false,
padding: "10px 30px 30px 30px",
items: [cms.slimfast.admin.etl.createForm(cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getSelectionModel().getSelected().items[0])]
}).show();
},
});
var deleteButton = new Ext.button.Button({
text: common.i18n.getDisplayValue(
"DELETE_MAPPING",
"Delete Mapping"
),
tooltip: 'Delete',
iconCls: 'remove-existing',
id: "cmsSlimfastAdminETLCustomMappingDeleteButton",
actionIdentifier: cms.slimfast.admin.etl.dataTypeId + ":" + cms.slimfast.admin.etl.menuId + ":cmsSlimfastETLDeleteCustomMapping",
disabled: true,
handler: function () {
Ext.Msg.confirm(common.i18n.getDisplayValue(
"COMMON_MSG_DELETE",
"Delete"
), common.i18n.getDisplayValue(
"DMS_CUST_ACCT_MAPPING_DEL_CNFM",
"Do you want to delete the mapping(s) ?"
), function (btn, text) {
if (btn == 'yes') {
var waitBox = Ext.MessageBox.wait(
common.i18n.getDisplayValue("COMMON_MSG_PLESE_WAIT", "Please wait"),
common.i18n.getDisplayValue("COMMON_MSG_DELETE", "Deleting Mapping Details")
);
var getData = cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getSelectionModel().getSelected().items
var delArray = [];
for (var i = 0; i < getData.length; i++) {
delArray.push(getData[i].get('pkCustomMappingId'));
}
Ext.Ajax.request({
url: resolveCollectionSlimfastPath('cmsSlimfastETLdeleteCustomMapping.do'),
method: 'POST',
params: {
selectedETLCustomMappingIds: delArray.join(),
},
success: function (result, request) {
var responseText = Ext.util.JSON.decode(result.responseText);
waitBox.hide();
if (responseText.success === false)
Ext.Msg.show({
title: common.i18n.getDisplayValue(
"COMMON_MSG_INFO",
"Info"
),
msg: common.i18n.getDisplayValue(
"RDC_UNABLE_DLT",
"Unable to Delete"
),
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR,
iconCls: 'icon'
});
//handling ui changes
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getStore().reload();
editButton.setDisabled(true);
deleteButton.setDisabled(true);
},
failure: function (result, request) {
waitBox.hide();
Ext.Msg.show({
title: common.i18n.getDisplayValue(
"COMMON_MSG_INFO",
"Info"
),
msg: common.i18n.getDisplayValue(
"RDC_UNABLE_DLT",
"Unable to Delete"
),
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR,
iconCls: 'icon'
});
}
});
} else {
return;
}
});
}
});
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getDockedComponent('toptoolbar').insert(11, '-');
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getDockedComponent('toptoolbar').insert(12, addButton);
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getDockedComponent('toptoolbar').insert(13, editButton);
cms.slimfast.admin.etl.ETLCustomMappingGridPanel.getDockedComponent('toptoolbar').insert(14, deleteButton);
//Span the grid to the entire screen
Ext.apply(cms.slimfast.admin.etl.ETLCustomMappingGridPanel, { forceFit: true });
return cms.slimfast.admin.etl.ETLCustomMappingGridPanel;
};
//-------------------------------------------------- Grid Panel ends -----------------------------------------------
// ------------------------------------------------- Main Panel ----------------------------------------------------
//--------------------------------------------------------------------------------------------------------------------
cms.slimfast.admin.etl.createView = function (attributes) {
cms.slimfast.admin.etl.dataTypeId = attributes.dataTypeId;
cms.slimfast.admin.etl.menuId = attributes.menuId;
var mainPanel = Ext.create("Ext.panel.Panel", {
title: common.i18n.getDisplayValue(
"MANAGE_ETL_CUSTOM_MAPPING",
'Manage ETL Custom Mapping'
),
itemId: "cmsslimfastadminetlcreateView-panel",
tabIdentifier: cms.slimfast.admin.etl.dataTypeId != null ? dms.common.accountIdNRoleId + ":" + cms.slimfast.admin.etl.menuId : undefined,
items: [cms.slimfast.admin.etl.gridPanel()],
});
return mainPanel;
};
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team