agea / Alfresco-HTML5-Client

Pure HTML5 and Javascript Alfresco client
MIT License
25 stars 10 forks source link

Enhancement: Server at another location #15

Open nicolas-raoul opened 10 years ago

nicolas-raoul commented 10 years ago

I want to host Alfresco-HTML5-Client on a separate machine, not on the Alfresco server itself.

Is there a way to achieve this?

The best would be to be able to specify the CMIS URL somewhere.

nicolas-raoul commented 10 years ago

Here are lines that presumably need to be modified:

js/cmisbrowser.js:  return "/alfresco/service/api/node/" + objectId.replace(':/', '').split(";")[0] +
js/cmisbrowser.js:      url:'/alfresco/service/api/login',
templates/document.html:                <img data-bind="attr: {src: '/alfresco/service/api/node/'

/alfresco/service/api is not CMIS, though? I haven't found where the CMIS URL is coded yet...

agea commented 10 years ago

the cmis url is at line 354 of js/cmisbrowser.js

it should not be hard to extract all these urls and put them in js/config.js, but even changing these lines, you will face cross domain issues

nicolas-raoul commented 10 years ago

I wrote a similar tool at https://github.com/nicolas-raoul/WebCMIS and it has no problem with cross-domain, so I guess it would work as well for Alfresco-HTML5-Client :-)