diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-03-31 19:41:34 +0300 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-03-31 19:41:34 +0300 |
commit | 760e8fff4d4fd71350ddc9b17e85e95a17d4ce8e (patch) | |
tree | c7ea657fe7d99852ff3c5ea19ca386d69bd9af55 /rannak/mangud/arimees/pood | |
parent | c40293acd3a00b20d74cf37823b7efb1b75dec9b (diff) |
oops
Diffstat (limited to 'rannak/mangud/arimees/pood')
-rw-r--r--[-rwxr-xr-x] | rannak/mangud/arimees/pood/index.html | 56 | ||||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/12.jpg | bin | 0 -> 618138 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/13.jpg | bin | 0 -> 654006 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/14.jpg | bin | 0 -> 1812244 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/15.jpg | bin | 0 -> 2256889 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/16.jpg | bin | 0 -> 1470522 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/17.jpg | bin | 0 -> 1770704 bytes | |||
-rw-r--r-- | rannak/mangud/arimees/pood/pildid/18.jpg | bin | 0 -> 2863613 bytes | |||
-rw-r--r--[-rwxr-xr-x] | rannak/mangud/arimees/pood/pildid/avatar.png | bin | 73556 -> 73556 bytes | |||
-rw-r--r--[-rwxr-xr-x] | rannak/mangud/arimees/pood/script.js | 83 | ||||
-rw-r--r--[-rwxr-xr-x] | rannak/mangud/arimees/pood/style.css | 19 |
11 files changed, 139 insertions, 19 deletions
diff --git a/rannak/mangud/arimees/pood/index.html b/rannak/mangud/arimees/pood/index.html index 1e83723..f52a103 100755..100644 --- a/rannak/mangud/arimees/pood/index.html +++ b/rannak/mangud/arimees/pood/index.html @@ -128,9 +128,35 @@ <button class="nav-link" id="tab11" data-bs-toggle="tab" data-bs-target="#tab-pane11" type="button" role="tab" aria-controls="tab-pane11" aria-selected="false" >11</button> </li> - </ul> + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab12" data-bs-toggle="tab" data-bs-target="#tab-pane12" type="button" role="tab" aria-controls="tab-pane12" aria-selected="false" >12</button> + </li> + + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab13" data-bs-toggle="tab" data-bs-target="#tab-pane13" type="button" role="tab" aria-controls="tab-pane13" aria-selected="false" >13</button> + </li> + + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab14" data-bs-toggle="tab" data-bs-target="#tab-pane14" type="button" role="tab" aria-controls="tab-pane14" aria-selected="false" >14</button> + </li> + + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab15" data-bs-toggle="tab" data-bs-target="#tab-pane15" type="button" role="tab" aria-controls="tab-pane15" aria-selected="false" >15</button> + </li> + + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab16" data-bs-toggle="tab" data-bs-target="#tab-pane16" type="button" role="tab" aria-controls="tab-pane16" aria-selected="false" >16</button> + </li> + + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab17" data-bs-toggle="tab" data-bs-target="#tab-pane17" type="button" role="tab" aria-controls="tab-pane17" aria-selected="false" >17</button> + </li> + <li class="nav-item" role="presentation"> + <button class="nav-link" id="tab18" data-bs-toggle="tab" data-bs-target="#tab-pane18" type="button" role="tab" aria-controls="tab-pane18" aria-selected="false" >18</button> + </li> + </ul> @@ -180,10 +206,35 @@ <img alt="Ajakirja lehekülg" src="pildid/11.jpg"/> </div> - </div> + <div class="tab-pane fade" id="tab-pane12" role="tabpanel" aria-labelledby="12-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/12.jpg"/> + </div> + <div class="tab-pane fade" id="tab-pane13" role="tabpanel" aria-labelledby="13-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/13.jpg"/> + </div> + <div class="tab-pane fade" id="tab-pane14" role="tabpanel" aria-labelledby="14-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/14.jpg"/> + </div> + <div class="tab-pane fade" id="tab-pane15" role="tabpanel" aria-labelledby="15-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/15.jpg"/> + </div> + + <div class="tab-pane fade" id="tab-pane16" role="tabpanel" aria-labelledby="16-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/16.jpg"/> + </div> + + <div class="tab-pane fade" id="tab-pane17" role="tabpanel" aria-labelledby="17-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/17.jpg"/> + </div> + + <div class="tab-pane fade" id="tab-pane18" role="tabpanel" aria-labelledby="18-tab" tabindex="0"> + <img alt="Ajakirja lehekülg" src="pildid/18.jpg"/> + </div> + + </div> </div> <!-- Ajakirja Wrapper End --> @@ -191,6 +242,7 @@ <!-- Tabel --> <h3>Ostunimekiri</h3> + <p>Täitmiseks vajuta soovitud kohale ja sisesta andmed.</p> <div class="tabelWrapper"> <table class="table table-dark table-striped"> diff --git a/rannak/mangud/arimees/pood/pildid/12.jpg b/rannak/mangud/arimees/pood/pildid/12.jpg Binary files differnew file mode 100644 index 0000000..6cc8de1 --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/12.jpg diff --git a/rannak/mangud/arimees/pood/pildid/13.jpg b/rannak/mangud/arimees/pood/pildid/13.jpg Binary files differnew file mode 100644 index 0000000..dd4121e --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/13.jpg diff --git a/rannak/mangud/arimees/pood/pildid/14.jpg b/rannak/mangud/arimees/pood/pildid/14.jpg Binary files differnew file mode 100644 index 0000000..f9bb4be --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/14.jpg diff --git a/rannak/mangud/arimees/pood/pildid/15.jpg b/rannak/mangud/arimees/pood/pildid/15.jpg Binary files differnew file mode 100644 index 0000000..5522a85 --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/15.jpg diff --git a/rannak/mangud/arimees/pood/pildid/16.jpg b/rannak/mangud/arimees/pood/pildid/16.jpg Binary files differnew file mode 100644 index 0000000..f981ab5 --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/16.jpg diff --git a/rannak/mangud/arimees/pood/pildid/17.jpg b/rannak/mangud/arimees/pood/pildid/17.jpg Binary files differnew file mode 100644 index 0000000..e87ebfe --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/17.jpg diff --git a/rannak/mangud/arimees/pood/pildid/18.jpg b/rannak/mangud/arimees/pood/pildid/18.jpg Binary files differnew file mode 100644 index 0000000..1de7aa5 --- /dev/null +++ b/rannak/mangud/arimees/pood/pildid/18.jpg diff --git a/rannak/mangud/arimees/pood/pildid/avatar.png b/rannak/mangud/arimees/pood/pildid/avatar.png Binary files differindex 3cb21cf..3cb21cf 100755..100644 --- a/rannak/mangud/arimees/pood/pildid/avatar.png +++ b/rannak/mangud/arimees/pood/pildid/avatar.png diff --git a/rannak/mangud/arimees/pood/script.js b/rannak/mangud/arimees/pood/script.js index 8803bbe..5a48c84 100755..100644 --- a/rannak/mangud/arimees/pood/script.js +++ b/rannak/mangud/arimees/pood/script.js @@ -4,25 +4,84 @@ document.addEventListener('DOMContentLoaded', () => { }); -const selectors = document.querySelectorAll('select'); -for(el of selectors){ - el.addEventListener('change', () => { - let selected = new Array(); - for (el of selectors){ - if (!selected.includes(el.value) && el.value != 'Vali') - selected.push(el.value); +const cells = document.querySelectorAll("td"); + +for (let i=0;i < cells.length; i++){ + cells[i].onclick = function(){ + + if (this.hasAttribute('data-clicked')) + return; + + this.setAttribute('data-clicked', 'yes') + this.setAttribute('data-text', this.innerHTML) + + let input = document.createElement('input'); + input.setAttribute('type', 'text'); + input.value = this.innerHTML; + input.style.width = this.offsetWidth - (this.clientLeft * 2) + 'px'; + input.style.height = this.offsetHeight - (this.clientTop * 2) + 'px'; + input.style.border = '0px'; + input.fontFamily = 'inherit'; + input.fontSize = 'inherit'; + input.textAlign = 'inherit'; + input.style.backgroundColor = 'LightGoldenRodYellow'; + + + // On offclick + input.onblur = function(){ + let td = input.parentElement; + let origText = input.parentElement.getAttribute('data-text'); + let curText = this.value; + + if (origText != curText){ + td.removeAttribute('data-clicked'); + td.removeAttribute('data-text'); + td.innerHTML = curText; + td.style.cssText = 'padding: .5rem .5rem'; + + + // Can move on? + for (cell of cells){ + if (cell.textContent == '') + return; + } + moveOnEnable(); + } + else { + td.removeAttribute('data-clicked'); + td.removeAttribute('data-text'); + td.innerHTML = origText; + td.style.cssText = 'padding: .5rem .5rem'; + } + + + // Here Check if Done + //TODO + + + + } // onblur func end + + + input.onkeypress = function (){ + if (event.keyCode == 13) + this.onblur(); } - if (selected.length == 6) - moveOnEnable(); + this.innerHTML = ''; + this.style.cssText = 'padding: 0px'; + this.append(input); + this.firstElementChild.select(); - }); -} + + } // OnClick Loop +} //ForLoop + -// If All Else Done +// If All Done function moveOnEnable(){ const btn = document.querySelector(".moveOn"); diff --git a/rannak/mangud/arimees/pood/style.css b/rannak/mangud/arimees/pood/style.css index e4de8d1..61bdfe7 100755..100644 --- a/rannak/mangud/arimees/pood/style.css +++ b/rannak/mangud/arimees/pood/style.css @@ -3,6 +3,7 @@ body{ background-color: #43464b; + color: white; } @@ -78,6 +79,12 @@ button:disabled{ /* Main */ + +.tab-pane { + text-align: center; +} + + .main { display: flex; align-items: center; @@ -85,14 +92,12 @@ button:disabled{ flex-direction: column; } -.main h3 { - padding-top: 1rem; - color: white; +h3{ + padding-top: 3rem; } .tab-content img{ - max-width : 50vw; - heigth: auto; + max-height: 87vh; } @@ -100,3 +105,7 @@ table { padding-top: 1rem; font-size: 1.1rem; } + +img:hover{ + scale: 1.37; +} |