Application.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * @Description:
  3. * @Author: hy
  4. * @Date: 2019-08-12 17:59:33
  5. * @LastEditTime: 2019-08-13 14:05:09
  6. */
  7. Ext.define('uas.Application', {
  8. extend: 'Ext.app.Application',
  9. name: 'uas',
  10. controllers: [
  11. 'Global',
  12. ],
  13. defaultToken: '',
  14. init: function() {
  15. Ext.tip.QuickTipManager.init(null, {
  16. showOnTap: true
  17. });
  18. if (!Ext.platformTags.test) {
  19. Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider',{
  20. expires: new Date(new Date().getTime()+(1000*60*60*24*30)) //30 days
  21. }));
  22. }
  23. },
  24. launch: function () {
  25. var view = 'uas.view.main.Main';
  26. this.setMainView({
  27. xclass: view
  28. });
  29. },
  30. onAppUpdate: function () {
  31. Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
  32. function (choice) {
  33. if (choice === 'yes') {
  34. window.location.reload();
  35. }
  36. }
  37. );
  38. }
  39. });