[7] | 1 | var toggled = false;
|
---|
| 2 |
|
---|
| 3 | var toggled1 = false;
|
---|
| 4 | var toggled2 = false;
|
---|
| 5 |
|
---|
| 6 | function getElementsByClass(searchClass,node,tag) {
|
---|
| 7 | var classElements = new Array();
|
---|
| 8 | if ( node == null )
|
---|
| 9 | node = document;
|
---|
| 10 | if ( tag == null )
|
---|
| 11 | tag = '*';
|
---|
| 12 | var els = node.getElementsByTagName(tag);
|
---|
| 13 | var elsLen = els.length;
|
---|
| 14 | var pattern = new RegExp('(^|\\\\s)'+searchClass+'(\\\\s|$)');
|
---|
| 15 | for (i = 0, j = 0; i < elsLen; i++) {
|
---|
| 16 | if ( pattern.test(els[i].className) ) {
|
---|
| 17 | classElements[j] = els[i];
|
---|
| 18 | j++;
|
---|
| 19 | }
|
---|
| 20 | }
|
---|
| 21 | return classElements;
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | function toggleConstructbodies(hide){
|
---|
| 25 | if(hide == "true"){
|
---|
| 26 | var x;
|
---|
| 27 | var constructBodies = getElementsByClass("span_constructbody");
|
---|
| 28 |
|
---|
| 29 | if(toggled)
|
---|
| 30 | for(x in constructBodies)
|
---|
| 31 | constructBodies[x].style.display='';
|
---|
| 32 | else
|
---|
| 33 | for(x in constructBodies)
|
---|
| 34 | constructBodies[x].style.display='none';
|
---|
| 35 | toggled = !toggled;
|
---|
| 36 | }
|
---|
| 37 | if (document.getElementById('modulebody') != null){
|
---|
| 38 | document.getElementById('modulebody').style.display='';
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | function toggleImportDetails(){
|
---|
| 43 | var x;
|
---|
| 44 | var constructBodies = getElementsByClass("span_importdetail");
|
---|
| 45 |
|
---|
| 46 | if(toggled)
|
---|
| 47 | for(x in constructBodies)
|
---|
| 48 | constructBodies[x].style.display='';
|
---|
| 49 | else
|
---|
| 50 | for(x in constructBodies)
|
---|
| 51 | constructBodies[x].style.display='none';
|
---|
| 52 | toggled = !toggled;
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | function togglePaths(hide){
|
---|
| 56 | if(hide == "true"){
|
---|
| 57 | var x;
|
---|
| 58 | var constructBodies = getElementsByClass("td_path");
|
---|
| 59 |
|
---|
| 60 | if(toggled)
|
---|
| 61 | for(x in constructBodies)
|
---|
| 62 | constructBodies[x].style.display='';
|
---|
| 63 | else
|
---|
| 64 | for(x in constructBodies)
|
---|
| 65 | constructBodies[x].style.display='none';
|
---|
| 66 | toggled = !toggled;
|
---|
| 67 | }
|
---|
| 68 | }
|
---|
| 69 |
|
---|
| 70 | function toggleHideNotes(){
|
---|
| 71 | var x;
|
---|
| 72 | var constructBodies = getElementsByClass("span_showhidenote");
|
---|
| 73 | for(x in constructBodies){
|
---|
| 74 | toggleElement(constructBodies[x]);
|
---|
| 75 | }
|
---|
| 76 | }
|
---|
| 77 |
|
---|
| 78 | function toggleElement(element){
|
---|
| 79 | if(element.style.display=='none')
|
---|
| 80 | element.style.display='';
|
---|
| 81 | else
|
---|
| 82 | element.style.display='none';
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | function toggle(elementName){
|
---|
| 86 | var element = document.getElementById(elementName);
|
---|
| 87 | toggleElement(element);
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | function mp_init(listName){
|
---|
| 91 | if(listName != 'Group')
|
---|
| 92 | // if (document.getElementById('span_groups')!=null)
|
---|
| 93 | document.getElementById('span_groups').style.display='none';
|
---|
| 94 | if(listName != 'Testcase')
|
---|
| 95 | // if (document.getElementById('span_testcases'!=null))
|
---|
| 96 | document.getElementById('span_testcases').style.display='none';
|
---|
| 97 | if(listName != 'Module Parameter')
|
---|
| 98 | // if (document.getElementById('span_parameters')!=null)
|
---|
| 99 | document.getElementById('span_module parameters').style.display='none';
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 | function init(listName){
|
---|
| 103 | toggleHideNotes();
|
---|
| 104 | if(listName != 'Group')
|
---|
| 105 | document.getElementById('span_groups').style.display='none';
|
---|
| 106 | if(listName != 'Function')
|
---|
| 107 | document.getElementById('span_functions').style.display='none';
|
---|
| 108 | if(listName != 'Type')
|
---|
| 109 | document.getElementById('span_types').style.display='none';
|
---|
| 110 | if(listName != 'Signature')
|
---|
| 111 | document.getElementById('span_signatures').style.display='none';
|
---|
| 112 | if(listName != 'Testcase')
|
---|
| 113 | document.getElementById('span_testcases').style.display='none';
|
---|
| 114 | if(listName != 'Altstep')
|
---|
| 115 | document.getElementById('span_altsteps').style.display='none';
|
---|
| 116 | if(listName != 'Template')
|
---|
| 117 | document.getElementById('span_templates').style.display='none';
|
---|
| 118 | if(listName != 'Constant')
|
---|
| 119 | document.getElementById('span_constants').style.display='none';
|
---|
| 120 | if(listName != 'Module Parameter')
|
---|
| 121 | document.getElementById('span_module parameters').style.display='none';
|
---|
| 122 | if(listName != 'External Function')
|
---|
| 123 | document.getElementById('span_external functions').style.display='none';
|
---|
| 124 | if(listName != 'External Constant')
|
---|
| 125 | document.getElementById('span_external constants').style.display='none';
|
---|
| 126 |
|
---|
| 127 | } |
---|