I have recently inherited a project utilizing Sencha's ExtJS framework without any handover or documentation. As I navigate through the code, I find myself trying to decipher certain syntax and exploring resources tailored for newcomers to this specific framework.
Upon analyzing the codebase, I am puzzled by its functionality, such as:
if(val==1) {
Ext.getCmp('status').setText('AWAITING APPROV');
}
switch(flag) {
case 1: if(val==0) {
Ext.getCmp('complex_first').el.replaceCls('x-form-complex', 'x-form-simplex');
} else {
Ext.getCmp('complex_first').el.replaceCls('x-form-simplex', 'x-form-complex');
}
break;
case 2: if(val==0) {
Ext.getCmp('complex_second').el.replaceCls('x-form-complex', 'x-form-simplex');
} else {
Ext.getCmp('complex_second').el.replaceCls('x-form-simplex', 'x-form-complex');
}
break;
default: break;
}
Although proficient in jQuery, I feel slightly lost when comparing it to ExtJS. Specifically, I am questioning the purpose of the following lines:
Ext.getCmp('status')
Ext.getCmp('complex_first').el.replaceCls('x-form-complex', 'x-form-simplex');
Ext.getCmp('complex_first').el.replaceCls('x-form-simplex', 'x-form-complex');
Are these referring to classes or div IDs, and should I be looking into the codebase or CSS files for further insights?