Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
8ee9d02f
Commit
8ee9d02f
authored
Feb 24, 2017
by
Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed html
parent
548d7ef9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
7 deletions
+34
-7
_asset_bulk_update_modal.html
apps/assets/templates/assets/_asset_bulk_update_modal.html
+0
-5
asset_list.html
apps/assets/templates/assets/asset_list.html
+34
-2
No files found.
apps/assets/templates/assets/_asset_bulk_update_modal.html
View file @
8ee9d02f
...
@@ -77,10 +77,6 @@
...
@@ -77,10 +77,6 @@
</div>
</div>
</form>
</form>
{% endblock %}
{% endblock %}
{% block modal_confirm_id %}btn_asset_bulk_update{% endblock %}
{% block modal_confirm_id %}btn_asset_bulk_update{% endblock %}
\ No newline at end of file
apps/assets/templates/assets/asset_list.html
View file @
8ee9d02f
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<div
class=
"tagBtnList"
>
<div
class=
"tagBtnList"
>
{% for tag in tag_list %}
{% for tag in tag_list %}
<a
href=
"{% url 'assets:asset-tags' tag_id=tag.0 %}"
<a
href=
"{% url 'assets:asset-tags' tag_id=tag.0 %}"
{%
if
tag
.
0
|
int_to_str
=
=
tag_id
%}
{%
if
tag
.
0 =
=
tag_id
%}
class=
"tagBtn2 label label-warning"
name=
"tag_on"
>
class=
"tagBtn2 label label-warning"
name=
"tag_on"
>
{% else %}
{% else %}
class="tagBtn2 label label-default">
class="tagBtn2 label label-default">
...
@@ -104,6 +104,38 @@ function tagShow() {
...
@@ -104,6 +104,38 @@ function tagShow() {
}
}
}
//onload;
}
//onload;
function
objDelete
(
obj
,
name
,
url
)
{
function
doDelete
()
{
var
body
=
{};
var
success
=
function
()
{
swal
(
'Deleted!'
,
"[ "
+
name
+
"]"
+
" has been deleted "
,
"success"
);
$
(
obj
).
parent
().
parent
().
remove
();
};
var
fail
=
function
()
{
swal
(
"Failed"
,
"Delete"
+
"[ "
+
name
+
" ]"
+
"failed"
,
"error"
);
};
APIUpdateAttr
({
url
:
url
,
body
:
JSON
.
stringify
(
body
),
method
:
'DELETE'
,
success
:
success
,
error
:
fail
});
}
swal
({
title
:
'Are you sure delete ?'
,
text
:
" ["
+
name
+
"] "
,
type
:
"warning"
,
showCancelButton
:
true
,
cancelButtonText
:
'Cancel'
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
'Confirm'
,
closeOnConfirm
:
false
},
function
()
{
doDelete
()
});
}
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
var
options
=
{
var
options
=
{
ele
:
$
(
'#asset_list_table'
),
ele
:
$
(
'#asset_list_table'
),
...
@@ -186,7 +218,7 @@ $(document).ready(function(){
...
@@ -186,7 +218,7 @@ $(document).ready(function(){
var
name
=
$
(
this
).
closest
(
"tr"
).
find
(
":nth-child(2)"
).
children
(
'a'
).
html
();
var
name
=
$
(
this
).
closest
(
"tr"
).
find
(
":nth-child(2)"
).
children
(
'a'
).
html
();
var
uid
=
$this
.
data
(
'uid'
);
var
uid
=
$this
.
data
(
'uid'
);
var
the_url
=
'{% url "api-assets:asset-detail" pk=99991937 %}'
.
replace
(
'99991937'
,
uid
);
var
the_url
=
'{% url "api-assets:asset-detail" pk=99991937 %}'
.
replace
(
'99991937'
,
uid
);
obj
ect
Delete
(
$this
,
name
,
the_url
);
objDelete
(
$this
,
name
,
the_url
);
$data_table
.
ajax
.
reload
();
$data_table
.
ajax
.
reload
();
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment