重构代码:增加footer默认样式fixed,精简task/noti脚本
This commit is contained in:
parent
32dbd6eb23
commit
f91770cf0a
|
@ -5,7 +5,7 @@
|
||||||
}
|
}
|
||||||
@section css {
|
@section css {
|
||||||
<style>
|
<style>
|
||||||
.site-footer, .main-content {
|
.main-content {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,5 @@
|
||||||
ViewBag.Title = "首页";
|
ViewBag.Title = "首页";
|
||||||
Layout = "~/Views/Shared/_Bootstrap.cshtml";
|
Layout = "~/Views/Shared/_Bootstrap.cshtml";
|
||||||
}
|
}
|
||||||
@section css {
|
<div class="content-body welcome-bg">
|
||||||
<style>
|
|
||||||
.site-footer {
|
|
||||||
position: fixed;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
}
|
|
||||||
<section id="main-content">
|
|
||||||
<div id="content" class="content-body welcome-bg">
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
|
@ -1,5 +1,5 @@
|
||||||
@model ModelBase
|
@model ModelBase
|
||||||
<footer class="site-footer">
|
<footer class="site-footer fixed">
|
||||||
<span id="websiteFooter">@Model.Footer</span>
|
<span id="websiteFooter">@Model.Footer</span>
|
||||||
<a id="gotoTop" href="#" class="go-top" title="返回顶部" data-toggle="tooltip" data-placement="left">
|
<a id="gotoTop" href="#" class="go-top" title="返回顶部" data-toggle="tooltip" data-placement="left">
|
||||||
<i class="fa fa-angle-up"></i>
|
<i class="fa fa-angle-up"></i>
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
$(function () {
|
$(function () {
|
||||||
$('.site-footer').footer();
|
|
||||||
|
|
||||||
var apiUrl = "api/New";
|
var apiUrl = "api/New";
|
||||||
var $table = $('table').smartTable({
|
var $table = $('table').smartTable({
|
||||||
url: apiUrl,
|
url: apiUrl,
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
$(function () {
|
$(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>';
|
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 () {
|
$('#refreshTask').on('click', function () {
|
||||||
|
@ -14,9 +12,9 @@
|
||||||
return $.format(htmlTask, task.TaskName, task.UserName, task.AssignTime, task.Id);
|
return $.format(htmlTask, task.TaskName, task.UserName, task.AssignTime, task.Id);
|
||||||
}).join('');
|
}).join('');
|
||||||
$('#list-task').html(content);
|
$('#list-task').html(content);
|
||||||
|
$('.site-footer').footer();
|
||||||
}
|
}
|
||||||
that.toggleClass('fa-spin');
|
that.toggleClass('fa-spin');
|
||||||
$footer.footer();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}).trigger('click');
|
}).trigger('click');
|
||||||
|
|
Loading…
Reference in New Issue