Commit 2be8e299 by Milovan Samardzic

zakazivanjeStyle

parent c4067885
...@@ -4,6 +4,8 @@ import com.example.SkuciSe.model.zahtev.Zahtev; ...@@ -4,6 +4,8 @@ import com.example.SkuciSe.model.zahtev.Zahtev;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.sql.SQLException; import java.sql.SQLException;
@Component @Component
...@@ -12,9 +14,11 @@ public class ZahtevRepository { ...@@ -12,9 +14,11 @@ public class ZahtevRepository {
DataBase dataBase; DataBase dataBase;
public void insert(Zahtev noviZahtev, String datumIVreme) public void insert(Zahtev noviZahtev, String datumIVreme)
{ {
String datum = datumIVreme.split("T")[0]; String datum = datumIVreme.split(" ")[0];
String vreme = datumIVreme.split("T")[1]; System.out.println(datum);
noviZahtev.setDatum( datum); LocalDate datumFormatiran = LocalDate.parse(datum, DateTimeFormatter.ofPattern("MM/dd/yyyy"));
String vreme = datumIVreme.split(" ")[1];
noviZahtev.setDatum( datumFormatiran.toString());
noviZahtev.setVreme( vreme); noviZahtev.setVreme( vreme);
System.out.println( noviZahtev.toString()); System.out.println( noviZahtev.toString());
......
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.47
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{display:block;margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em!important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.bootstrap-datetimepicker-widget table td{height:auto;line-height:inherit;width:auto}.bdpw-clock-digit,.bdpw-timepicker-btn{width:32px!important;height:36px!important;line-height:36px!important;text-align:center;font-weight:700;font-size:1.2em;margin:0}.bdpw-clock-digit{color:gray}.bdpw-clock-digit.center{color:#333}.bootstrap-datetimepicker-widget table td .bdpw-clock-digit.disabled{color:#ccc}.bdpw-clock-digit.cursor{color:#337ab7}.bdpw-clock-digit.left{position:relative;left:-8px}.bdpw-clock-digit.right{position:relative;left:8px}.bdpw-clock-digit.top{position:relative;top:-5px}.bdpw-clock-digit.bottom{position:relative;top:5px}.bootstrap-datetimepicker-widget .timepicker{border:2px dotted #a5a5a5;border-radius:30px;margin:0 5px;padding:0 5px;background:url(../images/clock-bg-sm.png) center no-repeat;background-size:192px}.bootstrap-datetimepicker-widget table td span.bdpw-timepicker-colon{display:inline;font-weight:700}.bootstrap-datetimepicker-widget.dropdown-menu{width:294px;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.bootstrap-datetimepicker-widget table td span.pm-digit{display:none}.bootstrap-datetimepicker-widget .pm-view td span.am-digit{display:none}.bootstrap-datetimepicker-widget .pm-view td span.pm-digit{display:inline-block}.bootstrap-datetimepicker-widget .table-condensed>thead>tr>th,.bootstrap-datetimepicker-widget .table-condensed>tbody>tr>td,.bootstrap-datetimepicker-widget .table-condensed>tfoot>tr>td{padding:5px}
\ No newline at end of file
...@@ -320,7 +320,7 @@ p { ...@@ -320,7 +320,7 @@ p {
color: #686868; color: #686868;
} }
img { #slikaProfil{
width: 100px; width: 100px;
height: 100px; height: 100px;
border-radius: 50%; border-radius: 50%;
...@@ -512,7 +512,7 @@ img { ...@@ -512,7 +512,7 @@ img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.wave{ .pozadinaSlika{
background: url("../images/wave.svg"); /*background-image:*/
background-repeat: no-repeat; background-repeat: no-repeat;
} }
\ No newline at end of file
(function($){
$(function(){
$('#id_0').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "MM/DD/YYYY hh:mm:ss A",
});
$('#id_1').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "MM/DD/YYYY HH:mm:ss",
});
$('#id_2').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "hh:mm:ss A",
});
$('#id_3').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "HH:mm:ss",
});
$('#id_4').datetimepicker({
"allowInputToggle": true,
"showClose": true,
"showClear": true,
"showTodayButton": true,
"format": "MM/DD/YYYY",
});
});
})(jQuery);
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</div> </div>
</nav> </nav>
<header class="masthead wave"> <header class="masthead pozadinaSlika">
<div class="container d-flex justify-content-center align-items-center" style="height: 450px;font-size: 27px"> <div class="container d-flex justify-content-center align-items-center" style="height: 450px;font-size: 27px">
<div class="row justify-content-center w-100"> <div class="row justify-content-center w-100">
<div class="col d-flex justify-content-center align-items-center"> <div class="col d-flex justify-content-center align-items-center">
...@@ -133,6 +133,7 @@ ...@@ -133,6 +133,7 @@
<div class="col-lg-4"> <div class="col-lg-4">
<div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3"> <div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3">
<div class="features-icons-icon d-flex"><i class="bi-window m-auto text-primary"></i></div> <div class="features-icons-icon d-flex"><i class="bi-window m-auto text-primary"></i></div>
<img src="https://d2dlxvmcs24r4u.cloudfront.net/modules/portals/template1/images/box-1.png" height="60">
<h3>Potpuna responzivnost</h3> <h3>Potpuna responzivnost</h3>
<p class="lead mb-0">Sajt ce izgledati sjajno na svakom uredjaju, nebitno od velicine</p> <p class="lead mb-0">Sajt ce izgledati sjajno na svakom uredjaju, nebitno od velicine</p>
</div> </div>
...@@ -140,6 +141,7 @@ ...@@ -140,6 +141,7 @@
<div class="col-lg-4"> <div class="col-lg-4">
<div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3"> <div class="features-icons-item mx-auto mb-5 mb-lg-0 mb-lg-3">
<div class="features-icons-icon d-flex"><i class="bi-layers m-auto text-primary"></i></div> <div class="features-icons-icon d-flex"><i class="bi-layers m-auto text-primary"></i></div>
<img src="https://d2dlxvmcs24r4u.cloudfront.net/modules/portals/template1/images/box-2.png" height="60">
<h3>Pronadji najbolji dom u Srbiji</h3> <h3>Pronadji najbolji dom u Srbiji</h3>
<p class="lead mb-0">Pronadji najbolji dom u Srbiji popunjavanjem velikog broja kriterijuma i filtera po vasoj zelji</p> <p class="lead mb-0">Pronadji najbolji dom u Srbiji popunjavanjem velikog broja kriterijuma i filtera po vasoj zelji</p>
</div> </div>
...@@ -147,8 +149,9 @@ ...@@ -147,8 +149,9 @@
<div class="col-lg-4"> <div class="col-lg-4">
<div class="features-icons-item mx-auto mb-0 mb-lg-3"> <div class="features-icons-item mx-auto mb-0 mb-lg-3">
<div class="features-icons-icon d-flex"><i class="bi-terminal m-auto text-primary"></i></div> <div class="features-icons-icon d-flex"><i class="bi-terminal m-auto text-primary"></i></div>
<h3>Bootstrap 5 Framework</h3> <img src="https://d2dlxvmcs24r4u.cloudfront.net/modules/portals/template1/images/box-3.png" height="60">
<p class="lead mb-0">Implementirana najnovija verzija najpoznatijeg pomocnog alata za dizajniranje web aplikacija</p> <h3>Nekretnine na mapi</h3>
<p class="lead mb-0">Pogledajte rezultate pretrage na mapi i otkrijte dostupne nekretnine na osnovu njihove tačne lokacije.</p>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
<!-- Core theme CSS (includes Bootstrap)--> <!-- Core theme CSS (includes Bootstrap)-->
<link href="/css/oglasiStyle.css" rel="stylesheet"/> <link href="/css/oglasiStyle.css" rel="stylesheet"/>
<link rel="stylesheet" href="/css/bootstrap-datetimepicker.min.css" type="text/css" media="all" />
</head> </head>
<body th:object="${loggedUser}" class="pozadinaSVG"> <body th:object="${loggedUser}" class="pozadinaSVG">
...@@ -141,8 +140,9 @@ ...@@ -141,8 +140,9 @@
<div class="col"> <div class="col">
<div class="row mt-5"> <div class="row mt-5">
<div class="col"> <div class="col">
<div class="row"><p>Cena:</p></div> <div class="row" th:if="${oglas.vrstaOglasaId == 1}"><p>Cena:</p></div>
<div class="row"><p>Cena po m2:</p></div> <div class="row" th:if="${oglas.vrstaOglasaId == 1}"><p>Cena po m2:</p></div>
<div class="row" th:if="${oglas.vrstaOglasaId != 1}"><p>Kirija:</p></div>
<div class="row"><p>Povrsina:</p></div> <div class="row"><p>Povrsina:</p></div>
<div class="row"><p>Broj soba:</p></div> <div class="row"><p>Broj soba:</p></div>
<div class="row"><p>Grejanje:</p></div> <div class="row"><p>Grejanje:</p></div>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<div class="row"><p>Namesten:</p></div> <div class="row"><p>Namesten:</p></div>
</div> </div>
<div class="col"> <div class="col">
<div class="row"><p th:text="${oglas.cena * oglas.kvadratura + '$'}"></p></div> <div class="row"><p th:text="${oglas.cena * oglas.kvadratura + '$'}" th:if="${oglas.vrstaOglasaId == 1}"></p></div>
<div class="row"><p th:text="${oglas.cena + '$'}"></p></div> <div class="row"><p th:text="${oglas.cena + '$'}"></p></div>
<div class="row"><p th:text="${oglas.kvadratura + ' m2'}"></p></div> <div class="row"><p th:text="${oglas.kvadratura + ' m2'}"></p></div>
<div class="row"><p th:text="${oglas.brojSoba}"></p></div> <div class="row"><p th:text="${oglas.brojSoba}"></p></div>
...@@ -162,21 +162,37 @@ ...@@ -162,21 +162,37 @@
</div> </div>
<div class="row mt-3"> <div class="row mt-3">
<div class="col"> <div class="col">
<p class="text-wrap" th:text="${oglas.opis}"></p> <p class="text-wrap" th:text="${'Opis: ' + oglas.opis}"></p>
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<button type="button" class="btn btn-primary" id="zahtevDugme" >Zakazite obilazak</button>
<div class="row mt-3" id = "izlazDiv" style="display: none;">
<form class="d-flex justify-content-center flex-column align-items-end" th:if="${loggedUser != null}" th:action="@{/obradi-zahtev/{id}(id=${oglasId})}" method="POST" th:object="${noviZahtev}">
<input type="hidden" th:field="${noviZahtev.korisnikId}" th:value="${loggedUser.korisnik.korisnikId}">
<input type="hidden" th:field="${noviZahtev.oglasId}" th:value="${oglas.oglasId}">
<div class="row w-100">
<div class="form-group">
<div class="input-group date" id="id_1">
<input type="text" value="01/01/2022" class="form-control" required="" name="datumIVreme">
<div class="input-group-addon input-group-append">
<div class="input-group-text">
<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
</div>
</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-primary w-25">POSALJI ZAHTEV</button>
</form>
<h3 th:if="${loggedUser == null}" class="text-center"><a th:href="@{/login}" style="text-decoration: none;color:#495056;">Prijavite se</a></h3>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<form th:if="${loggedUser != null}" th:action="@{/obradi-zahtev/{id}(id=${oglasId})}" method="POST" th:object="${noviZahtev}">
<input type="hidden" th:field="${noviZahtev.korisnikId}" th:value="${loggedUser.korisnik.korisnikId}">
<input type="hidden" th:field="${noviZahtev.oglasId}" th:value="${oglas.oglasId}">
<input type="datetime-local" name="datumIVreme">
<button type="submit">POSALJI ZAHTEV</button>
</form>
<div class="container-fluid pb-0 mb-0 justify-content-center text-light "> <div class="container-fluid pb-0 mb-0 justify-content-center text-light ">
<footer> <footer>
<div class="row my-5 justify-content-center py-5"> <div class="row my-5 justify-content-center py-5">
...@@ -234,5 +250,17 @@ ...@@ -234,5 +250,17 @@
<script src="https://kit.fontawesome.com/51d1fadef3.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/51d1fadef3.js" crossorigin="anonymous"></script>
<script src="/js/main.js"></script> <script src="/js/main.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.js"></script>
<script type="text/javascript" src="/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="/js/demo.js"></script>
<script crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#zahtevDugme").click(function(){
$("#izlazDiv").fadeToggle("slow");
});
});
</script>
</body> </body>
</html> </html>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<div class="d-flex flex-column align-items-center"> <div class="d-flex flex-column align-items-center">
<a href="#" onclick="document.getElementById('inputSlika').click();" style="color:white"> <a href="#" onclick="document.getElementById('inputSlika').click();" style="color:white">
<div class="profilepic"> <div class="profilepic">
<img class="photo profilepic__image" <img class="photo profilepic__image" id="slikaProfil"
th:src="@{'data:image/png;charset=utf-8;base64,'+${loggedUser.getKorisnik().getSlika()}}" th:src="@{'data:image/png;charset=utf-8;base64,'+${loggedUser.getKorisnik().getSlika()}}"
alt="slika korisnika"> alt="slika korisnika">
<div class="profilepic__content"> <div class="profilepic__content">
......
Markdown is supported
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