/** * This class is the controller for the main view for the application. It is specified as * the "controller" of the Main view class. */ Ext.define('saas.view.main.MainController', { extend: 'Ext.app.ViewController', alias: 'controller.main', onToggleNavigationSize: function () { var me = this, refs = me.getReferences(), navigationList = refs.navigationTreeList, navCollapsed = !navigationList.navCollapsed, new_width = navCollapsed ? 64 : 160, ope = navCollapsed ? 'addCls' : 'removeCls'; refs.mainLogo.animate({dynamic: true, to: {width: new_width}}); navigationList.body.animate({dynamic: true, to: {width: new_width}}); navigationList.animate({dynamic: true, to: {width: new_width}}); navigationList.el[ope]('nav-collapsed'); navigationList.navCollapsed = navCollapsed; } });