lib/generators/mobile_application/templates/public/app.js.erb in erp_app-3.1.5 vs lib/generators/mobile_application/templates/public/app.js.erb in erp_app-3.1.6
- old
+ new
@@ -1,35 +1,24 @@
-Ext.ns('Compass.ErpApp.Mobile.<%=class_name %>');
-
-Ext.application({
- name: '<%=class_name %>',
- useLoadMask: true,
- launch: function () {
- Ext.create("Ext.Container", {
- fullscreen: true,
- html:'Your New Mobile Application',
- items: [
- {
- xtype:'toolbar',
- ui:'light',
- docked:'top',
+Ext.define('Compass.ErpApp.Mobile.<%= class_name %>.Application', {
+ extend: 'Ext.Panel',
+ xtype: 'compass-erpapp-mobile-<%= file_name %>-application',
+ config:{
+ tabBarPosition: 'bottom',
items:[
- {
- text:'Home',
- ui:'back',
- handler:function(btn){
- window.location = '/erp_app/mobile';
- }
- },
- {
- text:'Logout',
- ui:'round',
- handler:function(btn){
- window.location = '/session/sign_out?login_url=/erp_app/mobile/login';
- }
- }
- ]
- }
- ]
- });
- }
-});
+ {
+ xtype: 'toolbar',
+ ui: 'light',
+ docked: 'top',
+ items: [
+ {
+ text: 'Home',
+ ui: 'back',
+ handler: function (btn) {
+ btn.up('#mainContainer').setActiveItem('#home');
+ }
+ }
+ ]
+ }
+ ],
+ html:'Hello World'
+ }
+});
\ No newline at end of file