新用户注册任务页面增加一个表头,微调样式

This commit is contained in:
Argo-Lenovo 2016-12-16 12:46:48 +08:00
parent 03e0367cca
commit 5907e5c380
3 changed files with 27 additions and 12 deletions

View File

@ -1,5 +1,4 @@
/*--------------Tasks Widget--------------*/
.task-content {
margin-bottom: 30px;
}
@ -30,7 +29,6 @@
.tasks-widget .task-list > li {
position: relative;
border-bottom: 1px dashed #eaeaea;
font-size: 12px;
}
@ -56,7 +54,7 @@
position: absolute;
left: 190px;
right: 40px;
top: 17px;
top: 15px;
display: inline-block;
}
@ -80,7 +78,7 @@
}
.tasks-widget .task-list li > .task-title .hidden-phone {
padding-top: 14px;
padding-top: 12px;
margin-right: 4px;
}
@ -112,15 +110,14 @@
.tasks-widget .task-list li .task-title.notifi .task-time {
position: absolute;
right: 66px;
top: 17px;
top: 15px;
display: inline-block;
color: #3c763d;
}
.tasks-widget .task-list li .task-title .task-title-sp {
margin-right: 5px;
max-width: 150px;
padding-top: 17px;
padding-top: 15px;
}
.tasks-widget .task-list li.task-done .task-title-sp {
@ -152,7 +149,7 @@
.tasks-widget .task-list li i {
position: absolute;
left: 6px;
padding: 19px 10px;
padding: 17px 10px;
cursor: pointer;
}
@ -229,6 +226,19 @@
border-left: 3px solid #b7d8e2;
}
.task-header {
font-size: 14px !important;
font-weight: 600;
background-color: #5cb85c !important;
color: #fff;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.task-oper {
padding-top: 15px;
padding-right: 20px;
}
@media (max-width: 548px) {
.tasks-widget .task-list li .task-title.notifi .task-value {

View File

@ -1,17 +1,21 @@
$(function () {
var $btnRefreshUser = $('#refreshUsers');
var htmlNewUsers = '<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 htmlNewUsersHeader = '<li class="task-header"><div class="task-title notifi"><span class="task-title-sp">登陆名称</span><span class="task-value">显示名称/备注</span><span class="task-time">注册时间</span><div class="pull-right task-oper">操作</div></div></li>';
var htmlNewUsers = '<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">{4}{1}</span><span class="task-time">{2}</span><div class="pull-right hidden-phone"><button class="btn btn-success btn-xs fa fa-check tipso_style" data-id="{3}" data-result="1" title="同意授权"></button><button class="btn btn-danger btn-xs fa fa-remove tipso_style" data-id="{3}" data-result="0" title="拒绝授权"></button></div></div></li>';
function listData() {
$btnRefreshUser.toggleClass('fa-spin');
var $taskUsers = $('#tasks-users');
$taskUsers.html(htmlNewUsersHeader);
$.bc({
Id: 'newusers', url: Notifications.url, method: 'GET', swal: false,
callback: function (result) {
if (result) {
var content = result.Users.map(function (noti) {
return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.ID);
return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.ID, noti.DisplayName);
}).join('');
$('#tasks-users').html(content);
$taskUsers.append(content);
if (!$.browser.versions.mobile) $('#tasks-users').find('.tipso_style').tipso({ position: 'top', width: 100 });
}
$btnRefreshUser.toggleClass('fa-spin');
}
@ -22,6 +26,7 @@
$btnRefreshUser.on('click', function () {
listData();
});
if (!$.browser.versions.mobile) $btnRefreshUser.tipso({ position: 'left', width: 100 });
$('#tasks-users').on('click', 'button', function () {
var id = $(this).attr('data-id');

View File

@ -18,7 +18,7 @@
@Html.Partial("Navigator", Model)
}
<div class="panel panel-default">
<div class="panel-heading">用户注册<span class="pull-right"><a id="refreshUsers" href="javascript:;" class="fa fa-refresh"></a></span></div>
<div class="panel-heading">用户注册<span class="pull-right"><a id="refreshUsers" href="javascript:;" class="fa fa-refresh tipso_style" title="点击刷新"></a></span></div>
<div class="panel-body">
<div class="tasks-widget">
<ul id="tasks-users" class="task-list ui-sortable">