#71 fixing layout n adding
parent
bd975c53f3
commit
af3c0c0faa
@ -0,0 +1,43 @@
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function () {
|
||||
$(".task-row").mouseenter(function (event) {
|
||||
var taskRow = $(event.target).closest(".task-row");
|
||||
$(taskRow).css("background-color", "#f8f9fa");
|
||||
$(taskRow).find(".remove-task").removeClass("d-none");
|
||||
|
||||
});
|
||||
$(".task-row").mouseleave(function (event) {
|
||||
var taskRow = $(event.target).closest(".task-row");
|
||||
$(taskRow).css("background-color", "white");
|
||||
$(taskRow).closest(".task-row").find(".remove-task").addClass("d-none");
|
||||
});
|
||||
|
||||
$('a[data-confirm]').click(function(ev) {
|
||||
var href = $(this).attr('href');
|
||||
if (!$('#dataConfirmModal').length) {
|
||||
$('#modalDelete').append('<div class="modal fade" id="dataConfirmModal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"\n' +
|
||||
' >\n' +
|
||||
' <div class="modal-dialog modal-sm">\n' +
|
||||
' <div class="modal-content">\n' +
|
||||
' <div class="modal-header">\n' +
|
||||
' <h8 class="modal-title" id="myModalLabel">Удалить статью?</h8>\n' +
|
||||
' <button type="button" class="close" data-dismiss="modal" aria-label="Закрыть"><span\n' +
|
||||
' aria-hidden="true">×</span></button>\n' +
|
||||
' </div>\n' +
|
||||
|
||||
' <div class="modal-footer">\n' +
|
||||
' <a class="btn btn-primary" id="dataConfirmOK">Да</a>'+
|
||||
' <button class="btn primary" data-dismiss="modal" aria-hidden="true">Нет</button>'+
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>\n' +
|
||||
' </div>');
|
||||
}
|
||||
$('#dataConfirmModal').find('#myModalLabel').text($(this).attr('data-confirm'));
|
||||
$('#dataConfirmOK').attr('href', href);
|
||||
$('#dataConfirmModal').modal({show:true});
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
/*]]>*/
|
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="row text-left task-row" style="background-color: white;">
|
||||
<div class="col">
|
||||
<span th:replace="students/fragments/taskStatusFragment"/>
|
||||
<a th:href="@{'task?id='+ 1}">
|
||||
<span class="h6" >Первая хадач</span>
|
||||
<span class="text-muted">Курсовая работа</span>
|
||||
</a>
|
||||
<input class="id-class" type="hidden" th:value="1" />
|
||||
<a class="remove-task pull-right d-none" th:href="@{'/students/delete/'+1}"
|
||||
data-confirm="Удалить задачу?">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="headerfiles">
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<span th:fragment="taskStatus (taskStatus)" class="fa-stack fa-1x">
|
||||
<th:block th:switch="'ON_PREPARATION'">
|
||||
<div th:case="'ATTENTION'">
|
||||
<i class="fa fa-circle fa-stack-2x text-warning"></i>
|
||||
</div>
|
||||
<div th:case="'DRAFT'">
|
||||
<i class="fa fa-circle fa-stack-2x text-draft"></i>
|
||||
</div>
|
||||
<div th:case="'ON_PREPARATION'">
|
||||
<i class="fa fa-circle fa-stack-2x text-primary"></i>
|
||||
</div>
|
||||
<div th:case="'ON_REVIEW'">
|
||||
<i class="fa fa-circle fa-stack-2x text-review"></i>
|
||||
</div>
|
||||
<div th:case="'COMPLETED'">
|
||||
<i class="fa fa-circle fa-stack-2x text-success"></i>
|
||||
</div>
|
||||
<div th:case="'FAILED'">
|
||||
<i class="fa fa-circle fa-stack-2x text-failed"></i>
|
||||
</div>
|
||||
<div th:case="'ACCEPTED'">
|
||||
<i class="fa fa-circle fa-stack-2x text-accepted"></i>
|
||||
</div>
|
||||
<div th:case="'NOT_ACCEPTED'">
|
||||
<i class="fa fa-circle fa-stack-2x text-not-accepted"></i>
|
||||
</div>
|
||||
</th:block>
|
||||
<i class="fa fa-check fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue