diff --git a/css/edit-prefered-location.css b/css/edit-prefered-location.css index 0ed33dd3618431f43a7463a8402cb2b1a645f89e..2b33f6f4f631c4a6f7f29dfdfcff5ff0d0aa9bb0 100644 --- a/css/edit-prefered-location.css +++ b/css/edit-prefered-location.css @@ -12,6 +12,9 @@ th{ text-align: center; } +td{ + height: 30; +} th, td, tr{ padding: 2; } @@ -36,7 +39,7 @@ table, th, td, tr{ #locationinput{ display: none; width: 100%; - height: 30; + height: 100%; } button{ @@ -47,7 +50,7 @@ button{ padding: 0; } -.editbutton{ +.editsavebutton{ height: 25; width: 25; } diff --git a/css/login.css b/css/login.css index 456a56fad80c994e80966d790844970c6ca4fd12..24396741738e9f73b9b77816abbcc15dea1ba2fb 100644 --- a/css/login.css +++ b/css/login.css @@ -1,12 +1,9 @@ -.kotak{ +.container{ background-color: #8BBD3C; border-color: #02702C; border-width: 10px; border-style: solid; border-radius: 50px; - width: 30%; - margin: 20 35% 0 35%; - padding: 10 10 10 10; } .horizontal{ diff --git a/data/projekers.sql b/data/projekers.sql index 11d7c88ee3f294c90be2c39f0a590fc2da1cac41..f094caa93d284c1265ff91c1af212394f3058199 100644 --- a/data/projekers.sql +++ b/data/projekers.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.7.14, for Win64 (x86_64) +-- MySQL dump 10.16 Distrib 10.1.21-MariaDB, for Win32 (AMD64) -- --- Host: localhost Database: projekers +-- Host: localhost Database: localhost -- ------------------------------------------------------ --- Server version 5.5.5-10.1.25-MariaDB +-- Server version 10.1.21-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -15,6 +15,31 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +-- +-- Table structure for table `pref_loc` +-- + +DROP TABLE IF EXISTS `pref_loc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pref_loc` ( + `id` int(11) NOT NULL, + `location` varchar(50) NOT NULL, + KEY `id` (`id`), + CONSTRAINT `pref_loc_ibfk_1` FOREIGN KEY (`id`) REFERENCES `user` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `pref_loc` +-- + +LOCK TABLES `pref_loc` WRITE; +/*!40000 ALTER TABLE `pref_loc` DISABLE KEYS */; +INSERT INTO `pref_loc` VALUES (1,'Tubagus Ismail'),(1,'Dago Asri'),(1,'Kopo'); +/*!40000 ALTER TABLE `pref_loc` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `user` -- @@ -54,4 +79,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2017-09-30 0:24:39 +-- Dump completed on 2017-09-30 10:55:55 diff --git a/js/edit-prefered-location.js b/js/edit-prefered-location.js new file mode 100644 index 0000000000000000000000000000000000000000..4fe430b1396a497fcf8abe3f78f3cfc49fb4643b --- /dev/null +++ b/js/edit-prefered-location.js @@ -0,0 +1,21 @@ +var textHidden = false; +function hideMe(){ + textHidden = !textHidden; + var textBox = document.getElementById("locationtext"); + var inputBox = document.getElementById("locationinput"); + var image = document.getElementById("imageeditsave"); + + if(textHidden){ + textBox.setAttribute("style","display:none"); + inputBox.setAttribute("style","display:block"); + inputBox.value = textBox.innerHTML; + image.src = "../img/floppy.png"; + } + else{ + textBox.setAttribute("style","display:block"); + inputBox.setAttribute("style","display:none"); + textBox.innerHTML = inputBox.value; + image.src = "../img/pencil.png"; + } + +} \ No newline at end of file diff --git a/view/Login.html b/view/Login.html index 7f5b421c99d542097cc2ee62846c1658966b8207..9acf08542fe6f4969f75cbbadb4057158a184314 100644 --- a/view/Login.html +++ b/view/Login.html @@ -1,11 +1,11 @@ <html> <head> <title>Projekers - Login</title> - <link rel = "stylesheet" href = "../css/login.css"> <link rel = "stylesheet" href = "../css/primary.css"> + <link rel = "stylesheet" href = "../css/login.css"> </head> <body> - <div class = "kotak"> + <div class = "container"> <div> <div class = "horizontal"></div> <div class = "judul">LOGIN</div> diff --git a/view/edit-prefered-locations.html b/view/edit-prefered-locations.html index 536b61e08fbe8a601d41e681fe31175f39d68898..8231727803b2a4f60db0d80db69a1e6c9bc90bea 100644 --- a/view/edit-prefered-locations.html +++ b/view/edit-prefered-locations.html @@ -1,11 +1,12 @@ <html> <head> - <title>Projekers - Login</title> + <title>Projekers - Edit Prefered Location</title> <link rel = "stylesheet" href = "../css/edit-prefered-location.css"> <link rel = "stylesheet" href = "../css/primary.css"> + <script src = "../js/edit-prefered-location.js"></script> </head> <body> - <div class = "kotak"> + <div class = "container"> <h1>EDIT PREFERED LOCATION</h1> <table class="tab"> <tr> @@ -16,14 +17,14 @@ <tr> <td class="tabno">1</td> <td class="tabloc"> - <div id="locationtext">2</div> + <div id="locationtext">Bandung</div> <input id="locationinput" type="text"> </td> <td class="tabact"> <div class="addset" align="center"> - <div margin-right=50> + <div class="editsavebox"> <button onClick=hideMe() class="editsave"> - <img src="../img/pencil.png" class="editbutton" id="imageeditsave"> + <img src="../img/pencil.png" class="editsavebutton" id="imageeditsave"> </button> </div> <div>