• URL to folder

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #44548  by Beau_M
 
Just wondering if there is a way to link to a directory within the folder tree. For example we have an SOP directory nested within several other folders, I want to be able to link to it from another page so that users can go straight there rather than sift through to find it.
 #44556  by jllort
 
In the properties panel you have URL link, basically the link is your OpenKM URL with parameter ?uuid=UUID OF THE OBJECT ( it can be a document, folder, etc. )
 #44598  by Beau_M
 
Strangely I've got the URL wording, but no button. It only shows in Internet Explorer, but not in any other browser?
 #44610  by jllort
 
IN community version the icon to copy the URL needs flash support. Should be shown at the bottom of properties panel.
 #44784  by Beau_M
 
Don't know if anyone would find this useful, but the workaround to not using flash for clipboard access for us was as follows;

In documents.java and Folder.java (you'll need a clipboard icon)
Code: Select all
String url = Main.get().workspaceUserProperties.getApplicationURL();
url += "?uuid=" + URL.encodeQueryString(URL.encodeQueryString(document.getUuid()));
tableProperties.setHTML(1, 1, "<img class=\"js-textareacopybtn\" src=\"/OpenKM/img/clipboard.png\" title=\"Copy URL to clipboard\" onclick=\"copyTextToClipboard('" + url + "')\">");
In frontend/index.jsp
Code: Select all
<script type="text/javascript" src="../js/clipboard.js"></script>
In js/clipboard.js
Code: Select all
function copyTextToClipboard(ToCopy) {
	var textArea = document.createElement('textarea');
	textArea.style.position = 'fixed';
	textArea.style.top = 0;
	textArea.style.left = 0;
	textArea.style.width = '2em';
	textArea.style.height = '2em';
	textArea.style.padding = 0;
	textArea.style.border = 'none';
	textArea.style.outline = 'none';
	textArea.style.boxShadow = 'none';
	textArea.style.background = 'transparent';
	textArea.value = ToCopy;

	document.body.appendChild(textArea);
	textArea.select();

	try { var successful = document.execCommand('copy');
		var msg = successful ? 'successful' : 'unsuccessful';
		console.log('Copying text command was ' + msg);
	} catch (err) {
		console.log('Oops, unable to copy');
	}

	document.body.removeChild(textArea);
}
 #44787  by jllort
 
From github you create a merge request with this changes ( to be merged into version 6.3-DEV ) and we can consider include in the source code.
 #44792  by Beau_M
 
Not sure if I did that correctly, are you able to check that I've actually made the request properly?
 #44793  by jllort
 
I think not. it should be a new pull request here https://github.com/openkm/document-mana ... stem/pulls , the idea is create a fork, and then from the fork you can create a pull request from your branch to ours. I suggest try it ... if you finally do not success on it, share with us the patch ( but I suggest invest some time in the pull request, because will be useful for you with other github projects ).
 #44796  by Beau_M
 
Hadn't done the last step, should be good now.
 #44806  by jllort
 
Yes now I see the merge request. Did you tested with all the browsers ( firefox, chrome and IE ? )

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.