Help :- Alfresco API and Documentation in Detail

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2011 09:36 AM
Dear All,
While Exploring Alfresco Share, I found these URLs or APIs.
Alfresco.util.encodeHTML
Alfresco.constants.PROXY_URI_RELATIVE
Alfresco.Search.superclass.constructor.call
Alfresco.Search
Alfresco.component.Base
Alfresco.util.createYUIButton :- Extension of YUI API (Where is the DocS for this API)
Alfresco.util.NodeRef
Alfresco.util.PopupManager.displayPrompt
Alfresco.util.PopupManager.displayMessage
Alfresco.constants.URL_RESCONTEXT
Alfresco.constants.URL_RESCONTEXT
Alfresco.util.RENDERLOOPSIZE
Alfresco.constants.URL_PAGECONTEXT
Alfresco.util.message
Please Guide me in these
Thanks!
-Nirvan
While Exploring Alfresco Share, I found these URLs or APIs.
Alfresco.util.encodeHTML
Alfresco.constants.PROXY_URI_RELATIVE
Alfresco.Search.superclass.constructor.call
Alfresco.Search
Alfresco.component.Base
Alfresco.util.createYUIButton :- Extension of YUI API (Where is the DocS for this API)
Alfresco.util.NodeRef
Alfresco.util.PopupManager.displayPrompt
Alfresco.util.PopupManager.displayMessage
Alfresco.constants.URL_RESCONTEXT
Alfresco.constants.URL_RESCONTEXT
Alfresco.util.RENDERLOOPSIZE
Alfresco.constants.URL_PAGECONTEXT
Alfresco.util.message
Please Guide me in these
Thanks!
-Nirvan
Labels:
- Labels:
-
Archive
13 REPLIES 13
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2011 06:09 AM
Hello,
there is no "automatic" / "implicit" importing of alfresco.js anywhere in Alfresco - all JavaScript code loaded within Share pages always has access to functions from alfresco.js. This is possible since all page templates use alfresco-template.ftl, which explicitly renders HTML code to load global Alfresco JavaScript/CSS files (<= 3.4) or defines a region for a global compoenent which renders similar code (4.0).
So, all your custom JavaScript files loaded within Share pages / modules should ALWAYS also be able to access Alfresco.util.formatDate, unless you've changed either the alfresco.js itself, the templates/web scripts rendering the load code or have implemented a page which does not use these global templates/web scripts.
Regards
Axel
there is no "automatic" / "implicit" importing of alfresco.js anywhere in Alfresco - all JavaScript code loaded within Share pages always has access to functions from alfresco.js. This is possible since all page templates use alfresco-template.ftl, which explicitly renders HTML code to load global Alfresco JavaScript/CSS files (<= 3.4) or defines a region for a global compoenent which renders similar code (4.0).
So, all your custom JavaScript files loaded within Share pages / modules should ALWAYS also be able to access Alfresco.util.formatDate, unless you've changed either the alfresco.js itself, the templates/web scripts rendering the load code or have implemented a page which does not use these global templates/web scripts.
Regards
Axel

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2011 01:26 AM
Dear MikeH , AFaust and Alfresco Team,
@AFaust :: First of thanks a tonn for your quick response.
As you mentioned in your last post, I went through alfresco-template.ftl and got to know that from that file only everything gets loaded in each and every file of Alfresco Share.
Now, As I mentioned in above 08 Oct 2011's post that I want functions of [size=125]alfresco.js[/size] in flash-upload.js .
{Correct me if I am wrong}
As Flash-Upload in for upload pop-up flash-upload.get.html.ftl is loaded as FORM. I checked for this ftl template but unfortunately I could not able to find the template (so as not able to find include tag of alfresco-template.ftl) and I think for that only I am not able to get that function of alfresco.js.
Please Guide me further.
Appreciate your help.
MikeH and All,you can also guide me in this quest.
Thanks!
-Nirvan
@AFaust :: First of thanks a tonn for your quick response.
As you mentioned in your last post, I went through alfresco-template.ftl and got to know that from that file only everything gets loaded in each and every file of Alfresco Share.
Now, As I mentioned in above 08 Oct 2011's post that I want functions of [size=125]alfresco.js[/size] in flash-upload.js .
{Correct me if I am wrong}
As Flash-Upload in for upload pop-up flash-upload.get.html.ftl is loaded as FORM. I checked for this ftl template but unfortunately I could not able to find the template (so as not able to find include tag of alfresco-template.ftl) and I think for that only I am not able to get that function of alfresco.js.
Please Guide me further.
Appreciate your help.
MikeH and All,you can also guide me in this quest.
Thanks!
-Nirvan
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2011 03:10 AM
What is it you are actually trying to achieve? I mean from a high level, not a JavaScript level.
You might want to investigate some online JavaScript courses, as I think your lack of JavaScript knowledge might be causing you problems – Alfresco Share is a very complex application using advanced JavaScript techniques. It's slightly concerning that you don't seem to have a good understanding of the basics before trying to customize something more advanced.
Thanks,
Mike
You might want to investigate some online JavaScript courses, as I think your lack of JavaScript knowledge might be causing you problems – Alfresco Share is a very complex application using advanced JavaScript techniques. It's slightly concerning that you don't seem to have a good understanding of the basics before trying to customize something more advanced.
Thanks,
Mike

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2011 10:45 AM
What is it you are actually trying to achieve? I mean from a high level, not a JavaScript level.
You might want to investigate some online JavaScript courses, as I think your lack of JavaScript knowledge might be causing you problems – Alfresco Share is a very complex application using advanced JavaScript techniques. It's slightly concerning that you don't seem to have a good understanding of the basicsbefore trying to customize something more advanced.
Thanks,
Mike
Dear Mike,
On very high level I want to put one Date Field on Upload Pop Up after which Document is moved to certain folder.
I am able to customize the Upload Pop-Up Page and also kept one Date Field on that Page. I am able to save my custom date in to my custom content model's property in string format as I am not able to get that Alfresco.util.formatDate(x,y,..) function in my flash-upload(-min).js file.
Now I guess you understand properly on High Level.
C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\templates\org\alfresco
<#include "include/alfresco-template.ftl" /> is there in each and every template but I am not able to find it for Upload template or I might be referring wrong folder location.
Now,Expect your valuable reply.
Thanks!
-Nirvan
