Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
a9edef48
Commit
a9edef48
authored
Jun 20, 2019
by
Carsten Rose
Browse files
Merge branch 'F8272-uploadSave' into 'master'
F8272 upload save See merge request
!154
parents
3ff3ea91
395c0f82
Pipeline
#1991
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
a9edef48
...
...
@@ -110,6 +110,7 @@ var QfqNS = QfqNS || {};
}
this
.
fileUploader
=
new
n
.
FileUpload
(
'
#
'
+
this
.
formId
,
this
.
fileUploadTo
);
this
.
startUploadHandler
=
this
.
startUploadHandler
.
bind
(
this
);
this
.
fileUploader
.
on
(
'
fileupload.started
'
,
this
.
startUploadHandler
);
this
.
fileUploader
.
on
(
'
fileupload.upload.successful
'
,
that
.
fileUploadSuccessHandler
);
...
...
@@ -117,6 +118,7 @@ var QfqNS = QfqNS || {};
function
(
obj
)
{
n
.
Helper
.
showAjaxError
(
null
,
obj
.
textStatus
,
obj
.
errorThrown
);
});
this
.
endUploadHandler
=
this
.
endUploadHandler
.
bind
(
this
);
this
.
fileUploader
.
on
(
'
fileupload.ended
'
,
this
.
endUploadHandler
);
this
.
fileDeleter
=
new
n
.
FileDelete
(
"
#
"
+
this
.
formId
,
this
.
fileDeleteUrl
);
...
...
@@ -818,6 +820,16 @@ var QfqNS = QfqNS || {};
this
.
resetLockState
();
};
n
.
QfqForm
.
prototype
.
deactivateSaveButton
=
function
()
{
this
.
getSaveButton
().
addClass
(
"
disabled
"
);
this
.
getSaveButton
().
attr
(
"
disabled
"
,
"
disabled
"
);
};
n
.
QfqForm
.
prototype
.
activateSaveButton
=
function
()
{
this
.
getSaveButton
().
removeClass
(
"
disabled
"
);
this
.
getSaveButton
().
removeAttr
(
"
disabled
"
);
};
n
.
QfqForm
.
prototype
.
getSaveButtonAttentionClass
=
function
()
{
var
$saveButton
=
this
.
getSaveButton
();
...
...
@@ -1199,6 +1211,7 @@ var QfqNS = QfqNS || {};
$
(
obj
.
target
).
after
(
$
(
'
<i>
'
).
addClass
(
'
spinner
'
)
);
this
.
deactivateSaveButton
();
};
/**
...
...
@@ -1208,6 +1221,7 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
endUploadHandler
=
function
(
obj
)
{
var
$siblings
=
$
(
obj
.
target
).
siblings
();
$siblings
.
filter
(
"
i
"
).
remove
();
this
.
activateSaveButton
();
};
/**
...
...
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