Created
October 3, 2008 20:19
-
-
Save ttdonovan/14633 to your computer and use it in GitHub Desktop.
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
| CDFleet.applicationController = SC.Object.create( | |
| /** @scope CDFleet.applicationController */ { | |
| startup: function () { | |
| var main_menu = CDFleet.CDMainMenu.find('Main Menu'); // get object model data | |
| var buttons = main_menu.get('buttons'); | |
| CDFleet.mainMenuController.set('content', buttons); // update content of main menu array controller | |
| console.log(CDFleet.mainMenuController.toString(), CDFleet.mainMenuController.get('length')); // length is 10 | |
| SC.page.get('contentView').set('content', SC.page.get('desktopView')); | |
| } | |
| }) ; |
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
| <% view :desktop_view do %> | |
| <% view :header, :class => 'sc-header sc-square-theme' do %> | |
| <%= view :main_menu_view, :view => 'CDFleet.CDMainMenuView', :bind => { :content => 'CDFleet.mainMenuController.arrangedObjects' } %> | |
| <% end %> <!-- header --> | |
| <% view :workspace, :class => 'sc-app-workspace header' do %> | |
| <% end %> <!-- workspace --> | |
| <% view :footer, :class => 'sc-footer sc-square-theme' do %> | |
| <% end %> <!-- footer --> | |
| <% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment