daily pastebin goal
57%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 148 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a = 0;
  2. b = 0;
  3. function menu1_top()
  4. {a=0;
  5. document.getElementById("flashbox1").style.background="#eee";
  6. document.getElementById("flashbox2").style.background="";
  7. document.getElementById("rec").style.visibility="hidden"
  8. }
  9. function menu2_top()
  10. { a=2;
  11. document.getElementById("rec").style.visibility="visible"
  12. document.getElementById("flashbox2").style.background="#eee";
  13. document.getElementById("flashbox1").style.background="";
  14. }
  15. function menu3_top() { b=0; flashtopbox(); lineoff();}
  16. function menu4_top() { b=1; flashtopbox(); lineoff();}
  17.  
  18. function flashtopbox()
  19. { d=b+3;
  20. for (i=3; i<5; i++) {
  21. if (i==d) document.getElementById("flashbox"+d).style.background="#eee";
  22. else document.getElementById("flashbox"+i).style.background="";}
  23. document.getElementById("task").removeAttribute('edit');
  24. document.getElementById("task").value="Добавить";
  25. }
  26.  
  27. function selectlayer()
  28. {c = a+b;
  29. for (i=0; i<4; i++) {
  30. if (i==c) document.getElementById("cubic"+c).style.visibility="visible";
  31. else document.getElementById("cubic"+i).style.visibility="hidden";}}
  32.  
  33. function multi()
  34. {
  35. j=0;
  36. if (!document.getElementById("weekly").checked)
  37.     {
  38.     for (i=1;i<8;i++)
  39.         {
  40.         if (j==0) {if (document.getElementById("day"+i).checked) j=1;}
  41.         else document.getElementById("day"+i).checked = false;
  42.         }
  43.     }
  44. }
  45.  
  46. function onedayifnomulti(days)
  47. {
  48. if (!document.getElementById("weekly").checked)
  49.     {
  50.     for (i=1;i<8;i++)
  51.         {
  52. if (i==days) document.getElementById("day"+days).checked=true;
  53. else document.getElementById("day"+i).checked = false;
  54.         }
  55.     }
  56. }
  57.  
  58. function lineinselect(i)
  59. {
  60. lineoff();
  61.     if (i==0)
  62.         {
  63. if (document.getElementById("sel1").value=="1") {document.getElementById("sel2").value=8;}
  64.         }
  65.     if (i==1)
  66.         {
  67. if (document.getElementById("sel2").value=="8") {document.getElementById("sel1").value="1";}
  68.         }
  69. }
  70.  
  71. function lineoff()
  72. {
  73. if(b==1)
  74.     {
  75.         document.getElementById("sel3").disabled="true";
  76.         document.getElementById("sel3").value="8"
  77.     }
  78. if(b==0)
  79.     {  
  80.         if(document.getElementById("sel1").value=="1" || document.getElementById("sel2").value=="8")
  81.             {
  82.                 document.getElementById("sel3").disabled="true";
  83.                 document.getElementById("sel3").value="8"
  84.             }
  85.         else document.getElementById("sel3").disabled="";
  86.     }
  87. }
  88.  
  89. function nodetermsymbols(atr)
  90. {
  91. var regsymbols="0123456789";
  92. var hourstart=document.getElementById(atr).value;
  93. for(i=0; i<hourstart.length; i++)
  94. {
  95. if (regsymbols.indexOf(hourstart.charAt(i)) < 0) {document.getElementById(atr).value=""};
  96. if (hourstart.length > 2) document.getElementById(atr).value="";
  97. if (atr=="min1" || atr=="min2") {if (hourstart > 59) document.getElementById(atr).value="";}
  98. else {if (hourstart > 23) document.getElementById(atr).value="";}
  99. }
  100. }
  101.  
  102. function editform(ab)
  103. {
  104. document.getElementById("name"+ab).parentNode.style.background="#79d420";
  105.     j1=document.getElementById("timestart"+ab).innerHTML;
  106.     j2=document.getElementById("timestop"+ab).innerHTML;
  107.     j11=j1.split(":");
  108.     j22=j2.split(":");
  109.        
  110. document.getElementById("textarea").value=document.getElementById("name"+ab).innerHTML;
  111. document.getElementById("sel1").value=document.getElementById("chan"+ab).parentNode.getAttribute('freqchan');
  112. document.getElementById("sel2").value=document.getElementById("tabs"+ab).parentNode.getAttribute('numbdev');
  113. document.getElementById("hour1").value=parseInt(j11[0]);
  114. document.getElementById("min1").value=j11[1];
  115. document.getElementById("hour2").value=parseInt(j22[0]);
  116. document.getElementById("min2").value=j22[1];
  117. document.getElementById("sel4").value=document.getElementById("tabs"+ab).getElementsByTagName('td')[9].getAttribute('class').replace(/sm/, "");
  118. if (document.getElementById("weeklys"+ab).getAttribute('regularity')==1) {document.getElementById("weekly").checked=true;}
  119. else {document.getElementById("weekly").checked=false;}
  120.  
  121. days=document.getElementById("dayofweek"+ab).getAttribute('days');
  122. for(i=1;i<8;i++){
  123. if(days.indexOf(i)>=0) {document.getElementById("day"+i).checked=true;}
  124. else {document.getElementById("day"+i).checked=false;}
  125. }
  126. document.getElementById("task").value="Изменить";
  127. document.getElementById("task").setAttribute('edit', ab);
  128. //alert(document.getElementById("task").hasAttribute('edit')); //отладочная функция
  129. //alert(document.getElementById("task").getAttribute('edit')); //отладочная функция
  130. }
  131. function restask(name)
  132. {
  133. if(document.getElementById(""+name))
  134.     {
  135.         menu4_top();
  136.         selectlayer();
  137.         document.getElementById(""+name).parentNode.parentNode.getElementsByTagName('td')[0].style.background="#79d420";
  138.     }
  139. else
  140.     {
  141. AtMessage = document.getElementById("cubic4");
  142. AtMessage.style.visibility="visible";
  143. AtMessage.style.height="80px";
  144. AtMessage.style.background="#79d420";
  145. //AtMessage.style.textAlign="left";
  146. AtMessage.innerHTML = "<div id=\"subcubic4\">&nbsp;Внимание</div><div id=\"subcubic42\" onClick='document.getElementById(\"cubic4\").style.visibility=\"hidden\"'>x</div>";
  147. AtMessage.innerHTML += "<br><br>Резервной задачи не найдено.<br> Возможно она была удалена или отредактирована";
  148.     }
  149. }
  150. function keyhelper(ats)
  151. {
  152.     if ((ats=="`" || ats=="ё") && document.getElementById("hour2").value != 23)
  153.         {
  154.         if(document.getElementById("hour1").value && document.getElementById("hour2").value)
  155.         {
  156.         document.getElementById("hour1").value=parseInt(document.getElementById("hour1").value)+1;
  157.         document.getElementById("hour2").value=parseInt(document.getElementById("hour2").value)+1;
  158.         }
  159.         }
  160.     if ((ats=="~" || ats=="Ё") && document.getElementById("hour1").value != 0)
  161.         {
  162.         if(document.getElementById("hour1").value && document.getElementById("hour2").value)
  163.         {
  164.         document.getElementById("hour1").value=parseInt(document.getElementById("hour1").value)-1;
  165.         document.getElementById("hour2").value=parseInt(document.getElementById("hour2").value)-1;
  166.         }
  167.         }
  168. }
  169.  
  170. function spravka()
  171. {
  172. if(!document.getElementById("help").hasAttribute('help'))
  173.     {
  174.     document.getElementById("help").setAttribute('help', 1);
  175.     document.getElementById("cubic5").style.display="block";
  176.     document.getElementById("help").style.background="#ccc";
  177.     }
  178. else
  179.     {
  180.     document.getElementById("help").removeAttribute('help');
  181.     document.getElementById("cubic5").style.display="none";
  182.     document.getElementById("help").style.background="";
  183.     }
  184. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top