Application.js 1.1 KB

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