+++ /dev/null
-/*\r
- * Ext JS Library 2.2.1\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * licensing@extjs.com\r
- * \r
- * http://extjs.com/license\r
- */\r
-\r
-Ext.ns('App');\r
-\r
-App.EmployeeDetails = Ext.extend(Ext.Panel, {\r
- startingText: 'Please select an employee.',\r
- initComponent: function() {\r
- this.tpl = Ext.XTemplate.from('employeeDetailTpl');\r
- this.html = this.startingText;\r
- App.EmployeeDetails.superclass.initComponent.call(this);\r
- },\r
- load: function(config) {\r
- var config = config || {};\r
- Ext.apply(config, {\r
- url: this.url,\r
- success: this.onLoad,\r
- failure: this.onFailure,\r
- scope: this\r
- });\r
- this.getEl().mask('Loading...');\r
- Ext.Ajax.request(config);\r
- },\r
- onLoad: function(response, opts) {\r
- var json = Ext.decode(response.responseText);\r
- this.tpl.overwrite(this.body, json);\r
- this.getEl().unmask();\r
- },\r
- onFailure: function() {\r
- this.getEl().unmask();\r
- Ext.Msg.alert('Fail', 'Request failed.');\r
- }\r
-});\r
-Ext.reg('employeedetails', App.EmployeeDetails);\r