Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
e5d326ea
authored
Jul 09, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: loading indicator for store upload
parent
0ae8ac7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
circle/dashboard/static/dashboard/store.js
+4
-3
circle/dashboard/templates/dashboard/store/_list-box.html
+3
-2
No files found.
circle/dashboard/static/dashboard/store.js
View file @
e5d326ea
...
@@ -15,9 +15,10 @@ $(function() {
...
@@ -15,9 +15,10 @@ $(function() {
});
});
/* less js way, but at least works, tho redirection is bad */
/* less js way, but at least works, tho redirection is bad */
$
(
"#store-list-container"
).
on
(
"click"
,
'#store-upload-form
input
[type="submit"]'
,
function
()
{
$
(
"#store-list-container"
).
on
(
"click"
,
'#store-upload-form
button
[type="submit"]'
,
function
()
{
var
current_dir
=
$
(
"#store-upload-form"
).
find
(
'[name="current_dir"]'
).
val
();
var
current_dir
=
$
(
"#store-upload-form"
).
find
(
'[name="current_dir"]'
).
val
();
$
.
get
(
$
(
"#store-upload-form"
).
data
(
"action"
)
+
"?current_dir="
+
current_dir
,
function
(
result
)
{
$
.
get
(
$
(
"#store-upload-form"
).
data
(
"action"
)
+
"?current_dir="
+
current_dir
,
function
(
result
)
{
$
(
'#store-upload-form button[type="submit"] i'
).
addClass
(
"icon-spinner icon-spin"
);
$
(
"#store-upload-form"
).
get
(
0
).
setAttribute
(
"action"
,
result
[
'url'
]);
$
(
"#store-upload-form"
).
get
(
0
).
setAttribute
(
"action"
,
result
[
'url'
]);
$
(
"#store-upload-form"
).
submit
();
$
(
"#store-upload-form"
).
submit
();
});
});
...
@@ -44,10 +45,10 @@ $(function() {
...
@@ -44,10 +45,10 @@ $(function() {
input
.
val
(
log
);
input
.
val
(
log
);
}
}
if
(
log
)
{
if
(
log
)
{
$
(
'#store-upload-form
input
[type="submit"]'
).
prop
(
"disabled"
,
false
);
$
(
'#store-upload-form
button
[type="submit"]'
).
prop
(
"disabled"
,
false
);
}
else
{
}
else
{
$
(
'#store-upload-form
input
[type="submit"]'
).
prop
(
"disabled"
,
true
);
$
(
'#store-upload-form
button
[type="submit"]'
).
prop
(
"disabled"
,
true
);
}
}
});
});
...
...
circle/dashboard/templates/dashboard/store/_list-box.html
View file @
e5d326ea
...
@@ -81,8 +81,9 @@
...
@@ -81,8 +81,9 @@
<input
type=
"text"
class=
"form-control input-tags"
<input
type=
"text"
class=
"form-control input-tags"
id=
"store-upload-filename"
/>
id=
"store-upload-filename"
/>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<input
type=
"submit"
class=
"btn btn-primary btn-xs"
disabled
<button
type=
"submit"
class=
"btn btn-primary btn-xs"
disabled
>
value=
"{% trans "
Upload
"
%}"
/>
<i
class=
"icon-cloud-upload"
></i>
{% trans "Upload" %}
</button>
</span>
</span>
</div>
</div>
<input
id=
"store-upload-file"
name=
"data"
type=
"file"
style=
"display:none"
multiple
>
<input
id=
"store-upload-file"
name=
"data"
type=
"file"
style=
"display:none"
multiple
>
...
...
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