Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
QUIQQER
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
162
Issues
162
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QUIQQER
QUIQQER
Commits
afa01def
Commit
afa01def
authored
May 15, 2020
by
Henning Leutz
🥋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: upload finish status is now set correctly
parent
1cce363c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
34 deletions
+41
-34
bin/QUI/controls/upload/File.js
bin/QUI/controls/upload/File.js
+6
-4
bin/QUI/controls/upload/Form.js
bin/QUI/controls/upload/Form.js
+6
-1
bin/QUI/controls/upload/Manager.js
bin/QUI/controls/upload/Manager.js
+29
-29
No files found.
bin/QUI/controls/upload/File.js
View file @
afa01def
...
...
@@ -104,6 +104,7 @@ define('controls/upload/File', [
this
.
$result
=
null
;
this
.
$error
=
false
;
this
.
$errors
=
0
;
this
.
$uploaded
=
false
;
this
.
$ContextMenu
=
null
;
this
.
$slice_method
=
'
slice
'
;
...
...
@@ -409,6 +410,7 @@ define('controls/upload/File', [
}
if
(
this
.
$error
===
false
)
{
this
.
$uploaded
=
true
;
this
.
fireEvent
(
'
complete
'
,
[
this
,
this
.
$result
]);
}
...
...
@@ -498,7 +500,7 @@ define('controls/upload/File', [
* @return {Boolean}
*/
isFinished
:
function
()
{
return
this
.
$
range_end
===
this
.
$file_size
;
return
this
.
$
uploaded
;
},
/**
...
...
@@ -566,10 +568,10 @@ define('controls/upload/File', [
response
.
text
().
then
(
function
(
text
)
{
this
.
$parseResult
(
text
);
}.
bind
(
this
));
this
.
refresh
();
this
.
upload
();
this
.
refresh
();
this
.
upload
();
}.
bind
(
this
));
}.
bind
(
this
)).
catch
(
function
(
err
)
{
console
.
error
(
'
Information about the upload error:
'
,
err
);
...
...
bin/QUI/controls/upload/Form.js
View file @
afa01def
...
...
@@ -25,13 +25,14 @@ define('controls/upload/Form', [
'
qui/controls/Control
'
,
'
qui/controls/utils/Progressbar
'
,
'
qui/controls/buttons/Button
'
,
'
qui/controls/loader/Loader
'
,
'
utils/Media
'
,
'
classes/request/Upload
'
,
'
Locale
'
,
'
css!controls/upload/Form.css
'
],
function
(
QUI
,
QUIControl
,
QUIProgressbar
,
QUIButton
,
MediaUtils
,
Upload
,
Locale
)
{
],
function
(
QUI
,
QUIControl
,
QUIProgressbar
,
QUIButton
,
QUILoader
,
MediaUtils
,
Upload
,
Locale
)
{
"
use strict
"
;
var
lg
=
'
quiqqer/quiqqer
'
;
...
...
@@ -256,6 +257,8 @@ define('controls/upload/Form', [
}
});
this
.
$Loader
=
new
QUILoader
().
inject
(
this
.
$Elm
);
this
.
$Buttons
=
this
.
$Elm
.
getElement
(
'
.controls-upload-buttons
'
);
this
.
$BgText
=
this
.
$Elm
.
getElement
(
'
.controls-upload-bg-text
'
);
this
.
$Info
=
this
.
$Elm
.
getElement
(
'
.controls-upload-info
'
);
...
...
@@ -913,6 +916,7 @@ define('controls/upload/Form', [
return
;
}
this
.
$Loader
.
show
();
this
.
fireEvent
(
'
submit
'
,
[
this
.
getFiles
(),
this
]);
// send to upload manager
...
...
@@ -992,6 +996,7 @@ define('controls/upload/Form', [
}
}
this
.
$Loader
.
hide
();
this
.
fireEvent
(
'
finished
'
,
[
this
]);
this
.
$finished
=
true
;
}.
bind
(
this
));
...
...
bin/QUI/controls/upload/Manager.js
View file @
afa01def
...
...
@@ -36,7 +36,7 @@ define('controls/upload/Manager', [
return
new
Class
({
Extends
:
QUIPanel
,
Type
:
'
controls/upload/Manager
'
,
Type
:
'
controls/upload/Manager
'
,
Binds
:
[
'
$onCreate
'
,
...
...
@@ -47,19 +47,19 @@ define('controls/upload/Manager', [
],
options
:
{
icon
:
'
fa fa-upload
'
,
icon
:
'
fa fa-upload
'
,
pauseAllowed
:
true
,
contextMenu
:
true
contextMenu
:
true
},
initialize
:
function
(
options
)
{
this
.
parent
(
options
);
this
.
$files
=
[];
this
.
$files
=
[];
this
.
$container
=
null
;
this
.
$uploads
=
{};
this
.
$uploads
=
{};
this
.
$maxPercent
=
0
;
this
.
$maxPercent
=
0
;
this
.
$uploadPerCents
=
{};
this
.
$Container
=
null
;
...
...
@@ -79,8 +79,8 @@ define('controls/upload/Manager', [
}).
inject
(
this
.
getContent
());
this
.
addButton
({
icon
:
'
fa fa-trash
'
,
title
:
Locale
.
get
(
lg
,
'
upload.manager.clear
'
),
icon
:
'
fa fa-trash
'
,
title
:
Locale
.
get
(
lg
,
'
upload.manager.clear
'
),
styles
:
{
'
float
'
:
'
right
'
},
...
...
@@ -219,10 +219,10 @@ define('controls/upload/Manager', [
// ask for extraction
new
QUIAlert
({
title
:
Locale
.
get
(
lg
,
'
upload.manager.message.archivfile.title
'
),
content
:
Locale
.
get
(
lg
,
'
upload.manager.message.archivfile.text
'
)
+
'
<br />
'
+
list
,
title
:
Locale
.
get
(
lg
,
'
upload.manager.message.archivfile.title
'
),
content
:
Locale
.
get
(
lg
,
'
upload.manager.message.archivfile.text
'
)
+
'
<br />
'
+
list
,
closeButtonText
:
Locale
.
get
(
lg
,
'
upload.manager.message.archivfile.btn.start
'
),
events
:
{
events
:
{
onClose
:
function
(
Win
)
{
var
i
,
len
;
...
...
@@ -311,7 +311,7 @@ define('controls/upload/Manager', [
};
for
(
i
=
0
,
len
=
files
.
length
;
i
<
len
;
i
++
)
{
file_params
=
Object
.
clone
(
params
);
file_params
=
Object
.
clone
(
params
);
file_params
.
extract
=
false
;
if
(
extract
&&
extract
[
files
[
i
].
name
])
{
...
...
@@ -325,18 +325,18 @@ define('controls/upload/Manager', [
}
var
QUIFile
=
new
UploadFile
(
files
[
i
],
{
phpfunc
:
rf
,
params
:
file_params
,
events
:
events
,
phpfunc
:
rf
,
params
:
file_params
,
events
:
events
,
pauseAllowed
:
this
.
getAttribute
(
'
pauseAllowed
'
),
contextMenu
:
this
.
getAttribute
(
'
contextMenu
'
)
contextMenu
:
this
.
getAttribute
(
'
contextMenu
'
)
});
QUIFile
.
addEvents
({
onComplete
:
onComplete
,
onRefresh
:
onRefresh
,
onError
:
onError
,
onCancel
:
onCancel
onRefresh
:
onRefresh
,
onError
:
onError
,
onCancel
:
onCancel
});
if
(
file_params
.
phponstart
)
{
...
...
@@ -359,13 +359,13 @@ define('controls/upload/Manager', [
Node
.
setStyles
({
background
:
'
#fff
'
,
border
:
'
1px solid #f1f1f1
'
,
bottom
:
10
,
boxShadow
:
'
0 0 10px rgba(0, 0, 0, 0.3)
'
,
position
:
'
absolute
'
,
right
:
10
,
width
:
300
,
zIndex
:
1000
border
:
'
1px solid #f1f1f1
'
,
bottom
:
10
,
boxShadow
:
'
0 0 10px rgba(0, 0, 0, 0.3)
'
,
position
:
'
absolute
'
,
right
:
10
,
width
:
300
,
zIndex
:
1000
});
Node
.
inject
(
document
.
body
);
...
...
@@ -444,10 +444,10 @@ define('controls/upload/Manager', [
QUIFile
=
new
UploadFile
(
params
.
file
,
{
phpfunc
:
params
.
phpfunc
,
params
:
params
,
events
:
{
params
:
params
,
events
:
{
onComplete
:
func_oncomplete
,
onCancel
:
func_oncancel
onCancel
:
func_oncancel
}
});
...
...
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