//override to allow varaiable length arguments Ext.override(Ext.direct.RemotingProvider,{ doCall : function(c, m, args){ //last arg is a function if(typeof args[args.length - 1] === 'function'){ //console.log('last arg is fn'); m.len = args.length - 1; } //2nd to last arg is a function else if(args.length > 1 && typeof args[args.length - 2] === 'function'){ //console.log('last arg is scope'); m.len = args.length - 2; } //otherwise there's no callback else{ //console.log('no callback'); m.len = args.length; } var data = null, hs = args[m.len], scope = args[m.len+1]; if(m.len !== 0){ data = args.slice(0, m.len); } var t = new Ext.Direct.Transaction({ provider: this, args: args, action: c, method: m.name, data: data, cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs }); if(this.fireEvent('beforecall', this, t) !== false){ Ext.Direct.addTransaction(t); this.queueTransaction(t); this.fireEvent('call', this, t); } } }); Ext.ns('Ext.app.api');Ext.app.api.desc = {"actions":{"CategoryService":[{"name":"listCatHits","len":1},{"name":"listCategories","len":0},{"name":"listTopCats","len":1},{"name":"getProductCount","len":2},{"name":"save","len":1,"formHandler":true},{"name":"listStats","len":0},{"name":"fetchCategoryTreeNodes","len":3},{"name":"listNested","len":2},{"name":"listByPropertyMap","len":7},{"name":"list","len":6},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"ProductService":[{"name":"listProductHits","len":1},{"name":"list","len":8},{"name":"print","len":0},{"name":"setProductStatus","len":2},{"name":"listTopProducts","len":1},{"name":"copy","len":1}],"SpecService":[{"name":"save","len":0,"formHandler":true},{"name":"viewAttachment","len":2},{"name":"editAttachment","len":3},{"name":"listAvailable","len":1},{"name":"removeAttachment","len":2},{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"auth":[{"name":"authenticate","len":2}],"AuthLDAPService":[{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"make","len":0},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"ACLService":[{"name":"listWithPermissions","len":15},{"name":"listPermissionsByClass","len":6},{"name":"listAllObjectACLs","len":3},{"name":"listAvailableRoles","len":4},{"name":"listAvailableUsers","len":3},{"name":"listPrivileges","len":5},{"name":"listAvailableOrgs","len":3},{"name":"getImplementedPermissions","len":2},{"name":"listObjectACLs","len":3},{"name":"listAvailableGroups","len":4},{"name":"listAllACLs","len":6},{"name":"listAvailablePermissions","len":1},{"name":"listTypes","len":2},{"name":"listStatus","len":2},{"name":"listRoles","len":2},{"name":"listAvailableStates","len":2},{"name":"listPermissions","len":0},{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"TypeService":[{"name":"read","len":0},{"name":"list","len":6},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0}],"FileService":[{"name":"write","len":2}],"AppService":[{"name":"copy","len":1},{"name":"listTopApps","len":1},{"name":"exportPDF","len":1},{"name":"save","len":1,"formHandler":true},{"name":"viewAttachment","len":2},{"name":"listStats","len":0},{"name":"listAppHits","len":1},{"name":"getByDDocName","len":1},{"name":"workflowRejectAs","len":3},{"name":"workflowApproveAs","len":6},{"name":"getByDId","len":1},{"name":"reassign","len":2},{"name":"expire","len":0},{"name":"addComment","len":3,"formHandler":true},{"name":"get","len":1},{"name":"submit","len":2,"formHandler":true},{"name":"listByPropertyMap","len":7},{"name":"list","len":6},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"readByProperty","len":2},{"name":"destroy","len":0}],"ImplementsService":[{"name":"read","len":0},{"name":"list","len":6},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0}],"UserService":[{"name":"addToGroup","len":2},{"name":"create","len":0},{"name":"listEvaluators","len":0},{"name":"register","len":0},{"name":"update","len":0},{"name":"removeFromGroup","len":2},{"name":"authenticate","len":2},{"name":"listActivity","len":0},{"name":"getCurrentUser","len":0},{"name":"resetPassword","len":1,"formHandler":true},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"make","len":0},{"name":"listByProperty","len":8},{"name":"destroy","len":0},{"name":"get","len":0}],"StatusService":[{"name":"read","len":0},{"name":"list","len":6},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0}],"AuthService":[{"name":"authenticate","len":2}],"GroupService":[{"name":"listUsersInGroup","len":1},{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"OrgService":[{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"make","len":0},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"PermissionService":[{"name":"read","len":0},{"name":"list","len":6},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0}],"groups":[{"name":"listUsersInGroup","len":1},{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"ExpertiseService":[{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"acls":[{"name":"listWithPermissions","len":15},{"name":"listPermissionsByClass","len":6},{"name":"listAllObjectACLs","len":3},{"name":"listAvailableRoles","len":4},{"name":"listAvailableUsers","len":3},{"name":"listPrivileges","len":5},{"name":"listAvailableOrgs","len":3},{"name":"getImplementedPermissions","len":2},{"name":"listObjectACLs","len":3},{"name":"listAvailableGroups","len":4},{"name":"listAllACLs","len":6},{"name":"listAvailablePermissions","len":1},{"name":"listTypes","len":2},{"name":"listStatus","len":2},{"name":"listRoles","len":2},{"name":"listAvailableStates","len":2},{"name":"listPermissions","len":0},{"name":"listByPropertyMap","len":7},{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"create","len":0},{"name":"listByProperty","len":8},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"orgs":[{"name":"read","len":0},{"name":"save","len":0,"formHandler":true},{"name":"list","len":6},{"name":"make","len":0},{"name":"create","len":0},{"name":"update","len":0},{"name":"destroy","len":0},{"name":"get","len":0}],"StellentService":[{"name":"listWorkflowDocs","len":2},{"name":"listAppsInWorkflow","len":0},{"name":"listAllWorkflowDocs","len":2},{"name":"ping","len":3}]},"type":"remoting","url":"direct\/router.cfm","namespace":"Ext.app.api"}; //setup the provider var provider = Ext.Direct.addProvider(Ext.app.api.desc); //handle provider exceptions provider.on('data', function(provider, e){ if (e.type === 'exception') { if(Ext.app.debug){ var win = new Ext.Window({ title:e.message, iconCls:'icon_error', width: 640, height: 480, html: e.message + '

