Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b1cfe46b
authored
Nov 19, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix width for certain btn icons
also add spinner if clicked on op (same as mass op)
parent
4e9564a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
circle/dashboard/static/dashboard/dashboard.less
+9
-0
circle/dashboard/static/dashboard/vm-common.js
+2
-0
circle/dashboard/templates/dashboard/_disk-list-element.html
+2
-2
circle/dashboard/templates/dashboard/operate.html
+3
-3
circle/dashboard/templates/dashboard/vm-detail/_disk-operations.html
+1
-1
No files found.
circle/dashboard/static/dashboard/dashboard.less
View file @
b1cfe46b
...
@@ -1182,3 +1182,12 @@ textarea[name="new_members"] {
...
@@ -1182,3 +1182,12 @@ textarea[name="new_members"] {
flex: 1;
flex: 1;
}
}
}
}
.fa-fw-12 {
/* fa-fw is too wide */
width: 12px;
}
.btn-op-form-send {
padding: 6px 12px 6px 8px;
}
circle/dashboard/static/dashboard/vm-common.js
View file @
b1cfe46b
...
@@ -26,6 +26,8 @@ $(function() {
...
@@ -26,6 +26,8 @@ $(function() {
$
(
"body"
).
on
(
"click"
,
"#op-form-send"
,
function
()
{
$
(
"body"
).
on
(
"click"
,
"#op-form-send"
,
function
()
{
var
url
=
$
(
this
).
closest
(
"form"
).
prop
(
"action"
);
var
url
=
$
(
this
).
closest
(
"form"
).
prop
(
"action"
);
$
(
this
).
find
(
"i"
).
prop
(
"class"
,
"fa fa-fw fa-spinner fa-spin"
);
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
headers
:
{
"X-CSRFToken"
:
getCookie
(
'csrftoken'
)},
...
...
circle/dashboard/templates/dashboard/_disk-list-element.html
View file @
b1cfe46b
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<a
href=
"{{ op.remove_disk.get_url }}?disk={{d.pk}}"
<a
href=
"{{ op.remove_disk.get_url }}?disk={{d.pk}}"
class=
"btn btn-xs btn-{{ op.remove_disk.effect}} pull-right operation disk-remove-btn
class=
"btn btn-xs btn-{{ op.remove_disk.effect}} pull-right operation disk-remove-btn
{% if op.remove_disk.disabled %}disabled{% endif %}"
>
{% if op.remove_disk.disabled %}disabled{% endif %}"
>
<i
class=
"fa fa-{{ op.remove_disk.icon }}"
></i>
{% trans "Remove" %}
<i
class=
"fa fa-{{ op.remove_disk.icon }}
fa-fw-12
"
></i>
{% trans "Remove" %}
</a>
</a>
</span>
</span>
{% endif %}
{% endif %}
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<a
href=
"{{ op.resize_disk.get_url }}?disk={{d.pk}}"
<a
href=
"{{ op.resize_disk.get_url }}?disk={{d.pk}}"
class=
"btn btn-xs btn-{{ op.resize_disk.effect }} pull-right operation disk-resize-btn
class=
"btn btn-xs btn-{{ op.resize_disk.effect }} pull-right operation disk-resize-btn
{% if op.resize_disk.disabled %}disabled{% endif %}"
>
{% if op.resize_disk.disabled %}disabled{% endif %}"
>
<i
class=
"fa fa-{{ op.resize_disk.icon }}"
></i>
{% trans "Resize" %}
<i
class=
"fa fa-{{ op.resize_disk.icon }}
fa-fw-12
"
></i>
{% trans "Resize" %}
</a>
</a>
</span>
</span>
{% endif %}
{% endif %}
...
...
circle/dashboard/templates/dashboard/operate.html
View file @
b1cfe46b
...
@@ -19,8 +19,8 @@ Do you want to perform the following operation on
...
@@ -19,8 +19,8 @@ Do you want to perform the following operation on
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<a
class=
"btn btn-default"
href=
"{{object.get_absolute_url}}"
<a
class=
"btn btn-default"
href=
"{{object.get_absolute_url}}"
data-dismiss=
"modal"
>
{% trans "Cancel" %}
</a>
data-dismiss=
"modal"
>
{% trans "Cancel" %}
</a>
<button
class=
"btn btn-{{ opview.effect }}"
type=
"submit"
id=
"op-form-send"
>
<button
class=
"btn btn-{{ opview.effect }}
btn-op-form-send
"
type=
"submit"
id=
"op-form-send"
>
{% if opview.icon %}
<i
class=
"fa
fa-{{opview.icon}}"
></i>
{% endif %}{{ op|capfirst }}
{% if opview.icon %}
<i
class=
"fa fa-fw
fa-{{opview.icon}}"
></i>
{% endif %}{{ op|capfirst }}
</button>
</button>
</div>
</div>
</form>
</form>
circle/dashboard/templates/dashboard/vm-detail/_disk-operations.html
View file @
b1cfe46b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
{% if op.is_disk_operation %}
{% if op.is_disk_operation %}
<a
href=
"{{op.get_url}}"
class=
"btn btn-success btn-xs
<a
href=
"{{op.get_url}}"
class=
"btn btn-success btn-xs
operation operation-{{op.op}}"
>
operation operation-{{op.op}}"
>
<i
class=
"fa fa-{{op.icon}}"
></i>
<i
class=
"fa fa-{{op.icon}}
fa-fw-12
"
></i>
{{op.name}}
</a>
{{op.name}}
</a>
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}
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