New Patch For Template Document 1
New Patch For Template Document 1
war\
CustomForms\CorporateLoan\ProposalHTMLTemplate.jsp) )
globalRowIndex = RowIndex;
console.log("cabinet:" + cabinet);
if(rteFlag=== 'Y'){
globalDocumentName = documentName;
console.log('rteIdJson-->' + rteIdJson);
selectSheet(rteIdJson[k].TAB_IDS, parseInt(rteIdJson[k].SHEET_INDEX));
// }
//selectSheet(getConstantWrapper('MainTab_Index'),
getConstantWrapper('Documentation_Index'));
var finalurl =
"/webdesktop/CustomForms/CorporateLoan/ProposalHtmlTemplate.jsp?PROCESS_NAME="
+ processName
+ "&WI_NAME="
+ processInstanceId
+ "&TEMPLATE_CODE="
+ templateCode
+ "&WORK_STEP="
+ activityName
+ "&DOCUMENT_NAME="
+ documentName
+ "&abs=1&number="
+ Math.floor(Math.random() * 10000)
+ "&RTE_FLAG="
+ rteFlag;
template_Frame.src = finalurl;
$('#iframe').one('load', function () {
});
else{
var finalurl =
"/webdesktop/CustomForms/CorporateLoan/ProposalHtmlTemplate.jsp?PROCESS_NAME="
+ processName
+ "&WI_NAME="
+ processInstanceId
+ "&TEMPLATE_CODE="
+ templateCode
+ "&WORK_STEP="
+ activityName
+ "&DOCUMENT_NAME="
+ documentName
+ "&abs=1&number="
+ Math.floor(Math.random() * 10000)
+ "&TEMPPARENTFOLDERINDEX=359"
+ "&ITEMINDEX="
+ itemindex
+ "&RTE_FLAG="
+ rteFlag
fetch(finalurl)
.then(resp => {
if (!resp.ok) {
RemoveIndicator("application");
return resp.json();
})
.then(retMsg => {
console.log(retMsg)
ajaxCallForRteInHtmlPopulate1(sessionId, retMsg.content,
RowIndex);
else {
RemoveIndicator("application")
})
.catch(e => {
RemoveIndicator("application")
})
}
>>>> replace ajaxCallForRteInHtmlPopulate1 function with
function ajaxCallForRteInHtmlPopulate1(...args) {
if(args.length == 3){
else{
console.log(finalHTML);
var inpJson = {
option: 'save',
htmldata: finalHTML,
itemindex: itemindex,
sessionId: sessionId,
docName: documentName,
documentIndex: '',
cabinet: cabinet,
tempParentFolderIndex: '359',
processName: processName,
templateCode: templateCode
console.log(dataToSend);
$.ajax({
url: "/FroalaHtml2Pdf/addDocument",
type: "POST",
data: dataToSend, // pass that text to the server as a correct JSON String
console.log(retmsg.sOutputXML);
RemoveIndicator("application");
saveWorkItem();
},
// $("#loading").removeClass('backdrop_hidden');
// alert("ERROR!!" + type.responseText);
RemoveIndicator("application");
});