' + e.detail + '

' + e.stackTrace + '

' + e.tagContext, frame: true, autoScroll: true, maximizable: true, buttonAlign: 'right', buttons: [{ text: 'Close', iconCls:'icon_cross', handler: function(){ win.close(); } }] }).show(); }else{ Ext.Msg.alert(e.message || 'Error', e.detail || e.message || 'An unknown error has occured.'); /* //this is more robust than Ext.Msg var win = new Ext.Window({ cls:'x-window-dlg x-window-plain', resizable:false, iconCls:'icon_error', title: e.message || 'Error', modal:true, html:e.detail || e.message || 'An unknown error has occured.', buttonAlign:'center', buttons: [{ text: 'OK', handler: function(){ win.close(); } }] }).show(); */ } } }, this); Ext.app.api.permissions = {"2":{"NAME":"LIST","DESCRIPTION":"","PERMISSIONID":2,"APPLIESTOOBJECTS":0,"LABEL":"List"},"CREATE":1,"256":{"NAME":"APPROVE","DESCRIPTION":"","PERMISSIONID":256,"APPLIESTOOBJECTS":1,"LABEL":"Approve"},"512":{"NAME":"REJECT","DESCRIPTION":"","PERMISSIONID":512,"APPLIESTOOBJECTS":1,"LABEL":"Reject"},"DELETE":16,"1":{"NAME":"CREATE","DESCRIPTION":"","PERMISSIONID":1,"APPLIESTOOBJECTS":0,"LABEL":"Create"},"QUALIFY":2048,"MANAGE":8192,"RUNAS":64,"4096":{"NAME":"COPY","DESCRIPTION":"","PERMISSIONID":4096,"APPLIESTOOBJECTS":1,"LABEL":"Copy"},"REJECT":512,"READ":4,"2048":{"NAME":"QUALIFY","DESCRIPTION":"","PERMISSIONID":2048,"APPLIESTOOBJECTS":1,"LABEL":"Qualify"},"4":{"NAME":"READ","DESCRIPTION":"","PERMISSIONID":4,"APPLIESTOOBJECTS":1,"LABEL":"Read"},"WRITE":8,"32":{"NAME":"ADMIN","DESCRIPTION":"","PERMISSIONID":32,"APPLIESTOOBJECTS":1,"LABEL":"Admin"},"64":{"NAME":"RUNAS","DESCRIPTION":"","PERMISSIONID":64,"APPLIESTOOBJECTS":1,"LABEL":"Run as"},"COPY":4096,"32768":{"NAME":"ADD_NOTES","DESCRIPTION":"","PERMISSIONID":32768,"APPLIESTOOBJECTS":1,"LABEL":"Add DOT Notes"},"REVIEW":1024,"8":{"NAME":"WRITE","DESCRIPTION":"","PERMISSIONID":8,"APPLIESTOOBJECTS":1,"LABEL":"Write"},"LIST":2,"16384":{"NAME":"ADD_COMMENT","DESCRIPTION":"","PERMISSIONID":16384,"APPLIESTOOBJECTS":1,"LABEL":"Add Extra Comment"},"SUBMIT":128,"ADMIN":32,"8192":{"NAME":"MANAGE","DESCRIPTION":"","PERMISSIONID":8192,"APPLIESTOOBJECTS":0,"LABEL":"Manage"},"16":{"NAME":"DELETE","DESCRIPTION":"","PERMISSIONID":16,"APPLIESTOOBJECTS":1,"LABEL":"Delete"},"128":{"NAME":"SUBMIT","DESCRIPTION":"","PERMISSIONID":128,"APPLIESTOOBJECTS":1,"LABEL":"Submit"},"ADD_NOTES":32768,"APPROVE":256,"1024":{"NAME":"REVIEW","DESCRIPTION":"","PERMISSIONID":1024,"APPLIESTOOBJECTS":0,"LABEL":"Review"},"ADD_COMMENT":16384}; Ext.app.api.status = {"ACTIVE":{"STATUSID":16384,"NAME":"ACTIVE","DESCRIPTION":"Activated","LABEL":"Active"},"16384":{"STATUSID":16384,"NAME":"ACTIVE","DESCRIPTION":"Activated","LABEL":"Active"},"MANUFACTURER":{"STATUSID":512,"NAME":"MANUFACTURER","DESCRIPTION":"This application is in the Manufacturer step","LABEL":"Manufacturer"},"DELETED":{"STATUSID":8192,"NAME":"DELETED","DESCRIPTION":"","LABEL":"Deleted"},"1":{"STATUSID":1,"NAME":"DRAFT","DESCRIPTION":"This is a draft copy","LABEL":"Draft"},"EVALUATOR":{"STATUSID":2048,"NAME":"EVALUATOR","DESCRIPTION":"This application is in the Evaluator step","LABEL":"Evaluator"},"512":{"STATUSID":512,"NAME":"MANUFACTURER","DESCRIPTION":"This application is in the Manufacturer step","LABEL":"Manufacturer"},"4096":{"STATUSID":4096,"NAME":"MATERIALS","DESCRIPTION":"This application is in the Materials Engineer step","LABEL":"Materials"},"QUALIFIED":{"STATUSID":16,"NAME":"QUALIFIED","DESCRIPTION":"This application has been approved and is on the QPL","LABEL":"Qualified Product"},"EXPIRED":{"STATUSID":64,"NAME":"EXPIRED","DESCRIPTION":"This application has expired","LABEL":"Expired"},"8":{"STATUSID":8,"NAME":"UPDATE","DESCRIPTION":"A reviewer has asked for corrections to this application","LABEL":"Update Requested"},"2":{"STATUSID":2,"NAME":"SUBMITTED","DESCRIPTION":"This application has been submitted for review","LABEL":"Submitted"},"4":{"STATUSID":4,"NAME":"REVIEW","DESCRIPTION":"This application is in review","LABEL":"Review"},"2048":{"STATUSID":2048,"NAME":"EVALUATOR","DESCRIPTION":"This application is in the Evaluator step","LABEL":"Evaluator"},"32":{"STATUSID":32,"NAME":"REJECTED","DESCRIPTION":"This application has been rejected","LABEL":"Rejected"},"ANY":{"STATUSID":0,"NAME":"ANY","DESCRIPTION":"Any","LABEL":"Any"},"64":{"STATUSID":64,"NAME":"EXPIRED","DESCRIPTION":"This application has expired","LABEL":"Expired"},"DISABLED":{"STATUSID":256,"NAME":"DISABLED","DESCRIPTION":"Disabled","LABEL":"Disabled"},"DRAFT":{"STATUSID":1,"NAME":"DRAFT","DESCRIPTION":"This is a draft copy","LABEL":"Draft"},"32768":{"STATUSID":32768,"NAME":"ENABLED","DESCRIPTION":"Enabled","LABEL":"Enabled"},"REVIEW":{"STATUSID":4,"NAME":"REVIEW","DESCRIPTION":"This application is in review","LABEL":"Review"},"REMOVED":{"STATUSID":128,"NAME":"REMOVED","DESCRIPTION":"This product has been removed from the QPL","LABEL":"Removed"},"UPDATE":{"STATUSID":8,"NAME":"UPDATE","DESCRIPTION":"A reviewer has asked for corrections to this application","LABEL":"Update Requested"},"256":{"STATUSID":256,"NAME":"DISABLED","DESCRIPTION":"Disabled","LABEL":"Disabled"},"SUBMITTED":{"STATUSID":2,"NAME":"SUBMITTED","DESCRIPTION":"This application has been submitted for review","LABEL":"Submitted"},"0":{"STATUSID":0,"NAME":"ANY","DESCRIPTION":"Any","LABEL":"Any"},"128":{"STATUSID":128,"NAME":"REMOVED","DESCRIPTION":"This product has been removed from the QPL","LABEL":"Removed"},"16":{"STATUSID":16,"NAME":"QUALIFIED","DESCRIPTION":"This application has been approved and is on the QPL","LABEL":"Qualified Product"},"MATERIALS":{"STATUSID":4096,"NAME":"MATERIALS","DESCRIPTION":"This application is in the Materials Engineer step","LABEL":"Materials"},"8192":{"STATUSID":8192,"NAME":"DELETED","DESCRIPTION":"","LABEL":"Deleted"},"ENABLED":{"STATUSID":32768,"NAME":"ENABLED","DESCRIPTION":"Enabled","LABEL":"Enabled"},"COORDINATOR":{"STATUSID":1024,"NAME":"COORDINATOR","DESCRIPTION":"This application is in the Coordinator step","LABEL":"Coordinator"},"1024":{"STATUSID":1024,"NAME":"COORDINATOR","DESCRIPTION":"This application is in the Coordinator step","LABEL":"Coordinator"},"REJECTED":{"STATUSID":32,"NAME":"REJECTED","DESCRIPTION":"This application has been rejected","LABEL":"Rejected"}}; Ext.app.api.types = {"acl.Implements":{"hasStatus":0,"typeId":4,"hasCreator":0,"clsName":"acl.Implements","hasOrg":0,"pkName":"implementsId","tableName":"implements"},"14":{"hasStatus":1,"typeId":14,"hasCreator":1,"clsName":"app.Attachment","hasOrg":0,"pkName":"attachmentId","tableName":"attachments"},"acl.Status":{"hasStatus":0,"typeId":3,"hasCreator":0,"clsName":"acl.Status","hasOrg":0,"pkName":"statusId","tableName":"status"},"5":{"hasStatus":0,"typeId":5,"hasCreator":0,"clsName":"acl.ACL","hasOrg":0,"pkName":"aclId","tableName":"acls"},"4":{"hasStatus":0,"typeId":4,"hasCreator":0,"clsName":"acl.Implements","hasOrg":0,"pkName":"implementsId","tableName":"implements"},"13":{"hasStatus":1,"typeId":13,"hasCreator":1,"clsName":"app.App","hasOrg":1,"pkName":"appId","tableName":"applications"},"spec.Spec":{"hasStatus":0,"typeId":11,"hasCreator":0,"clsName":"spec.Spec","hasOrg":0,"pkName":"specId","tableName":"specs"},"6":{"hasStatus":1,"typeId":6,"hasCreator":1,"clsName":"user.User","hasOrg":1,"pkName":"userId","tableName":"users"},"org.Org":{"hasStatus":1,"typeId":8,"hasCreator":1,"clsName":"org.Org","hasOrg":1,"pkName":"orgId","tableName":"orgs"},"group.Group":{"hasStatus":1,"typeId":7,"hasCreator":1,"clsName":"group.Group","hasOrg":1,"pkName":"groupId","tableName":"groups"},"11":{"hasStatus":0,"typeId":11,"hasCreator":0,"clsName":"spec.Spec","hasOrg":0,"pkName":"specId","tableName":"specs"},"7":{"hasStatus":1,"typeId":7,"hasCreator":1,"clsName":"group.Group","hasOrg":1,"pkName":"groupId","tableName":"groups"},"15":{"hasStatus":0,"typeId":15,"hasCreator":0,"clsName":"expertise.Expertise","hasOrg":0,"pkName":"expertiseId","tableName":"expertise"},"10":{"hasStatus":0,"typeId":10,"hasCreator":0,"clsName":"category.Category","hasOrg":0,"pkName":"categoryId","tableName":"categories"},"acl.ACL":{"hasStatus":0,"typeId":5,"hasCreator":0,"clsName":"acl.ACL","hasOrg":0,"pkName":"aclId","tableName":"acls"},"app.App":{"hasStatus":1,"typeId":13,"hasCreator":1,"clsName":"app.App","hasOrg":1,"pkName":"appId","tableName":"applications"},"acl.Permission":{"hasStatus":0,"typeId":2,"hasCreator":0,"clsName":"acl.Permission","hasOrg":0,"pkName":"permissionId","tableName":"permissions"},"user.User":{"hasStatus":1,"typeId":6,"hasCreator":1,"clsName":"user.User","hasOrg":1,"pkName":"userId","tableName":"users"},"WORKFLOW":{"hasStatus":0,"typeId":17,"hasCreator":0,"clsName":"WORKFLOW","hasOrg":0,"pkName":"","tableName":""},"expertise.Expertise":{"hasStatus":0,"typeId":15,"hasCreator":0,"clsName":"expertise.Expertise","hasOrg":0,"pkName":"expertiseId","tableName":"expertise"},"3":{"hasStatus":0,"typeId":3,"hasCreator":0,"clsName":"acl.Status","hasOrg":0,"pkName":"statusId","tableName":"status"},"1":{"hasStatus":0,"typeId":1,"hasCreator":0,"clsName":"acl.Type","hasOrg":0,"pkName":"typeId","tableName":"types"},"acl.Type":{"hasStatus":0,"typeId":1,"hasCreator":0,"clsName":"acl.Type","hasOrg":0,"pkName":"typeId","tableName":"types"},"QPL":{"hasStatus":0,"typeId":16,"hasCreator":0,"clsName":"QPL","hasOrg":0,"pkName":"","tableName":""},"12":{"hasStatus":1,"typeId":12,"hasCreator":1,"clsName":"spec.Attachment","hasOrg":0,"pkName":"attachmentId","tableName":"specAttachments"},"app.Attachment":{"hasStatus":1,"typeId":14,"hasCreator":1,"clsName":"app.Attachment","hasOrg":0,"pkName":"attachmentId","tableName":"attachments"},"9":{"hasStatus":1,"typeId":9,"hasCreator":1,"clsName":"auth.AuthLDAP","hasOrg":1,"pkName":"orgId","tableName":"authLDAP"},"8":{"hasStatus":1,"typeId":8,"hasCreator":1,"clsName":"org.Org","hasOrg":1,"pkName":"orgId","tableName":"orgs"},"16":{"hasStatus":0,"typeId":16,"hasCreator":0,"clsName":"QPL","hasOrg":0,"pkName":"","tableName":""},"2":{"hasStatus":0,"typeId":2,"hasCreator":0,"clsName":"acl.Permission","hasOrg":0,"pkName":"permissionId","tableName":"permissions"},"0":{"hasStatus":0,"typeId":0,"hasCreator":0,"clsName":"Any","hasOrg":0,"pkName":"any","tableName":"any"},"auth.AuthLDAP":{"hasStatus":1,"typeId":9,"hasCreator":1,"clsName":"auth.AuthLDAP","hasOrg":1,"pkName":"orgId","tableName":"authLDAP"},"Any":{"hasStatus":0,"typeId":0,"hasCreator":0,"clsName":"Any","hasOrg":0,"pkName":"any","tableName":"any"},"spec.Attachment":{"hasStatus":1,"typeId":12,"hasCreator":1,"clsName":"spec.Attachment","hasOrg":0,"pkName":"attachmentId","tableName":"specAttachments"},"category.Category":{"hasStatus":0,"typeId":10,"hasCreator":0,"clsName":"category.Category","hasOrg":0,"pkName":"categoryId","tableName":"categories"},"17":{"hasStatus":0,"typeId":17,"hasCreator":0,"clsName":"WORKFLOW","hasOrg":0,"pkName":"","tableName":""}}; Ext.app.api.roles = {"SELF":3,"4":"CREATOR","GROUP":2,"3":"SELF","PUBLIC":5,"6":"AUTHENTICATED","1":"USER","ORG_ADMINS":8,"CREATOR":4,"5":"PUBLIC","AUTHENTICATED":6,"2":"GROUP","7":"ORG_USERS","USER":1,"ORG_USERS":7,"8":"ORG_ADMINS"}; Ext.app.api.permits = function(permission,permissions){ return !!(Ext.app.api.permissions[permission] & (permissions || 0)); } Ext.app.api.getStatus = function(statusId){ //console.log('Status?' + Ext.app.api.status[this.get('statusId')].NAME || 'UNKNOWN'); return Ext.app.api.status[statusId].NAME || 'UNKNOWN'; } Ext.app.api.statusRenderer = function(statusId){ return Ext.app.api.status[statusId].LABEL; } Ext.override(Ext.data.Record,{ permits: function(permission){ //console.log('Permits ' + permission + ' in state ' + (Ext.app.api.status[this.get('statusId')].NAME || 'UNKNOWN') + ' with permissions ' + (this.json && this.json.permissions || 0) + '? ' + !!(Ext.app.api.permissions[permission] & (this.json && this.json.permissions || 0))); return !!(Ext.app.api.permissions[permission] & (this.json && this.json.permissions || 0)); }, getStatus: function(){ //console.log('Status?' + Ext.app.api.status[this.get('statusId')].NAME || 'UNKNOWN'); return Ext.app.api.status[this.get('statusId')].NAME || 'UNKNOWN'; }, setStatus: function(status){ this.set('statusId',Ext.app.api.status[status].STATUSID); } });