__init__.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. App.Ajax.request('MAIN.about', {}, function(reply) {
  2. if (reply) {
  3. App.Settings.VestaAbout.company_name = reply.data.company_name;
  4. App.Settings.VestaAbout.company_email = reply.data.company_email;
  5. App.Settings.VestaAbout.version = reply.data.version;
  6. App.Settings.VestaAbout.version_name = reply.data.version_name;
  7. }
  8. });
  9. $('document').ready(function() {
  10. try {
  11. App.Utils.detectBrowser();
  12. App.Ref.init();
  13. //App.Env.world = 'USER';
  14. // Disabled cookie tab restoring. Enable if needed
  15. if ('undefined' != typeof App.Tmp.loadTAB) {
  16. App.Env.world = App.Tmp.loadTAB;
  17. }
  18. if ('undefined' == typeof App.Tmp.loadTAB && cookieEnabled()) {
  19. var tab = getCookie('tab');
  20. if (null != tab && $.inArray(tab, App.Constants.TABS)) {
  21. App.Env.world = tab;
  22. }
  23. else {
  24. App.Env.world = App.Constants.TABS[0];
  25. }
  26. }
  27. App.Pages.init();
  28. App.Core.listen();
  29. App.Core.initMenu();
  30. App.Helpers.liveValidate();
  31. $(document).bind('submit', function(evt) {
  32. evt.preventDefault();
  33. });
  34. }
  35. catch(e) {
  36. fb.error(e);
  37. }
  38. });