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{
width: 20%;
}
#locationinput{
.locationinput{
display: none;
width: 100%;
height: 100%;
......
var textHidden = false;
function hideMe(){
function hideMe(i){
var textHidden = false;
textHidden = !textHidden;
var textBox = document.getElementById("locationtext");
var inputBox = document.getElementById("locationinput");
var image = document.getElementById("imageeditsave");
var textBox = document.getElementById("locationtext"+i);
var inputBox = document.getElementById("locationinput"+i);
var image = document.getElementById("imageeditsave"+i);
if(textHidden){
textBox.setAttribute("style","display:none");
......@@ -17,5 +17,4 @@ function hideMe(){
textBox.innerHTML = inputBox.value;
image.src = "../img/pencil.png";
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@
</head>
<body>
<div class = "container">
<h1>EDIT PREFERED LOCATION</h1>
<h1>EDIT PREFERED LOCATIONS</h1>
<?php
include "../model/user.php";
$user = new User;
......@@ -28,19 +28,19 @@
<tr>
<td class="tabno">'.$i.'</td>
<td class="tabloc">
<div id="locationtext">'.$row["location"].'</div>
<input id="locationinput" type="text">
<div id="locationtext'.$i.'">'.$row["location"].'</div>
<input class="locationinput" id="locationinput'.$i.'" type="text">
</td>
<td class="tabact">
<div class="addset" align="center">
<div class="editsavebox">
<button onClick=hideMe() class="editsave">
<img src="../img/pencil.png" class="editsavebutton" id="imageeditsave">
<button onClick=hideMe('.$i.') class="editsave">
<img src="../img/pencil.png" class="editsavebutton" id="imageeditsave'.$i.'">
</button>
</div>
<div>
<button onClick=f() class="delete">
<img src="../img/delete.png" class="deletebutton">
<img src="../img/delete.png" class="deletebutton" id="imagedelete'.$i.'">
</button>
</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