Forum

Accueil » Liferay Portal » English » 3. Development

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Dustin Sier
Liferay specific Javascript documentation
1 octobre 2013 07:58
Réponse

Dustin Sier

Rang: New Member

Publications: 3

Date d'inscription: 20 janvier 2011

Publications Récentes

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:

 1
 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            });
33
34            // Attach the click listeners to the links
35            A.one('#addApplications').on('click', function(event) {
36                addApplicationsDialog.render().show().io.start();
37            });
38
39        }
40    );
41</script>
42#end


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

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 9429

Date d'inscription: 1 septembre 2006

Publications Récentes

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
2 octobre 2013 08:43
Réponse

Nate Cavanaugh

LIFERAY STAFF

Rang: Junior Member

Publications: 75

Date d'inscription: 27 novembre 2006

Publications Récentes

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,