Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gjl2004yn
jumpserver
提交
4e1f9c97
J
jumpserver
项目概览
gjl2004yn
/
jumpserver
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jumpserver
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4e1f9c97
编写于
10月 16, 2016
作者:
江
江世峰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
asset:update assets_list by tag
上级
a3683f18
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
15 deletion
+30
-15
apps/assets/templates/assets/asset_list.html
apps/assets/templates/assets/asset_list.html
+28
-13
apps/static/css/jumpserver.css
apps/static/css/jumpserver.css
+2
-2
未找到文件。
apps/assets/templates/assets/asset_list.html
浏览文件 @
4e1f9c97
...
@@ -7,6 +7,9 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -7,6 +7,9 @@ div.dataTables_wrapper div.dataTables_filter,
.dataTables_length
{
.dataTables_length
{
float
:
right
!important
;
float
:
right
!important
;
}
}
div
.dataTables_wrapper
div
.dataTables_filter
{
margin-left
:
15px
;
}
.custom
{
.custom
{
float
:
left
;
float
:
left
;
margin-right
:
5px
;
margin-right
:
5px
;
...
@@ -21,21 +24,33 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -21,21 +24,33 @@ div.dataTables_wrapper div.dataTables_filter,
{% endblock %}
{% endblock %}
{% block tags_list %}
{% block tags_list %}
<div
class=
"ydxbd"
id=
"ydxbd"
style=
"display:
block
;"
>
<div
class=
"ydxbd"
id=
"ydxbd"
style=
"display:
none
;"
>
<div>
<div>
<p
id=
"tags_p"
>
<p
id=
"tags_p"
>
{% for tag in tag_list %}
{% for tag in tag_list %}
<a
href=
"{% url 'assets:asset-tags' tag_id=tag.0 %}"
{%
if
tag.0
|
IntToStr =
=
tag_id
%}
<a
href=
"{% url 'assets:asset-tags' tag_id=tag.0 %}"
>
class=
"fa fa-tag btn btn-sm btn-primary mar-j"
name=
"tag_on"
>
<span
{% else %}
{%
if
tag.0
|
IntToStr =
=
tag_id
%}
class="fa fa-tag btn btn-sm btn-outline btn-primary mar-j">
class=
"label label-warning"
name=
"tag_on"
{% endif %}
{%
else
%}
<span
class=
"mar"
>
class=
"label label-default"
<strong>
{{ tag.1}}
</strong>
({{ tag.2 }})
{%
endif
%}
</span></a>
>
{{ tag.1}}({{ tag.2 }})
</span>
</a>
{#
<a
href=
"{% url 'assets:asset-tags' tag_id=tag.0 %}"
#
}
{
#
{%
if
tag.0
|
IntToStr =
=
tag_id
%}
#
}
{
#
class=
"fa fa-tag btn btn-sm btn-warning btn-rounded mar-j"
name=
"tag_on"
>
#}
{# {% else %}#}
{# class="fa fa-tag btn btn-sm btn-default btn-rounded mar-j">#}
{# {% endif %}#}
{#
<span
class=
"mar"
>
#}
{#
<strong>
{{ tag.1}}
</strong>
({{ tag.2 }})#}
{#
</span></a>
#}
{% endfor %}
{% endfor %}
<a
href=
"{% url 'assets:asset-list' %}"
class=
"btn btn-sm btn-outline btn-default "
>
移除选择
</a>
{#
<a
href=
"{% url 'assets:asset-list' %}"
class=
"btn btn-sm btn-rounded btn-default "
>
移除选择
</a>
#}
<a
href=
"{% url 'assets:asset-list' %}"
><span
class=
"label label-default"
>
移除选择
</span></a>
</p>
</p>
</div>
</div>
</div>
</div>
...
@@ -121,8 +136,8 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -121,8 +136,8 @@ div.dataTables_wrapper div.dataTables_filter,
oDiv
.
style
.
display
=
"
none
"
;
oDiv
.
style
.
display
=
"
none
"
;
}
}
};
};
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
var
oTags
=
document
.
getElementById
(
"
ydxbd
"
);
var
table
=
$
(
'
#editable
'
).
DataTable
({
var
table
=
$
(
'
#editable
'
).
DataTable
({
"
aLengthMenu
"
:
[[
10
,
25
,
50
,
-
1
],
[
"
10
"
,
"
25
"
,
"
50
"
,
"
all
"
]],
"
aLengthMenu
"
:
[[
10
,
25
,
50
,
-
1
],
[
"
10
"
,
"
25
"
,
"
50
"
,
"
all
"
]],
"
iDisplayLength
"
:
25
,
"
iDisplayLength
"
:
25
,
...
@@ -130,11 +145,11 @@ div.dataTables_wrapper div.dataTables_filter,
...
@@ -130,11 +145,11 @@ div.dataTables_wrapper div.dataTables_filter,
"
aoColumnDefs
"
:
[
{
"
bSortable
"
:
false
,
"
aTargets
"
:
[
0
]
}],
"
aoColumnDefs
"
:
[
{
"
bSortable
"
:
false
,
"
aTargets
"
:
[
0
]
}],
"
bAutoWidth
"
:
false
,
"
bAutoWidth
"
:
false
,
"
language
"
:
{
"
url
"
:
"
/static/js/plugins/dataTables/i18n/zh-hans.json
"
},
"
language
"
:
{
"
url
"
:
"
/static/js/plugins/dataTables/i18n/zh-hans.json
"
},
//"dom": '
<
lf
<
t
>
ip
>
'
,
"
dom
"
:
'
<"custom">lftip
'
,
"
dom
"
:
'
<"custom">lftip
'
,
"
initComplete
"
:
function
()
{
"
initComplete
"
:
function
()
{
//alert( 'DataTables has finished its initialisation.' );
//alert( 'DataTables has finished its initialisation.' );
$
(
'
#editable_length
'
).
before
(
"
<a href=
\"
{% url 'assets:asset-create' %}
\"
class=
\"
btn btn-sm btn-primary custom
\"
> {% trans 'Create asset' %} </a> <button class='btn btn-sm btn-primary custom' id='zksx' onclick='tagShow()'>标签</button>
"
);
$
(
'
#editable_length
'
).
before
(
"
<a href=
\"
{% url 'assets:asset-create' %}
\"
class=
\"
btn btn-sm btn-primary custom
\"
> {% trans 'Create asset' %} </a> <button class='btn btn-sm btn-primary custom' id='zksx' onclick='tagShow()'>标签</button>
"
);
$
(
'
#editable
'
).
before
(
oTags
);
},
},
columns
:
[
columns
:
[
{
data
:
"
checkbox
"
},
{
data
:
"
checkbox
"
},
...
...
apps/static/css/jumpserver.css
浏览文件 @
4e1f9c97
...
@@ -204,12 +204,12 @@ table.dataTable tbody td.selected td i.text-navy
...
@@ -204,12 +204,12 @@ table.dataTable tbody td.selected td i.text-navy
padding-top
:
15px
;
padding-top
:
15px
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
display
:
block
;
display
:
block
;
background
:
#f4f4f4
;
/*background: #ccc;*/
padding-left
:
10px
;
padding-left
:
10px
;
}
}
.mar
{
.mar
{
margin-left
:
2px
;
margin-left
:
2px
;
line-height
:
15
px
;
line-height
:
0
px
;
}
}
.mar-j
{
.mar-j
{
margin-left
:
3px
;
margin-left
:
3px
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录