重构代码:增加footer默认样式fixed,精简task/noti脚本

This commit is contained in:
Argo-MacBookPro 2018-09-15 17:33:56 +08:00
parent 32dbd6eb23
commit f91770cf0a
5 changed files with 6 additions and 19 deletions

View File

@ -5,7 +5,7 @@
}
@section css {
<style>
.site-footer, .main-content {
.main-content {
position: fixed;
}

View File

@ -3,14 +3,5 @@
ViewBag.Title = "首页";
Layout = "~/Views/Shared/_Bootstrap.cshtml";
}
@section css {
<style>
.site-footer {
position: fixed;
}
</style>
}
<section id="main-content">
<div id="content" class="content-body welcome-bg">
<div class="content-body welcome-bg">
</div>
</section>

View File

@ -1,5 +1,5 @@
@model ModelBase
<footer class="site-footer">
<footer class="site-footer fixed">
<span id="websiteFooter">@Model.Footer</span>
<a id="gotoTop" href="#" class="go-top" title="返回顶部" data-toggle="tooltip" data-placement="left">
<i class="fa fa-angle-up"></i>

View File

@ -1,6 +1,4 @@
$(function () {
$('.site-footer').footer();
var apiUrl = "api/New";
var $table = $('table').smartTable({
url: apiUrl,

View File

@ -1,6 +1,4 @@
$(function () {
var $footer = $('.site-footer').footer();
var htmlTask = '<li class="list-primary"><i class="fa fa-ellipsis-v"></i><div class="task-title notifi"><span class="task-title-sp">{0}</span><span class="task-value">{1}</span><span class="task-time">{2}</span><div class="pull-right hidden-phone"><button class="btn btn-success btn-xs fa fa-check" data-id="{3}" data-result="1"></button><button class="btn btn-danger btn-xs fa fa-remove" data-id="{3}" data-result="0" data-placement="left" data-original-title="拒绝授权"></button></div></div></li>';
$('#refreshTask').on('click', function () {
@ -14,9 +12,9 @@
return $.format(htmlTask, task.TaskName, task.UserName, task.AssignTime, task.Id);
}).join('');
$('#list-task').html(content);
$('.site-footer').footer();
}
that.toggleClass('fa-spin');
$footer.footer();
}
});
}).trigger('click');