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
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() {
...
@@ -70,7 +70,7 @@ $(function() {
});
});
$
(
'#old-upload'
).
click
(
function
(
e
)
{
$
(
'#old-upload'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
$
(
this
).
parent
().
hide
().
next
(
'div
'
).
show
();
$
(
this
).
parent
().
hide
().
parent
().
find
(
'#old-upload-form
'
).
show
();
return
false
;
return
false
;
})
})
...
@@ -197,12 +197,12 @@ $(function() {
...
@@ -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
().
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" />'
);
<input type="submit" value="Átnevezés" />'
);
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=submit]'
).
click
(
function
(){
$
(
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
();
var
newName
=
$
(
e
.
target
).
parent
().
parent
().
parent
().
find
(
'.name input[type=text]'
).
val
();
loadFolder
(
self
.
currentPath
());
loadFolder
(
self
.
currentPath
());
})
})
}
}
...
@@ -257,7 +257,7 @@ $(function() {
...
@@ -257,7 +257,7 @@ $(function() {
self
.
uploadURL
(
'/'
);
self
.
uploadURL
(
'/'
);
loadFolder
(
self
.
currentPath
());
loadFolder
(
self
.
currentPath
());
};
};
xhr
.
onerror
=
function
()
{
xhr
.
onerror
=
function
()
{
$
(
'.file-upload'
).
removeClass
(
'opened'
);
$
(
'.file-upload'
).
removeClass
(
'opened'
);
$
(
'.file-upload .details'
).
slideUp
(
700
);
$
(
'.file-upload .details'
).
slideUp
(
700
);
$
(
'#upload-zone'
).
show
();
$
(
'#upload-zone'
).
show
();
...
@@ -273,19 +273,19 @@ $(function() {
...
@@ -273,19 +273,19 @@ $(function() {
var
complete
=
(
event
.
loaded
/
event
.
total
*
100
|
0
);
var
complete
=
(
event
.
loaded
/
event
.
total
*
100
|
0
);
//progress.value = progress.innerHTML = complete;
//progress.value = progress.innerHTML = complete;
self
.
uploadProgress
(
parseInt
(
complete
)
+
'%'
);
self
.
uploadProgress
(
parseInt
(
complete
)
+
'%'
);
var
suffix
=
'B KB MB GB'
.
split
(
' '
);
var
suffix
=
'B KB MB GB'
.
split
(
' '
);
var
l
=
event
.
loaded
;
var
l
=
event
.
loaded
;
var
t
=
event
.
total
;
var
t
=
event
.
total
;
for
(
var
i
=
0
;
l
>
1024
;
i
++
)
{
for
(
var
i
=
0
;
l
>
1024
;
i
++
)
{
l
/=
1024
;
l
/=
1024
;
}
}
l
=
l
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
l
=
l
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
for
(
var
i
=
0
;
t
>
1024
;
i
++
)
{
for
(
var
i
=
0
;
t
>
1024
;
i
++
)
{
t
/=
1024
;
t
/=
1024
;
}
}
t
=
t
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
t
=
t
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
if
(
complete
<
100
)
{
if
(
complete
<
100
)
{
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: '
+
l
+
'/'
+
t
+
' ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: '
+
l
+
'/'
+
t
+
' ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
}
else
{
}
else
{
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: Mindjárt kész...'
);
$
(
'#upload-progress-text'
).
html
(
'Feltöltés: Mindjárt kész...'
);
}
}
...
...
one/templates/box-filelist.html
View file @
81145047
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<img
class=
"preview"
/>
<img
class=
"preview"
/>
</div>
</div>
<div
style=
"display: none"
id=
"upload-progress-text"
class=
"upload-zone"
></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"
>
<form
action=
"/"
method=
"POST"
data-bind=
"attr: {action: uploadURL}"
enctype=
"multipart/form-data"
>
<input
type=
"file"
name=
"data"
/>
<input
type=
"file"
name=
"data"
/>
<input
type=
"submit"
value=
"Feltöltés"
/>
<input
type=
"submit"
value=
"Feltöltés"
/>
...
...
store/views.py
View file @
81145047
...
@@ -102,8 +102,8 @@ def ajax_quota(request):
...
@@ -102,8 +102,8 @@ def ajax_quota(request):
user
=
request
.
user
.
username
user
=
request
.
user
.
username
if
StoreApi
.
userexist
(
user
)
!=
True
:
if
StoreApi
.
userexist
(
user
)
!=
True
:
estabilish_store_user
(
user
)
estabilish_store_user
(
user
)
#
return HttpResponse(json.dumps(StoreApi.requestquota(user)))
return
HttpResponse
(
json
.
dumps
(
StoreApi
.
requestquota
(
user
)))
return
HttpResponse
(
json
.
dumps
({
'Used'
:
20
,
'Soft'
:
160
,
'Hard'
:
200
}))
#
return HttpResponse(json.dumps({'Used':20,'Soft':160,'Hard':200}))
@login_required
@login_required
def
ajax_download
(
request
):
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