Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
inspectCreateNode : function(attr) {
attr.id = attr['catalog.id'];
attr.label = attr['catalog.label'];
attr.text = attr['catalog.id'] + " - " + attr['catalog.label'];
attr.code = attr['catalog.code'];
attr.status = attr['catalog.status'];
attr.cls = 'statustext-' + attr.status;
// create record and insert into own store
this.store.suspendEvents(false);
this.store.remove(this.store.getById(attr.id));
this.store.add([new this.recordClass(attr, attr.id)]);
this.store.resumeEvents();
}
});
inspectCreateNode : function(attr) {
attr.id = attr['catalog.id'];
attr.label = attr['catalog.label'];
attr.text = attr['catalog.id'] + " - " + attr['catalog.label'];
attr.code = attr['catalog.code'];
attr.status = attr['catalog.status'];
attr.cls = 'statustext-' + attr.status;
// create record and insert into own store
this.store.suspendEvents(false);
this.store.remove(this.store.getById(attr.id));
this.store.add([new this.recordClass(attr, attr.id)]);
this.store.resumeEvents();
}
});
var labelFcn = function(attr) {
return attr['catalog.label'] + ' (' + attr['catalog.code'] + ')';
}
onOpenEditWindow : function(action) {
var record = this.grid.getSelectionModel().getSelected();
var parentRecord = this.catalogStore.getById(record.data[this.parentIdProperty]);
parentRecord.data['status'] = parentRecord.data['catalog.status'];
parentRecord.data['label'] = parentRecord.data['catalog.label'];
parentRecord.data['code'] = parentRecord.data['catalog.code'];
var itemUi = Ext.ComponentMgr.create({
xtype : this.itemUiXType,
domain : this.domain,
record : action === 'add' ? null : parentRecord,
store : this.catalogStore,
listUI : this
});
itemUi.show();
},
getLabel : function(idx) {
var label = this.items[idx]['catalog.label'];
if(this.items[idx]['catalog.code']) {
label += ' (' + this.items[idx]['catalog.code'] + ')';
}
return label;
},
getLabel : function(idx) {
var label = this.items[idx]['catalog.label'];
if(this.items[idx]['catalog.code']) {
label += ' (' + this.items[idx]['catalog.code'] + ')';
}
return label;
},
onOpenEditWindow : function(action) {
var record = this.grid.getSelectionModel().getSelected();
var parentRecord = this.catalogStore.getById(record.data[this.parentIdProperty]);
parentRecord.data['status'] = parentRecord.data['catalog.status'];
parentRecord.data['label'] = parentRecord.data['catalog.label'];
parentRecord.data['code'] = parentRecord.data['catalog.code'];
var itemUi = Ext.ComponentMgr.create({
xtype : this.itemUiXType,
domain : this.domain,
record : action === 'add' ? null : parentRecord,
store : this.catalogStore,
listUI : this
});
itemUi.show();
},