Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Dustin Sier
Liferay specific Javascript documentation
October 1, 2013 7:58 AM

Dustin Sier

Rank: New Member

Posts: 3

Join Date: January 20, 2011

Recent Posts

I've looked everywhere, but been unable to find documentation on what exactly is available for the Liferay javascript namespace. I've seen some examples that use this, especially in the prevalent Dockbar discussions that have occurred as in this example:

 2#if ($is_signed_in)
 3    #####dockbar()
 4    <a href="javascript:;" id="addApplications">Add Application</a>
 5    <a href="/group/control_panel">Control Panel</a>
 6<script type="text/javascript">
 7    AUI().use(
 8        'aui-dialog',
 9        'liferay-layout-configuration',
10        function(A) {
11            // Create the Add Applications dialog
12            var addApplicationsDialog = new A.Dialog({
13                title: 'Add Application',
14                width: 280,
15                visible: false
16            }).plug(A.Plugin.IO, {
17                after: {
18                    success: function(event, id, obj) {
19                        Liferay.LayoutConfiguration._dialogBody = addApplicationsDialog.get('contentBox');
20                        Liferay.LayoutConfiguration._loadContent();
21                    }
22                },
23                autoLoad: false,
24                data: {
25                    doAsUserId: themeDisplay.getDoAsUserIdEncoded(),
26                    p_l_id: themeDisplay.getPlid(),
27                    p_p_id: 87,
28                    p_p_state: 'exclusive'
29                },
30                showLoading: false,
31                uri: themeDisplay.getPathMain() + '/portal/render_portlet'
32            });
34            // Attach the click listeners to the links
35  '#addApplications').on('click', function(event) {
36                addApplicationsDialog.render().show().io.start();
37            });
39        }
40    );

Are there any documentation/tutorials available? If not, this seems like a pretty big missing piece.
David H Nebinger
RE: Liferay specific Javascript documentation
October 1, 2013 11:31 AM

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 13013

Join Date: September 1, 2006

Recent Posts

Yep, we've all been looking for years. Good news is that they are receptive for all documentation you want to submit, as it is an open source project...
Nate Cavanaugh
RE: Liferay specific Javascript documentation
October 2, 2013 8:43 AM

Nate Cavanaugh


Rank: Junior Member

Posts: 91

Join Date: November 27, 2006

Recent Posts

Hi guys,
It's definitely on our todo list, and we have some plans, but there are still some pieces we've been wanting to clean up (some areas go back a ways, code-wise), and to make sure that what we provide is actually useful.
Some of the modules are meant to be reused throughout the portal and different portlets, while there are a couple that are more system level, and don't have a ton of use outside of some specific use cases.

One thing we might be able to do, short term, would be to at least provide descriptions for each Liferay module of what it's meant to achieve, then from there we can build on that and fully develop the API docs from there, and then of course, long term, we would like to set up specific tutorials for those different modules.
I'll coordinate with the documentation team to see how to best get that set up emoticon

Thanks guys,