mobile.zml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <#--头部主内容,mobileUI滚动条事件-->
  2. <#function zhiqim_com_mobileUI_scrollJs()>
  3. <script>
  4. function mobileFixed()
  5. {//滚动、缩放窗口时,手机展示区域自适应
  6. if (document.documentElement.clientWidth <= 1280){
  7. Z(".mobileUI-right").css("position","absolute").css("top",20);
  8. return;
  9. }
  10. var rollTop = window.screenTop;
  11. var topHeight = Z(".topnav").offsetHeight();
  12. var divTop = Z("#mobileUI_content")[0].getBoundingClientRect().top;
  13. if (divTop <= topHeight){
  14. Z(".mobileUI-right").css("position","fixed");
  15. Z(".mobileUI-right").css("top",topHeight + 20);
  16. } else {
  17. Z(".mobileUI-right").css("position","absolute")
  18. .css("top",20);
  19. }
  20. }
  21. <!--
  22. Z.onload(function()
  23. {
  24. mobileFixed();
  25. Z(document).on("scroll",function(){
  26. mobileFixed();
  27. });
  28. Z(window).on("resize",function(){
  29. mobileFixed();
  30. });
  31. });
  32. //-->
  33. </script>
  34. </#function>
  35. <#-- zhiqim.mobile右侧demo -->
  36. <#function zhiqim_com_ZmUI_demo_start(url)>
  37. <#if url == undefined>
  38. ${Styles.src("/src/zhiqim.mobile.css")}
  39. ${Scripts.src("/src/zhiqim_dialog.mobile.js")}
  40. ${Scripts.src("/src/zhiqim_calendar.mobile.js")}
  41. ${Scripts.src("/src/zhiqim_tabnav.mobile.js")}
  42. ${Scripts.src("/src/zhiqim_numInput.mobile.js")}
  43. ${Scripts.src("/src/zhiqim_popUp.mobile.js")}
  44. ${Scripts.src("/src/zhiqim_slider.mobile.js")}
  45. <style>
  46. html, body{height:auto;overflow:auto;font-size:100px;}
  47. body{font-size:.16px;}
  48. table,td,div{line-height:inherit;}
  49. </style>
  50. <div class="mobileUI-right">
  51. <div id="ZmUI_demo">
  52. <#else>
  53. <div class="mobileUI-right">
  54. <div id="ZmUI_demo">
  55. <iframe src=${url}></iframe>
  56. </#if>
  57. </#function>
  58. <#function zhiqim_com_ZmUI_demo_end()>
  59. </div>
  60. </div>
  61. </#function>