Refactor project structure
This commit is contained in:
34
web/modules/reports/lib.js
Normal file
34
web/modules/reports/lib.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Author: Thilina Hasantha
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* UserReportAdapter
|
||||
*/
|
||||
|
||||
|
||||
function UserReportAdapter(endPoint,tab,filter,orderBy) {
|
||||
this.initAdapter(endPoint,tab,filter,orderBy);
|
||||
this._construct();
|
||||
}
|
||||
|
||||
UserReportAdapter.inherits(ReportAdapter);
|
||||
|
||||
UserReportAdapter.method('renderForm', function(object) {
|
||||
var that = this;
|
||||
this.processFormFieldsWithObject(object);
|
||||
if(this.remoteFieldsExists){
|
||||
var cb = function(){
|
||||
that.renderFormNew(object);
|
||||
};
|
||||
this.initFieldMasterData(cb);
|
||||
}else{
|
||||
this.initFieldMasterData();
|
||||
that.renderFormNew(object);
|
||||
}
|
||||
|
||||
this.currentReport = object;
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user