perform.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /**
  2. *
  3. */
  4. var basePath;
  5. var company_code;
  6. var V_LOGINNAME;
  7. var V_PASSWORD;
  8. var theme;
  9. var menuidx = 'm1';
  10. var body_resize = function() {
  11. $("#proform3_bg_mm").css('display','none');
  12. if($(document).innerWidth()>=1370){
  13. $("#proform3_bg_tm").css('display','block');
  14. $("#proform3_bg_tm").css('width',($(document).innerWidth()-1370)+'px');
  15. $("#proform3_bg_bm").css('display','block');
  16. $("#proform3_bg_bm").css('width',($(document).innerWidth()-1370)+'px');
  17. }else{
  18. $("#proform3_bg_tm").css('display','none');
  19. $("#proform3_bg_bm").css('display','none');
  20. }
  21. if($(document).innerHeight()>=922){
  22. $("#proform3_bg_ml").css('display','block');
  23. $("#proform3_bg_mr").css('display','block');
  24. $("#proform3_bg_ml").css('height',($(document).innerHeight()-922)+'px');
  25. $("#proform3_bg_mr").css('height',($(document).innerHeight()-922)+'px');
  26. if($(document).innerWidth()>=1370){
  27. $("#proform3_bg_mm").css('display','block');
  28. $("#proform3_bg_mm").css('height',($(document).innerHeight()-922)+'px');
  29. $("#proform3_bg_mm").css('width',($(document).innerWidth()-1370)+'px');
  30. }
  31. }else{
  32. $("#proform3_bg_ml").css('display','none');
  33. $("#proform3_bg_mr").css('display','none');
  34. }
  35. $("#main_page_springhandle").css('width',($(document).innerWidth()-200)+'px');
  36. $("#main_page_springhandle").css('height',($(document).innerHeight()-208)+'px');
  37. }
  38. //var mouseon = function(obj){
  39. // var id = obj.id;
  40. // $("#"+id).removeClass(id);
  41. // $("#"+id).addClass(id+'_on');
  42. //}
  43. //
  44. //var mouseoff = function(obj){
  45. // var mid = "proform_";
  46. //// var id = obj.id;
  47. //// $("#"+id).removeClass(id+'_on');
  48. //// $("#"+id).addClass(id);
  49. // for(var i=1;i<5;i++){
  50. // var id = "proform_menu_"+i;
  51. // $("#"+id).removeClass(id+'_on');
  52. // $("#"+id).addClass(id);
  53. // }
  54. // if(menuidx=='m1')
  55. // mid += 'menu_1';
  56. // else if(menuidx=='m2')
  57. // mid += 'menu_2';
  58. // else if(menuidx=='m3')
  59. // mid += 'menu_3';
  60. // else if(menuidx=='m4')
  61. // mid += 'menu_4';
  62. //
  63. // $("#"+mid).removeClass(mid);
  64. // $("#"+mid).addClass(mid+'_on');
  65. //}
  66. //
  67. //var menu_click = function(obj){
  68. // var id = obj.id;
  69. // if(id=='proform_menu_1'){
  70. // menuidx = 'm1';
  71. // show_page();
  72. // }
  73. // else if(id=='proform_menu_2'){
  74. // menuidx = 'm2';
  75. // show_page();
  76. // }
  77. // else if(id=='proform_menu_3'){
  78. // menuidx = 'm3';
  79. // show_page();
  80. // }
  81. // else if(id=='proform_menu_4'){
  82. // menuidx = 'm4';
  83. // show_page();
  84. // }
  85. //}
  86. var show_page = function(){
  87. // var mid = "proform_";
  88. var div = document.getElementById('main_page_springhandle');
  89. div.innerHTML='<iframe frameborder=0 width="100%" height="100%" allowtransparency="true" scrolling=auto src="'+basePath+'view/pzb/index.jsp?theme='+theme+($("#company_code").val().length>0?('&company_code='+$("#company_code").val()):'')+'"></iframe>';
  90. }
  91. Ext.onReady(function(){
  92. basePath = $("#basePath").val();
  93. $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
  94. $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
  95. V_LOGINNAME = $("#V_LOGINNAME").val();
  96. V_PASSWORD = $("#V_PASSWORD").val();
  97. company_code = $("#company_code").val();
  98. theme = $("#theme").val();
  99. $(window).resize(function(){
  100. body_resize();
  101. });
  102. body_resize();
  103. show_page();
  104. });