Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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
81145047
authored
Feb 05, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: js file autoformat
parent
67c189a2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
one/static/cloud.js
+17
-17
one/templates/box-filelist.html
+1
-1
store/views.py
+2
-2
No files found.
one/static/cloud.js
View file @
81145047
...
...
@@ -70,7 +70,7 @@ $(function() {
});
$
(
'#old-upload'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
$
(
this
).
parent
().
hide
().
next
(
'div
'
).
show
();
$
(
this
).
parent
().
hide
().
parent
().
find
(
'#old-upload-form
'
).
show
();
return
false
;
})
...
...
@@ -197,12 +197,12 @@ $(function() {
}
})
}
self
.
rename
=
function
(
item
,
e
)
{
self
.
rename
=
function
(
item
,
e
)
{
$
(
e
.
target
).
parent
().
parent
().
parent
().
unbind
(
'click'
);
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name'
).
html
(
'<input type="text" value="'
+
item
.
originalName
+
'" />\
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name'
).
html
(
'<input type="text" value="'
+
item
.
originalName
+
'" />\
<input type="submit" value="Átnevezés" />'
);
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=submit]'
).
click
(
function
(){
var
newName
=
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=text]'
).
val
();
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=submit]'
).
click
(
function
()
{
var
newName
=
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=text]'
).
val
();
loadFolder
(
self
.
currentPath
());
})
}
...
...
@@ -257,7 +257,7 @@ $(function() {
self
.
uploadURL
(
'/'
);
loadFolder
(
self
.
currentPath
());
};
xhr
.
onerror
=
function
()
{
xhr
.
onerror
=
function
()
{
$
(
'.file-upload'
).
removeClass
(
'opened'
);
$
(
'.file-upload .details'
).
slideUp
(
700
);
$
(
'#upload-zone'
).
show
();
...
...
@@ -273,19 +273,19 @@ $(function() {
var
complete
=
(
event
.
loaded
/
event
.
total
*
100
|
0
);
//progress.value = progress.innerHTML = complete;
self
.
uploadProgress
(
parseInt
(
complete
)
+
'%'
);
var
suffix
=
'B KB MB GB'
.
split
(
' '
);
var
l
=
event
.
loaded
;
var
t
=
event
.
total
;
for
(
var
i
=
0
;
l
>
1024
;
i
++
)
{
l
/=
1024
;
var
suffix
=
'B KB MB GB'
.
split
(
' '
);
var
l
=
event
.
loaded
;
var
t
=
event
.
total
;
for
(
var
i
=
0
;
l
>
1024
;
i
++
)
{
l
/=
1024
;
}
l
=
l
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
for
(
var
i
=
0
;
t
>
1024
;
i
++
)
{
t
/=
1024
;
l
=
l
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
for
(
var
i
=
0
;
t
>
1024
;
i
++
)
{
t
/=
1024
;
}
t
=
t
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
if
(
complete
<
100
)
{
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: '
+
l
+
'/'
+
t
+
' ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
t
=
t
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
if
(
complete
<
100
)
{
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: '
+
l
+
'/'
+
t
+
' ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
}
else
{
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: Mindjárt kész...'
);
}
...
...
one/templates/box-filelist.html
View file @
81145047
...
...
@@ -86,7 +86,7 @@
<img
class=
"preview"
/>
</div>
<div
style=
"display: none"
id=
"upload-progress-text"
class=
"upload-zone"
></div>
<div
style=
"display: none"
class=
"upload-zone"
>
<div
style=
"display: none"
class=
"upload-zone"
id=
"old-upload-form"
>
<form
action=
"/"
method=
"POST"
data-bind=
"attr: {action: uploadURL}"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"data"
/>
<input
type=
"submit"
value=
"Feltöltés"
/>
...
...
store/views.py
View file @
81145047
...
...
@@ -102,8 +102,8 @@ def ajax_quota(request):
user
=
request
.
user
.
username
if
StoreApi
.
userexist
(
user
)
!=
True
:
estabilish_store_user
(
user
)
#
return HttpResponse(json.dumps(StoreApi.requestquota(user)))
return
HttpResponse
(
json
.
dumps
({
'Used'
:
20
,
'Soft'
:
160
,
'Hard'
:
200
}))
return
HttpResponse
(
json
.
dumps
(
StoreApi
.
requestquota
(
user
)))
#
return HttpResponse(json.dumps({'Used':20,'Soft':160,'Hard':200}))
@login_required
def
ajax_download
(
request
):
...
...
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