Commit 5957a996 authored by Anatole Rakotoson's avatar Anatole Rakotoson
Browse files

sommom

parent dd375f0a
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment