File tree Expand file tree Collapse file tree
spring-security-oauth/src/main/webapp/WEB-INF/jsp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88<script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script >
99<script src =" <c:url value=" /resources /datetime-picker.js " />" ></script >
1010<script src =" <c:url value=" /resources /validator.js " />" ></script >
11+ <style type =" text/css" >
12+ .btn.disabled {
13+ background-color : #ddd ;
14+ border-color : #ddd ;
15+ }
1116
17+ .btn.disabled :hover {
18+ background-color : #ddd ;
19+ border-color : #ddd ;
20+ }
21+ </style >
1222</head >
1323<body >
1424<nav class =" navbar navbar-default" >
5767 <span class =" col-sm-9" ><input name =" sr" placeholder =" Subreddit" class =" form-control" value =" ${ post. getSubreddit() } " required data-minlength =" 3" /></span >
5868</div >
5969<br ><br >
60- <div class = " col-sm-3 " >
61- <label >Send replies to my inbox</label > & nbsp ; < input type =" checkbox" name =" sendreplies" value =" true" <c:if test =" ${ post. isSendReplies()== ' true' } " > checked </c:if > />
70+ <div >
71+ <label class = " col-sm-3 " >Send replies to my inbox</label > < span class = " col-sm-9 " > < input type =" checkbox" name =" sendreplies" value =" true" <c:if test =" ${ post. isSendReplies()== ' true' } " > checked </c:if > /></ span >
6272</div >
6373<br ><br >
6474
Original file line number Diff line number Diff line change 5353 <td ><c:out value =" ${ post. getSubmissionResponse() } " /></td >
5454 <td >
5555 <a href =" editPost/${ post. getId() } " class =" btn btn-warning" >Edit</a >
56- <a href =" #" class =" btn btn-danger" onclick =" deletePost (${ post. getId() } )" >Delete</a >
56+ <a href =" #" class =" btn btn-danger" onclick =" confirmDelete (${ post. getId() } )" >Delete</a >
5757 </td >
5858 </tr >
5959</c:forEach >
6060</table >
6161</div >
6262<script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script >
6363<script >
64+ function confirmDelete (id ) {
65+ if (confirm (" Do you really want to delete this post?" ) == true ) {
66+ deletePost (id);
67+ }
68+ }
69+
6470function deletePost (id ){
6571 $ .ajax ({
6672 url: ' deletePost/' + id,
Original file line number Diff line number Diff line change 88<script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script >
99<script src =" <c:url value=" /resources /datetime-picker.js " />" ></script >
1010<script src =" <c:url value=" /resources /validator.js " />" ></script >
11+ <style type =" text/css" >
12+ .btn.disabled {
13+ background-color : #ddd ;
14+ border-color : #ddd ;
15+ }
1116
17+ .btn.disabled :hover {
18+ background-color : #ddd ;
19+ border-color : #ddd ;
20+ }
21+ </style >
1222</head >
1323<body >
1424<nav class =" navbar navbar-default" >
5666 <span class =" col-sm-9" ><input name =" sr" placeholder =" Subreddit (e.g. kitten)" class =" form-control" required data-minlength =" 3" /></span >
5767</div >
5868<br ><br >
59- <div class = " col-sm-3 " >
60- <label >Send replies to my inbox</label > & nbsp ; < input type =" checkbox" name =" sendreplies" value =" true" />
69+ <div >
70+ <label class = " col-sm-3 " >Send replies to my inbox</label > < span class = " col-sm-9 " >< input type =" checkbox" name =" sendreplies" value =" true" /></ span >
6171</div >
6272<br ><br >
6373
Original file line number Diff line number Diff line change 66<link rel =" stylesheet" href =" https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" >
77<script src =" http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js" ></script >
88<script src =" <c:url value=" /resources /validator.js " />" ></script >
9+ <style type =" text/css" >
10+ .btn.disabled {
11+ background-color : #ddd ;
12+ border-color : #ddd ;
13+ }
914
15+ .btn.disabled :hover {
16+ background-color : #ddd ;
17+ border-color : #ddd ;
18+ }
19+ </style >
1020</head >
1121<body >
1222<nav class =" navbar navbar-default" >
5464 <span class =" col-sm-9" ><input name =" sr" placeholder =" Subreddit (e.g. kitten)" class =" form-control" required data-minlength =" 3" /></span >
5565</div >
5666<br ><br >
57- <div class = " col-sm-3 " >
58- <label >Send replies to my inbox</label > & nbsp ; < input type =" checkbox" name =" sendreplies" value =" true" />
67+ <div >
68+ <label class = " col-sm-3 " >Send replies to my inbox</label > < span class = " col-sm-9 " >< input type =" checkbox" name =" sendreplies" value =" true" /></ span >
5969</div >
6070<br ><br >
6171
You can’t perform that action at this time.
0 commit comments