Foros de discusión

Liferay specific Javascript documentation

Dustin Sier, modificado hace 10 años.

Liferay specific Javascript documentation

New Member Mensajes: 3 Fecha de incorporación: 20/01/11 Mensajes recientes
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:


#if ($is_signed_in)
	#####dockbar()
	<a href="javascript:;" id="addApplications">Add Application</a>
	<a href="/group/control_panel">Control Panel</a>
<script type="text/javascript">
	AUI().use(
		'aui-dialog',
		'liferay-layout-configuration',
		function(A) {
			// Create the Add Applications dialog
			var addApplicationsDialog = new A.Dialog({
				title: 'Add Application',
				width: 280,
				visible: false
			}).plug(A.Plugin.IO, {
				after: {
					success: function(event, id, obj) {
						Liferay.LayoutConfiguration._dialogBody = addApplicationsDialog.get('contentBox');
						Liferay.LayoutConfiguration._loadContent();
					}
				},
				autoLoad: false,
				data: {
					doAsUserId: themeDisplay.getDoAsUserIdEncoded(),
					p_l_id: themeDisplay.getPlid(),
					p_p_id: 87,
					p_p_state: 'exclusive'
				},
				showLoading: false,
				uri: themeDisplay.getPathMain() + '/portal/render_portlet'
			});

			// Attach the click listeners to the links
			A.one('#addApplications').on('click', function(event) {
				addApplicationsDialog.render().show().io.start();
			});

		}
	);
</script>
#end


Are there any documentation/tutorials available? If not, this seems like a pretty big missing piece.
thumbnail
David H Nebinger, modificado hace 10 años.

RE: Liferay specific Javascript documentation

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
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...
thumbnail
Nate Cavanaugh, modificado hace 10 años.

RE: Liferay specific Javascript documentation

Junior Member Mensajes: 94 Fecha de incorporación: 27/11/06 Mensajes recientes
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,