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

META-INF.resources.edit_workflow_definition.jsp Maven / Gradle / Ivy

There is a newer version: 1.0.33
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="/init.jsp" %>

<%
String redirect = ParamUtil.getString(request, "redirect");

WorkflowDefinition workflowDefinition = (WorkflowDefinition)request.getAttribute(WebKeys.WORKFLOW_DEFINITION);

String name = StringPool.BLANK;
String version = StringPool.BLANK;

if (workflowDefinition != null) {
	name = workflowDefinition.getName();
	version = String.valueOf(workflowDefinition.getVersion());
}

PortletURL portletURL = renderResponse.createRenderURL();

portletURL.setParameter("mvcPath", "/view.jsp");

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);

renderResponse.setTitle((workflowDefinition == null) ? LanguageUtil.get(request, (workflowDefinition == null) ? "upload-definition" : workflowDefinition.getName()) : workflowDefinition.getName());
%>


	


<% Date expirationDate = new Date(System.currentTimeMillis() + PropsValues.SESSION_TIMEOUT * Time.MINUTE); Ticket ticket = TicketLocalServiceUtil.addTicket(user.getCompanyId(), User.class.getName(), user.getUserId(), TicketConstants.TYPE_IMPERSONATE, null, expirationDate, new ServiceContext()); %> var tempFileNameInput = A.one('#tempFileName'); new Liferay.Upload( { after: { render: function() { var instance = this; var boundingBox = this.get('boundingBox'); boundingBox.one('.select-files-container').placeBefore(boundingBox.one('.upload-list')); }, tempFileRemoved: function() { tempFileNameInput.val(''); }, uploadComplete: function(file) { tempFileNameInput.val(file.name); } }, boundingBox: '#fileUpload', <% DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols.getInstance(locale); %> decimalSeparator: '<%= decimalFormatSymbols.getDecimalSeparator() %>', deleteFile: '&ticketKey=<%= ticket.getKey() %>', fileDescription: '<%= StringUtil.merge(PrefsPropsUtil.getStringArray(PropsKeys.DL_FILE_EXTENSIONS, StringPool.COMMA)) %>', maxFileSize: '<%= PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) %> B', multipleFiles: false, namespace: '', restoreState: false, tempFileURL: { method: Liferay.Service.bind('/dlapp/get-temp-file-names'), params: { folderId: '0', folderName: '<%= UploadWorkflowDefinitionFileMVCActionCommand.TEMP_FOLDER_NAME %>', groupId: <%= scopeGroupId %> } }, tempRandomSuffix: '<%= TempFileEntryUtil.TEMP_RANDOM_SUFFIX %>', uploadFile: '&ticketKey=<%= ticket.getKey() %>' } );




© 2015 - 2025 Weber Informatics LLC | Privacy Policy