Application.js 992 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * The main application class. An instance of this class is created by app.js when it
  3. * calls Ext.application(). This is the ideal place to handle application launch and
  4. * initialization details.
  5. */
  6. Ext.define('uas.Application', {
  7. extend: 'Ext.app.Application',
  8. name: 'uas',
  9. controllers: [
  10. 'Global',
  11. ],
  12. defaultToken: '',
  13. init: function() {
  14. Ext.create('uas.store.Navigation', {
  15. storeId: 'navigation'
  16. });
  17. Ext.tip.QuickTipManager.init(null, {
  18. showOnTap: true
  19. });
  20. if (!Ext.platformTags.test) {
  21. Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
  22. }
  23. },
  24. onAppUpdate: function () {
  25. Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
  26. function (choice) {
  27. if (choice === 'yes') {
  28. window.location.reload();
  29. }
  30. }
  31. );
  32. }
  33. });