Page 1 of 1

How to customize the Document Manager Source Code?

Posted: Fri May 24, 2019 6:37 am
by jemiris
Hi,
My Problem:
1. I would like to customize the source code for the document manager. The requirement is I need to add extract column with the link too. I think this image attachment I have highlighted the two columns in the document manager grid list. but I could not add the links.
documents (2).png
documents (2).png (48.11 KiB) Viewed 10772 times
If I add the link also it shows the below Error. https://www.google.com/ is my sample href URL.
Code: Select all
Refused to display 'https://www.google.com/' in a frame because it set 'X-Frame-Options' to 'same-origin'.
Could you help me

Re: How to customize the Document Manager Source Code?

Posted: Mon May 27, 2019 8:39 am
by jemiris
Does anyone have an idea

Re: How to customize the Document Manager Source Code?

Posted: Mon May 27, 2019 5:36 pm
by amosbatto
I don't have time to investigate this, but this information will get you started:
The iframe where Home > Documents is displayed is generated by:
workflow/engine/methods/cases/casesStartPage.php?action=documents

That in turn uses these two files to generate the page:
workflow/engine/templates/cases/casesDocuments.js
workflow/engine/templates/cases/casesDocuments.html

To get the contents of a directory (which starts from the "/" directory), it calls:
workflow/engine/methods/appFolder/appFolderAjax.php
where the POST variables are:
action: expandNode
dir: //if left blank, then "/" (root) by default
limit: 25
node:
option: gridDocuments
sendWhat: files
start: 0


This calls the expandNode() function defined in appFolderAjax.php, which in turn calls AppFolder::getFolderContent(), which is defined in workflow/engine/classes/model/AppFolder.php.

At a minimum, you will have to change AppFolder.php and casesDocuments.js and casesDocuments.hmtl.

Good luck,
Amos

Re: How to customize the Document Manager Source Code?

Posted: Tue May 28, 2019 12:12 am
by jemiris
Thank you so much. I think many will get benefit from your guidence. Many thanks

Re: How to customize the Document Manager Source Code?

Posted: Tue May 28, 2019 3:20 am
by jemiris
Hi,
My Problem:
In the documents-> file I have a link when I click that link I got the same origin issue . could you provide me an idea But It's not critical if anyone knows to tell me?

Screen : 1 :
checkin.PNG
checkin.PNG (22.5 KiB) Viewed 10710 times
Screen : 2 :
sameorigin-issue.PNG
sameorigin-issue.PNG (38.33 KiB) Viewed 10710 times

Re: How to customize the Document Manager Source Code?

Posted: Tue May 28, 2019 5:24 pm
by amosbatto
There are many ways to deal with this problem. See: https://stackoverflow.com/questions/307 ... gin-policy

Re: How to customize the Document Manager Source Code?

Posted: Wed May 29, 2019 12:28 am
by jemiris
Thanks a lot

Re: How to customize the Document Manager Source Code?

Posted: Sat Jun 15, 2019 3:26 am
by jemiris
Hi,

I have added two links to the document manager. As blow image so for this, I need to enable the icon only if the plugin is enabled in htdocs\workflow\engine\templates\cases\casesDocuments.js file. Is it possible
checkin.PNG
checkin.PNG (22.5 KiB) Viewed 9372 times

Re: How to customize the Document Manager Source Code?

Posted: Mon Oct 14, 2019 5:55 am
by jemiris
Hi,
Is there any way to show my custom column only when the plugin enables?

Re: How to customize the Document Manager Source Code?

Posted: Tue Oct 15, 2019 12:31 am
by jemiris
Hi,

Is there any way to hide my custom column which I have added in <installed- directory>\htdocs\workflow\engine\templates\cases\casesDocuments.js. Below I have added the custom column added screen.
checkin.PNG
checkin.PNG (22.5 KiB) Viewed 7891 times
Is there any way to show my custom column only when the plugin enabled? In the <installed- directory>\htdocs\workflow\engine\methods\appFolder\appFolderAjax.php i can handle it by checking
Code: Select all
if  (class_exists('myCustomPlugin'))  {
       // To load the custom plugin
}
But in the case of casesDocuments.js and since it's js file don't know how to handle it. Is there any way to give me an idea?