tabsVor.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <html>
  2. <meta charset="utf-8"/>
  3. <head>
  4. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  5. <style>
  6. * {box-sizing: border-box}
  7. body {font-family: "Lato", sans-serif;}
  8. .tab button {
  9. display: block;
  10. background-color: inherit;
  11. color: black;
  12. padding: 22px 16px;
  13. width: 100%;
  14. border: none;
  15. outline: none;
  16. text-align: left;
  17. cursor: pointer;
  18. transition: 0.3s;
  19. font-size: 17px;
  20. }
  21. .but {
  22. background-color: #33CCFF;
  23. color: black;
  24. padding: 5px 10px;
  25. text-align: center;
  26. display: inline-block;
  27. font-size: 15px;
  28. margin: 10px 40px;
  29. cursor: pointer;
  30. text-decoration:none;
  31. border-radius:10px;
  32. padding: 10px 30px;
  33. }
  34. a:hover{
  35. background-color: #003399;
  36. }
  37. a:active {
  38. color: #003399;
  39. }
  40. </style>
  41. <h2>Digital Tool Card</h2>
  42. <script type="text/javascript">
  43. var mydiv = "<div class='tab'>";
  44. var linkList = "";
  45. $.ajax({
  46. url: '../callbacks/DTC_EVENT.txt',
  47. async: false,
  48. success: function (data){
  49. linkList = data;
  50. }
  51. });
  52. linkList = JSON.parse(linkList);
  53. var workerID = window.parent.workerID;
  54. console.log(workerID);
  55. for (var i = 0; i < linkList.length; i++) {
  56. if (linkList[i]['role'] == "VORB") {
  57. var myLink = linkList[i]['form'] + "?cbid=" + linkList[i]['cbid'] + "&workerID=" + workerID;
  58. console.log(myLink);
  59. mydiv += "<li><a class=\"but\" href="+ myLink +" target=\"mainFrame\" >" + linkList[i]['task']+ "</a></li>";
  60. }}
  61. mydiv += "</div>";
  62. document.write(mydiv);
  63. function loadit( element){
  64. var tabs=document.getElementById('tabs').getElementsByTagName("a");
  65. for (var i=0; i < tabs.length; i++){
  66. if(tabs[i].href == element.href)
  67. tabs[i].className="selected";
  68. else
  69. tabs[i].className="";
  70. }
  71. }
  72. </script>
  73. </head>
  74. </html>