Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
89ed0007
Commit
89ed0007
authored
11 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
jsdoc types should go into {}
parent
0d81a53e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files/js/file-upload.js
+26
-26
26 additions, 26 deletions
apps/files/js/file-upload.js
with
26 additions
and
26 deletions
apps/files/js/file-upload.js
+
26
−
26
View file @
89ed0007
...
@@ -37,7 +37,7 @@ function supportAjaxUploadWithProgress() {
...
@@ -37,7 +37,7 @@ function supportAjaxUploadWithProgress() {
/**
/**
* keeps track of uploads in progress and implements callbacks for the conflicts dialog
* keeps track of uploads in progress and implements callbacks for the conflicts dialog
* @type OC.Upload
* @type
{
OC.Upload
}
*/
*/
OC
.
Upload
=
{
OC
.
Upload
=
{
_uploads
:
[],
_uploads
:
[],
...
@@ -45,9 +45,9 @@ OC.Upload = {
...
@@ -45,9 +45,9 @@ OC.Upload = {
* cancels a single upload,
* cancels a single upload,
* @deprecated because it was only used when a file currently beeing uploaded was deleted. Now they are added after
* @deprecated because it was only used when a file currently beeing uploaded was deleted. Now they are added after
* they have been uploaded.
* they have been uploaded.
* @param string dir
* @param
{
string
}
dir
* @param string filename
* @param
{
string
}
filename
* @returns unresolved
* @returns
{
unresolved
}
*/
*/
cancelUpload
:
function
(
dir
,
filename
)
{
cancelUpload
:
function
(
dir
,
filename
)
{
var
self
=
this
;
var
self
=
this
;
...
@@ -63,7 +63,7 @@ OC.Upload = {
...
@@ -63,7 +63,7 @@ OC.Upload = {
},
},
/**
/**
* deletes the jqHXR object from a data selection
* deletes the jqHXR object from a data selection
* @param
data
data
* @param
{object}
data
*/
*/
deleteUpload
:
function
(
data
)
{
deleteUpload
:
function
(
data
)
{
delete
data
.
jqXHR
;
delete
data
.
jqXHR
;
...
@@ -86,7 +86,7 @@ OC.Upload = {
...
@@ -86,7 +86,7 @@ OC.Upload = {
/**
/**
* Checks the currently known uploads.
* Checks the currently known uploads.
* returns true if any hxr has the state 'pending'
* returns true if any hxr has the state 'pending'
* @returns
B
oolean
* @returns
{b
oolean
}
*/
*/
isProcessing
:
function
(){
isProcessing
:
function
(){
var
count
=
0
;
var
count
=
0
;
...
@@ -100,7 +100,7 @@ OC.Upload = {
...
@@ -100,7 +100,7 @@ OC.Upload = {
},
},
/**
/**
* callback for the conflicts dialog
* callback for the conflicts dialog
* @param data
* @param
{object}
data
*/
*/
onCancel
:
function
(
data
)
{
onCancel
:
function
(
data
)
{
this
.
cancelUploads
();
this
.
cancelUploads
();
...
@@ -108,7 +108,7 @@ OC.Upload = {
...
@@ -108,7 +108,7 @@ OC.Upload = {
/**
/**
* callback for the conflicts dialog
* callback for the conflicts dialog
* calls onSkip, onReplace or onAutorename for each conflict
* calls onSkip, onReplace or onAutorename for each conflict
* @param conflicts list of conflict elements
* @param
{object}
conflicts
-
list of conflict elements
*/
*/
onContinue
:
function
(
conflicts
)
{
onContinue
:
function
(
conflicts
)
{
var
self
=
this
;
var
self
=
this
;
...
@@ -132,7 +132,7 @@ OC.Upload = {
...
@@ -132,7 +132,7 @@ OC.Upload = {
},
},
/**
/**
* handle skipping an upload
* handle skipping an upload
* @param
data
data
* @param
{object}
data
*/
*/
onSkip
:
function
(
data
){
onSkip
:
function
(
data
){
this
.
log
(
'
skip
'
,
null
,
data
);
this
.
log
(
'
skip
'
,
null
,
data
);
...
@@ -140,7 +140,7 @@ OC.Upload = {
...
@@ -140,7 +140,7 @@ OC.Upload = {
},
},
/**
/**
* handle replacing a file on the server with an uploaded file
* handle replacing a file on the server with an uploaded file
* @param
data
data
* @param
{object}
data
*/
*/
onReplace
:
function
(
data
){
onReplace
:
function
(
data
){
this
.
log
(
'
replace
'
,
null
,
data
);
this
.
log
(
'
replace
'
,
null
,
data
);
...
@@ -149,7 +149,7 @@ OC.Upload = {
...
@@ -149,7 +149,7 @@ OC.Upload = {
},
},
/**
/**
* handle uploading a file and letting the server decide a new name
* handle uploading a file and letting the server decide a new name
* @param
data
data
* @param
{object}
data
*/
*/
onAutorename
:
function
(
data
){
onAutorename
:
function
(
data
){
this
.
log
(
'
autorename
'
,
null
,
data
);
this
.
log
(
'
autorename
'
,
null
,
data
);
...
@@ -170,13 +170,13 @@ OC.Upload = {
...
@@ -170,13 +170,13 @@ OC.Upload = {
/**
/**
* TODO checks the list of existing files prior to uploading and shows a simple dialog to choose
* TODO checks the list of existing files prior to uploading and shows a simple dialog to choose
* skip all, replace all or choosw which files to keep
* skip all, replace all or choosw which files to keep
* @param array selection of files to upload
* @param
{
array
}
selection of files to upload
* @param callbacks
to call:
* @param
{object}
callbacks
- object with several callback methods
*
onNoConflicts
,
*
@param {function} callbacks.
onNoConflicts
*
onSkipConflicts
,
*
@param {function} callbacks.
onSkipConflicts
*
onReplaceConflicts
,
*
@param {function} callbacks.
onReplaceConflicts
*
onChooseConflicts
,
*
@param {function} callbacks.
onChooseConflicts
*
onCancel
*
@param {function} callbacks.
onCancel
*/
*/
checkExistingFiles
:
function
(
selection
,
callbacks
){
checkExistingFiles
:
function
(
selection
,
callbacks
){
// TODO check filelist before uploading and show dialog on conflicts, use callbacks
// TODO check filelist before uploading and show dialog on conflicts, use callbacks
...
@@ -205,9 +205,9 @@ $(document).ready(function() {
...
@@ -205,9 +205,9 @@ $(document).ready(function() {
* - when only new -> remember as single replace action
* - when only new -> remember as single replace action
* - when both -> remember as single autorename action
* - when both -> remember as single autorename action
* - start uploading selection
* - start uploading selection
* @param {
type
} e
* @param {
object
} e
* @param {
type
} data
* @param {
object
} data
* @returns {
B
oolean}
* @returns {
b
oolean}
*/
*/
add
:
function
(
e
,
data
)
{
add
:
function
(
e
,
data
)
{
OC
.
Upload
.
log
(
'
add
'
,
e
,
data
);
OC
.
Upload
.
log
(
'
add
'
,
e
,
data
);
...
@@ -300,7 +300,7 @@ $(document).ready(function() {
...
@@ -300,7 +300,7 @@ $(document).ready(function() {
},
},
/**
/**
* called after the first add, does NOT have the data param
* called after the first add, does NOT have the data param
* @param e
* @param
{object}
e
*/
*/
start
:
function
(
e
)
{
start
:
function
(
e
)
{
OC
.
Upload
.
log
(
'
start
'
,
e
,
null
);
OC
.
Upload
.
log
(
'
start
'
,
e
,
null
);
...
@@ -334,8 +334,8 @@ $(document).ready(function() {
...
@@ -334,8 +334,8 @@ $(document).ready(function() {
},
},
/**
/**
* called for every successful upload
* called for every successful upload
* @param e
* @param
{object}
e
* @param data
* @param
{object}
data
*/
*/
done
:
function
(
e
,
data
)
{
done
:
function
(
e
,
data
)
{
OC
.
Upload
.
log
(
'
done
'
,
e
,
data
);
OC
.
Upload
.
log
(
'
done
'
,
e
,
data
);
...
@@ -372,8 +372,8 @@ $(document).ready(function() {
...
@@ -372,8 +372,8 @@ $(document).ready(function() {
},
},
/**
/**
* called after last upload
* called after last upload
* @param e
* @param
{object}
e
* @param data
* @param
{object}
data
*/
*/
stop
:
function
(
e
,
data
)
{
stop
:
function
(
e
,
data
)
{
OC
.
Upload
.
log
(
'
stop
'
,
e
,
data
);
OC
.
Upload
.
log
(
'
stop
'
,
e
,
data
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment