x_ie.js 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * Created by TOMMY on 2015/11/14.
  3. */
  4. layout = (window["layout"]) ? window["layout"] : {};
  5. var locate = window.location;
  6. layout.protocol = locate.protocol;
  7. var href = locate.href;
  8. if (href.indexOf("debugger")!=-1) layout["debugger"] = true;
  9. COMMON.DOM.addReady(function(){
  10. var loadingNode = $("browser_loadding");
  11. var errorNode = $("browser_error");
  12. if (Browser.name=="ie" && Browser.version<7){
  13. if (loadingNode) loadingNode.setStyle("display", "none");
  14. if (errorNode) errorNode.setStyle("display", "block");
  15. return false;
  16. }else{
  17. if (Browser.name=="ie" && Browser.version<10){
  18. WebSocket = window.WebSocket||{};
  19. FormData = window.FormData||{};
  20. HTMLCanvasElement = window.HTMLCanvasElement||{};
  21. layout["debugger"] = true;
  22. }
  23. }
  24. if (errorNode) errorNode.destroy();
  25. COMMON.setContentPath("../x_desktop");
  26. COMMON.AjaxModule.load("../o2_lib/mootools/plugin/mBox.Notice.js", function(){
  27. COMMON.AjaxModule.load("../o2_lib/mootools/plugin/mBox.Tooltip.js", function(){
  28. COMMON.AjaxModule.load("mwf", function(){
  29. MWF.getJSON("res/config/config.json", function(config){
  30. if (config.proxyCenterEnable){
  31. if (o2.typeOf(config.center)==="array"){
  32. config.center.forEach(function(c){
  33. c.port = window.location.port || 80;
  34. });
  35. }else{
  36. config.port = window.location.port || 80;
  37. }
  38. }
  39. layout.config = config;
  40. document.title = layout.config.systemTitle || layout.config.systemName;
  41. //MWF.defaultPath = "../x_desktop"+MWF.defaultPath;
  42. MWF.loadLP("zh-cn");
  43. MWF.require("MWF.xDesktop.Layout", function(){
  44. layout.desktop = new MWF.xDesktop.Layout("layout", {
  45. "style": "default",
  46. "onLoad": function(){
  47. if (loadingNode){
  48. new Fx.Tween(loadingNode).start("opacity", 0).chain(function(){
  49. loadingNode.destroy();
  50. });
  51. }
  52. },
  53. "onLogin": function(){
  54. if (loadingNode){
  55. new Fx.Tween(loadingNode).start("opacity", 0).chain(function(){
  56. loadingNode.destroy();
  57. });
  58. }
  59. }
  60. });
  61. });
  62. }, false);
  63. });
  64. });
  65. });
  66. //
  67. //
  68. // if (Browser.name=="ie" && Browser.version<7){
  69. // if (loadingNode) loadingNode.setStyle("display", "none");
  70. // if (errorNode) errorNode.setStyle("display", "block");
  71. // }else if (!WebSocket || !FormData || !HTMLCanvasElement){
  72. // if (loadingNode) loadingNode.setStyle("display", "none");
  73. // if (errorNode) errorNode.setStyle("display", "block");
  74. // }else{
  75. //
  76. // }
  77. });