Skip to content
Snippets Groups Projects
Commit 601ebb7d authored by Mikhael Artur Darmakesuma's avatar Mikhael Artur Darmakesuma
Browse files

Minor tweaks edit pref loc display

parent 001a179d
1 merge request!42Projekers - 13515051 - Girvandi Ilyas
...@@ -36,7 +36,7 @@ table, th, td, tr{ ...@@ -36,7 +36,7 @@ table, th, td, tr{
width: 20%; width: 20%;
} }
#locationinput{ .locationinput{
display: none; display: none;
width: 100%; width: 100%;
height: 100%; height: 100%;
......
var textHidden = false; function hideMe(i){
function hideMe(){ var textHidden = false;
textHidden = !textHidden; textHidden = !textHidden;
var textBox = document.getElementById("locationtext"); var textBox = document.getElementById("locationtext"+i);
var inputBox = document.getElementById("locationinput"); var inputBox = document.getElementById("locationinput"+i);
var image = document.getElementById("imageeditsave"); var image = document.getElementById("imageeditsave"+i);
if(textHidden){ if(textHidden){
textBox.setAttribute("style","display:none"); textBox.setAttribute("style","display:none");
...@@ -17,5 +17,4 @@ function hideMe(){ ...@@ -17,5 +17,4 @@ function hideMe(){
textBox.innerHTML = inputBox.value; textBox.innerHTML = inputBox.value;
image.src = "../img/pencil.png"; image.src = "../img/pencil.png";
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
</head> </head>
<body> <body>
<div class = "container"> <div class = "container">
<h1>EDIT PREFERED LOCATION</h1> <h1>EDIT PREFERED LOCATIONS</h1>
<?php <?php
include "../model/user.php"; include "../model/user.php";
$user = new User; $user = new User;
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
<tr> <tr>
<td class="tabno">'.$i.'</td> <td class="tabno">'.$i.'</td>
<td class="tabloc"> <td class="tabloc">
<div id="locationtext">'.$row["location"].'</div> <div id="locationtext'.$i.'">'.$row["location"].'</div>
<input id="locationinput" type="text"> <input class="locationinput" id="locationinput'.$i.'" type="text">
</td> </td>
<td class="tabact"> <td class="tabact">
<div class="addset" align="center"> <div class="addset" align="center">
<div class="editsavebox"> <div class="editsavebox">
<button onClick=hideMe() class="editsave"> <button onClick=hideMe('.$i.') class="editsave">
<img src="../img/pencil.png" class="editsavebutton" id="imageeditsave"> <img src="../img/pencil.png" class="editsavebutton" id="imageeditsave'.$i.'">
</button> </button>
</div> </div>
<div> <div>
<button onClick=f() class="delete"> <button onClick=f() class="delete">
<img src="../img/delete.png" class="deletebutton"> <img src="../img/delete.png" class="deletebutton" id="imagedelete'.$i.'">
</button> </button>
</div> </div>
</div> </div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment