layout/reftests/bugs/236539-1-ref.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <script type="text/javascript">
michael@0 4 var NumLine = 0
michael@0 5
michael@0 6 function maj(IDLine)
michael@0 7 {
michael@0 8
michael@0 9 var newtr = document.createElement("tr")
michael@0 10 newtr.setAttribute("id","tr"+IDLine)
michael@0 11
michael@0 12
michael@0 13 var newtdselect = document.createElement("td")
michael@0 14 var newselect = document.createElement("select")
michael@0 15 newselect.setAttribute("id","HypothRank_"+IDLine)
michael@0 16 newselect.setAttribute("name","HypothRank_"+IDLine)
michael@0 17
michael@0 18 for (i=1;i<=IDLine;i++)
michael@0 19 {
michael@0 20
michael@0 21 var newoption = document.createElement("option")
michael@0 22 newoption.setAttribute("id",i)
michael@0 23 newoption.setAttribute("class","classoption1")
michael@0 24 if (i == IDLine)
michael@0 25 {
michael@0 26 newoption.setAttribute("selected","selected")
michael@0 27 }
michael@0 28 var newtxt = document.createTextNode(i)
michael@0 29 newoption.appendChild(newtxt)
michael@0 30
michael@0 31 newselect.appendChild(newoption)
michael@0 32 }
michael@0 33
michael@0 34 if (i>2)
michael@0 35 {
michael@0 36 for (j=1;j<=i-2;j++)
michael@0 37 {
michael@0 38 var newoption = document.createElement("option")
michael@0 39 newoption.setAttribute("class","classoption1")
michael@0 40 newoption.setAttribute("id",IDLine)
michael@0 41 var newtxt = document.createTextNode(i-1)
michael@0 42 newoption.appendChild(newtxt)
michael@0 43 document.getElementById("HypothRank_"+j).appendChild(newoption)
michael@0 44 }
michael@0 45 }
michael@0 46
michael@0 47 newtdselect.appendChild(newselect)
michael@0 48 newtr.appendChild(newtdselect)
michael@0 49
michael@0 50 document.getElementById('letbody').appendChild(newtr)
michael@0 51
michael@0 52 NumLine++
michael@0 53 }
michael@0 54
michael@0 55
michael@0 56
michael@0 57 function DeleteLine(IDLine)
michael@0 58 {
michael@0 59 for (i=1;i<=NumLine;i++)
michael@0 60
michael@0 61 {
michael@0 62 if (i != IDLine)
michael@0 63 {
michael@0 64 noeud = document.getElementById("HypothRank_"+i)[IDLine-1]
michael@0 65 document.getElementById("HypothRank_"+i).removeChild(noeud)
michael@0 66 for (j=0;j<=NumLine-2;j++)
michael@0 67 {
michael@0 68 noeud = document.getElementById("HypothRank_"+i)[j]
michael@0 69
michael@0 70 k=j+1
michael@0 71 noeud.setAttribute("id",k)
michael@0 72
michael@0 73 if (k == NumLine)
michael@0 74 {
michael@0 75 noeud.setAttribute("selected","selected")
michael@0 76 }
michael@0 77 depart = 0
michael@0 78 taille = noeud.firstChild.nodeValue.length
michael@0 79 document.getElementById("HypothRank_"+i)[j].firstChild.replaceData(depart,taille,j+1)
michael@0 80 }
michael@0 81 }
michael@0 82 }
michael@0 83
michael@0 84
michael@0 85 noeud = document.getElementById('tr'+IDLine)
michael@0 86 document.getElementById('letbody').removeChild(noeud)
michael@0 87
michael@0 88 NumLine--
michael@0 89
michael@0 90 for (i=IDLine;i<=NumLine;i++)
michael@0 91 {
michael@0 92 k=i+1
michael@0 93 noeud = document.getElementById("tr"+k)
michael@0 94 noeud.setAttribute("id","tr"+i)
michael@0 95
michael@0 96 noeud = document.getElementById("HypothRank_"+k)
michael@0 97 noeud.setAttribute("id","HypothRank_"+i)
michael@0 98 noeud.setAttribute("name","HypothRank_"+i)
michael@0 99
michael@0 100 noeud = document.getElementById("Hypoth_"+k)
michael@0 101 noeud.setAttribute("name","Hypoth_"+i)
michael@0 102 noeud.setAttribute("id","Hypoth_"+i)
michael@0 103 }
michael@0 104
michael@0 105
michael@0 106 }
michael@0 107
michael@0 108 </script>
michael@0 109 </head>
michael@0 110
michael@0 111 <body>
michael@0 112 <form>
michael@0 113 <table border="1" id="latable">
michael@0 114 <thead></thead>
michael@0 115 <tfoot></tfoot>
michael@0 116 <tbody id="letbody"></tbody>
michael@0 117 </table>
michael@0 118 </form>
michael@0 119
michael@0 120 <script>
michael@0 121 document.body.offsetWidth;
michael@0 122 maj(NumLine+1);
michael@0 123 document.body.offsetWidth;
michael@0 124 maj(NumLine+1);
michael@0 125 document.body.offsetWidth;
michael@0 126 </script>
michael@0 127
michael@0 128 </body>
michael@0 129 </html>

mercurial