Application.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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.tip.QuickTipManager.init(null, {
  15. showOnTap: true
  16. });
  17. if (!Ext.platformTags.test) {
  18. Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));
  19. }
  20. },
  21. launch: function () {
  22. var view = 'uas.view.main.Main';
  23. this.setMainView({
  24. xclass: view
  25. });
  26. },
  27. onAppUpdate: function () {
  28. Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
  29. function (choice) {
  30. if (choice === 'yes') {
  31. window.location.reload();
  32. }
  33. }
  34. );
  35. }
  36. });