All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bookmarks_admin.configuration.jsp Maven / Gradle / Ivy

There is a newer version: 5.0.70
Show newest version
<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%@ include file="/bookmarks/init.jsp" %>

<%
try {
	BookmarksFolder rootFolder = BookmarksFolderLocalServiceUtil.getFolder(rootFolderId);

	rootFolderName = rootFolder.getName();

	if (rootFolder.getGroupId() != scopeGroupId) {
		rootFolderId = BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID;
		rootFolderName = StringPool.BLANK;
	}
}
catch (NoSuchFolderException nsfe) {
	rootFolderId = BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID;
}
%>


	
	





	
	

	
<% String taglibRemoveFolder = "Liferay.Util.removeEntitySelection('rootFolderId', 'rootFolderName', this, '" + renderResponse.getNamespace() + "');"; %>
<% Set availableFolderColumns = SetUtil.fromArray(StringUtil.split(allFolderColumns)); // Left list List leftList = new ArrayList(); for (String folderColumn : folderColumns) { leftList.add(new KeyValuePair(folderColumn, LanguageUtil.get(request, folderColumn))); } // Right list List rightList = new ArrayList(); Arrays.sort(folderColumns); for (String folderColumn : availableFolderColumns) { if (Arrays.binarySearch(folderColumns, folderColumn) < 0) { rightList.add(new KeyValuePair(folderColumn, LanguageUtil.get(request, folderColumn))); } } rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true)); %>
<% Set availableEntryColumns = SetUtil.fromArray(StringUtil.split(allEntryColumns)); // Left list List leftList = new ArrayList(); for (int i = 0; i < entryColumns.length; i++) { String entryColumn = entryColumns[i]; leftList.add(new KeyValuePair(entryColumn, LanguageUtil.get(request, entryColumn))); } // Right list List rightList = new ArrayList(); Arrays.sort(entryColumns); for (String entryColumn : availableEntryColumns) { if (Arrays.binarySearch(entryColumns, entryColumn) < 0) { rightList.add(new KeyValuePair(entryColumn, LanguageUtil.get(request, entryColumn))); } } rightList = ListUtil.sort(rightList, new KeyValuePairComparator(false, true)); %>
$('#selectFolderButton').on( 'click', function(event) { Liferay.Util.selectEntity( { dialog: { constrain: true, destroyOnHide: true, modal: true, width: 830 }, id: '<%= HtmlUtil.escapeJS(PortalUtil.getPortletNamespace(portletResource)) %>selectFolder', title: '', uri: '' }, function(event) { var folderData = { idString: 'rootFolderId', idValue: event.folderid, nameString: 'rootFolderName', nameValue: event.name }; Liferay.Util.selectFolder(folderData, ''); } ); } );
<% Map emailDefinitionTerms = BookmarksUtil.getEmailDefinitionTerms(renderRequest, bookmarksGroupServiceOverriddenConfiguration.emailFromAddress(), bookmarksGroupServiceOverriddenConfiguration.emailFromName()); %>
function saveConfiguration() { var Util = Liferay.Util; var form = AUI.$(document.fm); form.fm('folderColumns').val(Util.listSelect(form.fm('currentFolderColumns'))); form.fm('entryColumns').val(Util.listSelect(form.fm('currentEntryColumns'))); submitForm(form); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy