Created
September 26, 2012 05:05
-
-
Save brian428/3786196 to your computer and use it in GitHub Desktop.
MainController.coffee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define( "JasmineExample.controller.MainController", | |
extend: "Deft.mvc.ViewController" | |
control: | |
companyGridPanel: | |
selectionchange: "onCompanySelected" | |
panel2: {} | |
config: | |
currentCompany: null | |
init: -> | |
@callParent( arguments ) | |
###* | |
* Update the title for one of the tab panels | |
* @param title The new title for the panel. | |
### | |
updatePanelTitle: ( title ) -> | |
@getPanel2().title = title | |
###* | |
* Update the current company when the grid selection changes. | |
* @param selectionModel The type of SelectionModel in use by the grid. | |
* @param model An array of Model instances that were selected. | |
* @param index The row index of the selection. | |
### | |
onCompanySelected: ( selectionModel, model, index ) -> | |
@setCurrentCompany( model[ 0 ] ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment