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
Commit
c49a6319
authored
Feb 19, 2013
by
Dányi Bence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: fix module pattern
parent
2351ab14
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
one/static/script/store.js
+7
-6
one/static/script/util.js
+1
-0
No files found.
one/static/script/store.js
View file @
c49a6319
...
...
@@ -83,7 +83,7 @@ var cloud = (function(cloud) {
/**
* Loads the specified folder
*/
var
loadFolder
=
throttle
(
function
(
path
,
fast
)
{
var
loadFolder
=
cloud
.
throttle
(
function
(
path
,
fast
)
{
self
.
currentPath
(
path
);
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -113,7 +113,7 @@ var cloud = (function(cloud) {
})
});
self
.
loadTopList
=
throttle
(
function
()
{
self
.
loadTopList
=
cloud
.
throttle
(
function
()
{
self
.
currentPath
(
'/'
);
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -201,7 +201,7 @@ var cloud = (function(cloud) {
originalName
:
d
.
NAME
,
originalSize
:
d
.
SIZE
,
name
:
d
.
NAME
.
length
>
30
?
(
d
.
NAME
.
substr
(
0
,
20
)
+
'... ('
+
extension
+
')'
)
:
d
.
NAME
,
size
:
convert
(
d
.
SIZE
),
size
:
c
loud
.
c
onvert
(
d
.
SIZE
),
type
:
gettext
(
'file'
),
mTime
:
d
.
MTIME
,
getTypeClass
:
'name filetype-'
+
type
,
...
...
@@ -341,7 +341,7 @@ var cloud = (function(cloud) {
/**
* Creates a new folder (and then reloads the current folder)
*/
self
.
newFolder
=
throttle
(
function
(
i
,
e
)
{
self
.
newFolder
=
cloud
.
throttle
(
function
(
i
,
e
)
{
$
(
e
.
target
).
parent
().
parent
().
parent
().
removeClass
(
'opened'
);
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -367,7 +367,7 @@ var cloud = (function(cloud) {
/**
* Uploads the specified file(s)
*/
var
readfiles
=
delayUntil
(
function
(
file
)
{
var
readfiles
=
cloud
.
delayUntil
(
function
(
file
)
{
//1 GB file limit
if
(
file
.
size
>
1024
*
1024
*
1024
)
{
$
(
'#upload-zone'
).
hide
();
...
...
@@ -419,7 +419,7 @@ var cloud = (function(cloud) {
t
=
t
.
toFixed
(
1
)
+
' '
+
suffix
[
i
];
var
diff
=
new
Date
().
getTime
()
-
start
;
if
(
complete
<
100
)
{
$
(
'#upload-progress-text'
).
html
(
gettext
(
'Upload'
)
+
': '
+
convert
(
event
.
loaded
/
diff
*
1000
)
+
'/s ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
$
(
'#upload-progress-text'
).
html
(
gettext
(
'Upload'
)
+
': '
+
c
loud
.
c
onvert
(
event
.
loaded
/
diff
*
1000
)
+
'/s ('
+
(
event
.
loaded
/
event
.
total
*
100
).
toFixed
(
2
)
+
'%)'
);
}
else
{
$
(
'#upload-progress-text'
).
html
(
gettext
(
'Upload'
)
+
': '
+
gettext
(
'done, processing...'
));
}
...
...
@@ -484,4 +484,5 @@ var cloud = (function(cloud) {
e
.
preventDefault
();
return
false
;
});
return
cloud
;
})(
cloud
||
{});
one/static/script/util.js
View file @
c49a6319
...
...
@@ -50,4 +50,5 @@ var cloud = (function(cloud) {
check
.
apply
(
null
,
arguments
);
}
}
return
cloud
;
})(
cloud
||
{});
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