Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
survey
Commits
5957a996
Commit
5957a996
authored
Apr 02, 2020
by
Anatole Rakotoson
Browse files
sommom
parent
dd375f0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
views/tpls/forms/uploader.php
View file @
5957a996
...
...
@@ -152,9 +152,11 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
<script
type=
"text/javascript"
>
//var domUploader="
<?php
echo
$domUploader
?>
"
;
var uploadAnswerObj=
<?php
echo
json_encode
(
$uploaderObj
);
?>
;
uploadAnswerObj[
"
path
"
]=uploadObj.get(uploadAnswerObj.contextType,uploadAnswerObj.contextId, uploadAnswerObj.docType, null, null, uploadAnswerObj.extraPath);
var initListUploader=
<?php
echo
json_encode
(
@
$initAnswerFiles
);
?>
;
uploadAnswerObj[
"
path
"
]=getPath(uploadAnswerObj.contextType,uploadAnswerObj.contextId, uploadAnswerObj.docType, null, null, uploadAnswerObj.extraPath);
jQuery(document).ready(function() {
$(
"
#
"
+uploadAnswerObj.dom).off();
$(
"
#
"
+uploadAnswerObj.dom).fineUploader({
template: 'qq-template-manual-trigger',
...
...
@@ -330,6 +332,23 @@ $initAnswerFiles=Document::getListDocumentsWhere(array(
}
});
});
function getPath (type,id, docT, contentK, foldKey, extraUrl){
//mylog.log(
"
uploadObj
.
get
"
, type,id, docT, contentK, foldKey, extraUrl);
docT=(docT !== null && docT) ? docT :
"
image
"
;
typeForUpload = type;
path = baseUrl+
"
/
"
+moduleId+
"
/
document
/
uploadSave
/
dir
/
communecter
/
folder
/
"
+typeForUpload+
"
/
ownerId
/
"
+id+
"
/
input
/
qqfile
/
docType
/
"
+docT; *
if(contentK !== null && contentK !=
""
)
path +=
"
/
contentKey
/
"
+contentK;
else if(docT ==
"
image
"
)
path +=
"
/
contentKey
/
profil
"
;
if(foldKey !== null && foldKey !=
""
)
path +=
"
/
folderId
/
"
+foldKey;
if(extraUrl !== null && extraUrl !=
""
&& extraUrl !== true)
path += extraUrl;
//mylog.log(
"
uploadObj
.
get
return
"
, path, uploadObj.path);
return path;
}
function prepFileForFormsUploader(data){
arrayList=[];
$i=0;
...
...
Write
Preview
Supports
Markdown
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