diff --git fix-pack-excludes.txt fix-pack-excludes.txt new file mode 100644 index 0000000..188e4a9 --- /dev/null +++ fix-pack-excludes.txt @@ -0,0 +1,2 @@ +portal-service/src/com/liferay/portal/kernel/util/PropsKeys.java +portal-impl/src/com/liferay/portal/util/PropsValues.java \ No newline at end of file diff --git fix-pack-fixed-issues.txt fix-pack-fixed-issues.txt new file mode 100644 index 0000000..fa1cf0f --- /dev/null +++ fix-pack-fixed-issues.txt @@ -0,0 +1 @@ +LPE-8541,LPE-8099,LPE-7496,LPE-7490,LPE-8542,LPE-7967,LPE-7457,LPE-8225,LPE-8389,LPE-8543,LPE-8544,LPE-8545,LPE-8157,LPE-7690,LPE-7875,LPE-8024,LPE-8102,LPE-7407,LPE-7773,LPE-7655,LPE-7521 \ No newline at end of file diff --git fix-pack-includes.txt fix-pack-includes.txt new file mode 100644 index 0000000..5a8ecb0 --- /dev/null +++ fix-pack-includes.txt @@ -0,0 +1,66 @@ +portal-web/docroot/html/js/aui/aui-event/aui-event-base-debug.js +portal-web/docroot/html/js/aui/aui-event/aui-event-base-min.js +portal-web/docroot/html/js/aui/aui-event/aui-event-base.js +portal-web/docroot/html/js/aui/aui-event/aui-event-debug.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-change-debug.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-change-min.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-change.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-submit-debug.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-submit-min.js +portal-web/docroot/html/js/aui/aui-event/aui-event-delegate-submit.js +portal-web/docroot/html/js/aui/aui-event/aui-event-input-debug.js +portal-web/docroot/html/js/aui/aui-event/aui-event-input-min.js +portal-web/docroot/html/js/aui/aui-event/aui-event-input.js +portal-web/docroot/html/js/aui/aui-event/aui-event-min.js +portal-web/docroot/html/js/aui/aui-event/aui-event.js +portal-web/docroot/html/js/aui/aui-form-validator/aui-form-validator-debug.js +portal-web/docroot/html/js/aui/aui-form-validator/aui-form-validator-min.js +portal-web/docroot/html/js/aui/aui-form-validator/aui-form-validator.js +portal-web/docroot/html/js/aui/aui-base/aui-base-core-debug.js +portal-web/docroot/html/js/aui/aui-base/aui-base-core-min.js +portal-web/docroot/html/js/aui/aui-base/aui-base-core.js +portal-web/docroot/html/js/aui/aui-base/aui-base-debug.js +portal-web/docroot/html/js/aui/aui-base/aui-base-meta-min.js +portal-web/docroot/html/js/aui/aui-base/aui-base-meta.js +portal-web/docroot/html/js/aui/aui-base/aui-base-min.js +portal-web/docroot/html/js/aui/aui-base/aui-base.js +portal-web/docroot/html/js/aui/aui/aui-min.js +portal-web/docroot/html/js/aui/aui/aui.js +portal-web/docroot/html/js/aui/aui-component/aui-component-debug.js +portal-web/docroot/html/js/aui/aui-component/aui-component-min.js +portal-web/docroot/html/js/aui/aui-component/aui-component.js +portal-web/docroot/html/js/aui/aui-rating/aui-rating-debug.js +portal-web/docroot/html/js/aui/aui-rating/aui-rating-min.js +portal-web/docroot/html/js/aui/aui-rating/aui-rating.js +portal-web/docroot/html/js/aui/aui-button-item/aui-button-item-debug.js +portal-web/docroot/html/js/aui/aui-button-item/aui-button-item-min.js +portal-web/docroot/html/js/aui/aui-button-item/aui-button-item.js +portal-web/docroot/html/js/aui/aui-parse-content/aui-parse-content-debug.js +portal-web/docroot/html/js/aui/aui-parse-content/aui-parse-content-min.js +portal-web/docroot/html/js/aui/aui-parse-content/aui-parse-content.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-data-debug.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-data-min.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-data.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-debug.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-min.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-node-debug.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-node-min.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-node.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-view-debug.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-view-min.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree-view.js +portal-web/docroot/html/js/aui/aui-tree/aui-tree.js +portal-web/docroot/html/themes/control_panel/css/custom.css +portal-web/docroot/html/themes/control_panel/css/.sass-cache/custom.css +portal-web/docroot/html/themes/control_panel/css/.sass-cache/main.css +portal-web/docroot/html/themes/classic/css/custom.css +portal-web/docroot/html/themes/classic/css/.sass-cache/custom.css +portal-web/docroot/html/themes/classic/css/.sass-cache/main.css +portal-web/docroot/html/themes/control_panel/css/application.css +portal-web/docroot/html/themes/control_panel/css/.sass-cache/application.css +portal-web/docroot/html/themes/classic/css/application.css +portal-web/docroot/html/themes/classic/css/.sass-cache/application.css +portal-web/docroot/html/themes/control_panel/css/base.css +portal-web/docroot/html/themes/control_panel/css/.sass-cache/base.css +portal-web/docroot/html/themes/classic/css/base.css +portal-web/docroot/html/themes/classic/css/.sass-cache/base.css \ No newline at end of file diff --git fix-pack-requirements.txt fix-pack-requirements.txt new file mode 100644 index 0000000..e0ad5dd --- /dev/null +++ fix-pack-requirements.txt @@ -0,0 +1 @@ +!hotfix-169,!hotfix-171,!hotfix-172,!hotfix-207,!hotfix-210,!hotfix-218,!hotfix-219,!hotfix-241,!hotfix-248,!hotfix-256,!hotfix-274,!hotfix-275,!hotfix-277,!hotfix-309,!hotfix-325,!hotfix-34,!hotfix-400,!hotfix-461,!hotfix-462,!hotfix-463,!hotfix-600,!hotfix-602,!hotfix-630,!hotfix-664,!hotfix-718,!hotfix-761,!hotfix-776,!hotfix-784 \ No newline at end of file diff --git fix-pack-resolved-conflicts.txt fix-pack-resolved-conflicts.txt new file mode 100644 index 0000000..e47fbb6 --- /dev/null +++ fix-pack-resolved-conflicts.txt @@ -0,0 +1,12 @@ +documents-and-media-1 portal-web/docroot/html/portlet/document_library/js/main.js +documents-and-media-2 portal-web/docroot/html/portlet/document_library/js/main.js +core-2 portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css +core-2 portal-web/docroot/html/themes/control_panel/css/custom.css +core-3 portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css +core-3 portal-web/docroot/html/themes/control_panel/css/custom.css +core-4 portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css +core-4 portal-web/docroot/html/themes/control_panel/css/custom.css +core-4 portal-web/docroot/html/themes/control_panel/css/.sass-cache/custom.css +core-4 portal-web/docroot/html/themes/classic/_diffs/css/custom.css +core-4 portal-web/docroot/html/themes/classic/css/custom.css +core-4 portal-web/docroot/html/themes/classic/css/.sass-cache/custom.css \ No newline at end of file diff --git lib/portal/ruby-gems.jar lib/portal/ruby-gems.jar index e1c76b5..db39cdd 100644 Binary files lib/portal/ruby-gems.jar and lib/portal/ruby-gems.jar differ diff --git portal-impl/build.xml portal-impl/build.xml index d570235..7b88124 100644 --- portal-impl/build.xml +++ portal-impl/build.xml @@ -340,29 +340,15 @@ public class Creole10Parser]]> - - - - - - - - - + emptySet(), + Collections.emptyMap(), portletApp); + + PortletFilter portletFilter = PortletFilterFactory.create( + portletFilterModel, _portletContextImpl); + + _systemPortletFilters.add(portletFilter); + + if (portletFilter instanceof ActionFilter) { + _actionFilters.add((ActionFilter)portletFilter); + } + + if (portletFilter instanceof EventFilter) { + _eventFilters.add((EventFilter)portletFilter); + } + + if (portletFilter instanceof RenderFilter) { + _renderFilters.add((RenderFilter)portletFilter); + } + + if (portletFilter instanceof ResourceFilter) { + _resourceFilters.add((ResourceFilter)portletFilter); + } + } + } + finally { + PACLClassLoaderUtil.setContextClassLoader(classLoader); + } } protected void invoke( @@ -633,6 +677,12 @@ public class InvokerPortletImpl implements InvokerPortlet { _eventFilters.clear(); _renderFilters.clear(); _resourceFilters.clear(); + + for (PortletFilter portletFilter : _systemPortletFilters) { + portletFilter.destroy(); + } + + _systemPortletFilters.clear(); } private void _initialize( @@ -678,5 +728,7 @@ public class InvokerPortletImpl implements InvokerPortlet { new ArrayList(); private boolean _strutsBridgePortlet; private boolean _strutsPortlet; + private List _systemPortletFilters = + new ArrayList(); } \ No newline at end of file diff --git portal-impl/src/com/liferay/portlet/ScriptDataPortletFilter.java portal-impl/src/com/liferay/portlet/ScriptDataPortletFilter.java new file mode 100644 index 0000000..004b81a --- /dev/null +++ portal-impl/src/com/liferay/portlet/ScriptDataPortletFilter.java @@ -0,0 +1,119 @@ +/** + * Copyright (c) 2000-2012 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. + */ + +package com.liferay.portlet; + +import com.liferay.portal.kernel.io.OutputStreamWriter; +import com.liferay.portal.kernel.servlet.taglib.aui.ScriptData; +import com.liferay.portal.kernel.util.WebKeys; +import com.liferay.portal.theme.ThemeDisplay; +import com.liferay.portal.util.PortalUtil; + +import java.io.IOException; +import java.io.OutputStream; + +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; +import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; +import javax.portlet.filter.FilterChain; +import javax.portlet.filter.FilterConfig; +import javax.portlet.filter.RenderFilter; +import javax.portlet.filter.ResourceFilter; + +import javax.servlet.http.HttpServletRequest; + +/** + * @author Shuyang Zhou + * @author Bruno Basto + * @author Eduardo Lundgren + */ +public class ScriptDataPortletFilter implements RenderFilter, ResourceFilter { + + public void destroy() { + } + + public void doFilter( + RenderRequest renderRequest, RenderResponse renderResponse, + FilterChain filterChain) + throws IOException, PortletException { + + filterChain.doFilter(renderRequest, renderResponse); + + HttpServletRequest request = PortalUtil.getHttpServletRequest( + renderRequest); + + ScriptData scriptData = (ScriptData)request.getAttribute( + WebKeys.AUI_SCRIPT_DATA); + + if (scriptData == null) { + return; + } + + ThemeDisplay themeDisplay = (ThemeDisplay)renderRequest.getAttribute( + WebKeys.THEME_DISPLAY); + + if (themeDisplay.isIsolated() || themeDisplay.isStateExclusive()) { + _flushScriptData( + request, scriptData, (MimeResponseImpl)renderResponse); + } + } + + public void doFilter( + ResourceRequest resourceRequest, ResourceResponse resourceResponse, + FilterChain filterChain) + throws IOException, PortletException { + + filterChain.doFilter(resourceRequest, resourceResponse); + + HttpServletRequest request = PortalUtil.getHttpServletRequest( + resourceRequest); + + ScriptData scriptData = (ScriptData)request.getAttribute( + WebKeys.AUI_SCRIPT_DATA); + + if (scriptData == null) { + return; + } + + _flushScriptData( + request, scriptData, (MimeResponseImpl)resourceResponse); + } + + public void init(FilterConfig filterConfig) { + } + + private void _flushScriptData( + HttpServletRequest request, ScriptData scriptData, + MimeResponseImpl mimeResponseImpl) + throws IOException { + + if (mimeResponseImpl.isCalledGetPortletOutputStream()) { + OutputStream outputStream = + mimeResponseImpl.getPortletOutputStream(); + + OutputStreamWriter outputStreamWriter = new OutputStreamWriter( + outputStream); + + scriptData.writeTo(request, outputStreamWriter); + + outputStreamWriter.flush(); + } + else { + scriptData.writeTo(request, mimeResponseImpl.getWriter()); + } + } + +} \ No newline at end of file diff --git portal-impl/src/portal.properties portal-impl/src/portal.properties index 825cd55..fa30e4b 100644 --- portal-impl/src/portal.properties +++ portal-impl/src/portal.properties @@ -631,6 +631,15 @@ portlet.public.render.parameter.distribution=layout ## +## Portlet Filters +## + + # + # Input a list of portlet filters that will be applied to all portlets. + # + portlet.filters.system=com.liferay.portlet.ScriptDataPortletFilter + +## ## Theme ## @@ -4954,6 +4963,16 @@ browser.cache.signed.in.disabled=false ## +## Browser Compatibility +## + + # + # Enter which versions of IE your browser should emulate to render the + # portal. Enter "edge" to always use IE's latest standards rendering mode. + # + browser.compatibility.ie.versions=IE=edge + +## ## Browser Launcher ## @@ -6574,14 +6593,14 @@ classpath:/META-INF/jruby.home/lib/ruby/site_ruby/1.8,\ classpath:/META-INF/jruby.home/lib/ruby/site_ruby/shared,\ classpath:/META-INF/jruby.home/lib/ruby/1.8,\ - classpath:/gems/chunky_png-1.2.1/lib,\ - classpath:/gems/compass-0.11.5/lib,\ - classpath:/gems/fssm-0.2.7/lib,\ - classpath:/gems/sass-3.1.7/lib,\ - ${java.io.tmpdir}/liferay/ruby/gems/chunky_png-1.2.1/lib,\ - ${java.io.tmpdir}/liferay/ruby/gems/compass-0.11.5/lib,\ - ${java.io.tmpdir}/liferay/ruby/gems/fssm-0.2.7/lib,\ - ${java.io.tmpdir}/liferay/ruby/gems/sass-3.1.7/lib + classpath:/gems/chunky_png-1.2.6/lib,\ + classpath:/gems/compass-0.12.2/lib,\ + classpath:/gems/fssm-0.2.9/lib,\ + classpath:/gems/sass-3.2.1/lib,\ + ${java.io.tmpdir}/liferay/ruby/gems/chunky_png-1.2.6/lib,\ + ${java.io.tmpdir}/liferay/ruby/gems/compass-0.12.2/lib,\ + ${java.io.tmpdir}/liferay/ruby/gems/fssm-0.2.9/lib,\ + ${java.io.tmpdir}/liferay/ruby/gems/sass-3.2.1/lib ## ## Search Container diff --git portal-service/src/com/liferay/portal/kernel/servlet/taglib/aui/ScriptData.java portal-service/src/com/liferay/portal/kernel/servlet/taglib/aui/ScriptData.java index 2fabe92..d7a9344 100644 --- portal-service/src/com/liferay/portal/kernel/servlet/taglib/aui/ScriptData.java +++ portal-service/src/com/liferay/portal/kernel/servlet/taglib/aui/ScriptData.java @@ -14,66 +14,155 @@ package com.liferay.portal.kernel.servlet.taglib.aui; +import com.liferay.portal.kernel.servlet.BrowserSnifferUtil; import com.liferay.portal.kernel.util.StringBundler; +import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.StringUtil; import com.liferay.portal.kernel.util.Validator; +import java.io.IOException; +import java.io.Serializable; +import java.io.Writer; + import java.util.Set; import java.util.TreeSet; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +import javax.servlet.http.HttpServletRequest; /** * @author Brian Wing Shun Chan */ public class ScriptData { - public void append(String content, String use) { - if (Validator.isNull(use)) { - _rawSB.append(content); + public void append(String portletId, String content, String use) { + PortletData portletData = _getPortletData(portletId); + + portletData.append(content, use); + } + + public void append(String portletId, StringBundler contentSB, String use) { + PortletData portletData = _getPortletData(portletId); + + portletData.append(contentSB, use); + } + + public void writeTo(HttpServletRequest request, Writer writer) + throws IOException { + + writer.write(""); } - public void append(StringBundler contentSB, String use) { - if (Validator.isNull(use)) { - _rawSB.append(contentSB); + private PortletData _getPortletData(String portletId) { + if (Validator.isNull(portletId)) { + portletId = StringPool.BLANK; } - else { - _callbackSB.append("(function() {"); - _callbackSB.append(contentSB); - _callbackSB.append("})();"); - String[] useArray = StringUtil.split(use); + PortletData portletData = _portletDataMap.get(portletId); + + if (portletData == null) { + portletData = new PortletData(); + + PortletData oldPortletData = _portletDataMap.putIfAbsent( + portletId, portletData); - for (int i = 0; i < useArray.length; i++) { - _useSet.add(useArray[i]); + if (oldPortletData != null) { + portletData = oldPortletData; } } - } - public StringBundler getCallbackSB() { - return _callbackSB; + return portletData; } - public StringBundler getRawSB() { - return _rawSB; - } + private ConcurrentMap _portletDataMap = + new ConcurrentHashMap(); - public Set getUseSet() { - return _useSet; - } + private class PortletData implements Serializable { - private StringBundler _callbackSB = new StringBundler(); - private StringBundler _rawSB = new StringBundler(); - private Set _useSet = new TreeSet(); + public void append(String content, String use) { + if (Validator.isNull(use)) { + _rawSB.append(content); + } + else { + _callbackSB.append("(function() {"); + _callbackSB.append(content); + _callbackSB.append("})();"); + + String[] useArray = StringUtil.split(use); + + for (int i = 0; i < useArray.length; i++) { + _useSet.add(useArray[i]); + } + } + } + + public void append(StringBundler contentSB, String use) { + if (Validator.isNull(use)) { + _rawSB.append(contentSB); + } + else { + _callbackSB.append("(function() {"); + _callbackSB.append(contentSB); + _callbackSB.append("})();"); + + String[] useArray = StringUtil.split(use); + + for (int i = 0; i < useArray.length; i++) { + _useSet.add(useArray[i]); + } + } + } + + private static final long serialVersionUID = 1L; + + private StringBundler _callbackSB = new StringBundler(); + private StringBundler _rawSB = new StringBundler(); + private Set _useSet = new TreeSet(); + + } } \ No newline at end of file diff --git portal-service/src/com/liferay/portal/kernel/util/PropsKeys.java portal-service/src/com/liferay/portal/kernel/util/PropsKeys.java index 7a28d0b..cd6e568 100644 --- portal-service/src/com/liferay/portal/kernel/util/PropsKeys.java +++ portal-service/src/com/liferay/portal/kernel/util/PropsKeys.java @@ -253,6 +253,8 @@ public interface PropsKeys { public static final String BROWSER_CACHE_SIGNED_IN_DISABLED = "browser.cache.signed.in.disabled"; + public static final String BROWSER_COMPATIBILITY_IE_VERSIONS = "browser.compatibility.ie.versions"; + public static final String BROWSER_LAUNCHER_URL = "browser.launcher.url"; public static final String BUFFERED_INCREMENT_PARALLEL_QUEUE_SIZE = "buffered.increment.parallel.queue.size"; @@ -1691,6 +1693,8 @@ public interface PropsKeys { public static final String PORTLET_EVENT_DISTRIBUTION = "portlet.event.distribution"; + public static final String PORTLET_FILTERS_SYSTEM = "portlet.filters.system"; + public static final String PORTLET_PUBLIC_RENDER_PARAMETER_DISTRIBUTION = "portlet.public.render.parameter.distribution"; public static final String PORTLET_RESOURCE_ID_BANNED_PATHS_REGEXP = "portlet.resource.id.banned.paths.regexp"; diff --git portal-web/docroot/html/common/themes/top_meta.jspf portal-web/docroot/html/common/themes/top_meta.jspf index 3636e8b..10ba208 100644 --- portal-web/docroot/html/common/themes/top_meta.jspf +++ portal-web/docroot/html/common/themes/top_meta.jspf @@ -14,6 +14,10 @@ */ --%> + + + + <% @@ -21,7 +25,7 @@ int refreshRate = ParamUtil.getInteger(request, "refresh_rate"); %> - + <% @@ -29,9 +33,9 @@ String cacheControl = request.getParameter("cache_control"); %> - - - + + + \ No newline at end of file diff --git portal-web/docroot/html/portlet/document_library/display_style_buttons.jsp portal-web/docroot/html/portlet/document_library/display_style_buttons.jsp index 91d9807..aea0725 100644 --- portal-web/docroot/html/portlet/document_library/display_style_buttons.jsp +++ portal-web/docroot/html/portlet/document_library/display_style_buttons.jsp @@ -43,7 +43,7 @@ String keywords = ParamUtil.getString(request, "keywords"); 'folderId': '<%= folderId %>', 'displayStyle': displayStyle, 'viewEntries': <%= Boolean.FALSE.toString() %>, - 'viewEntriesPage': <%= Boolean.TRUE.toString() %>, + 'viewEntriesPage': <%= Boolean.FALSE.toString() %>, 'viewFolders': <%= Boolean.FALSE.toString() %>, 'saveDisplayStyle': <%= Boolean.TRUE.toString() %> }; diff --git portal-web/docroot/html/portlet/document_library/js/main.js portal-web/docroot/html/portlet/document_library/js/main.js index 2b9b886..c40d4b3 100644 --- portal-web/docroot/html/portlet/document_library/js/main.js +++ portal-web/docroot/html/portlet/document_library/js/main.js @@ -3,6 +3,8 @@ AUI.add( function(A) { var AObject = A.Object; var Lang = A.Lang; + var Util = Liferay.Util; + var UA = A.UA; var formatSelectorNS = A.Node.formatSelectorNS; @@ -49,10 +51,18 @@ AUI.add( var EXPAND_FOLDER = 'expandFolder'; + var FIRST_PAGE_LINK_LABEL = '<<'; + + var LAST_PAGE_LINK_LABEL = '>>'; + var MESSAGE_TYPE_ERROR = 'error'; + var NEXT_PAGE_LINK_LABEL = '>'; + var PARENT_NODE = 'parentNode'; + var PREV_PAGE_LINK_LABEL = '<'; + var ROWS_PER_PAGE = 'rowsPerPage'; var SEARCH_TYPE = 'searchType'; @@ -61,10 +71,18 @@ AUI.add( var STR_BLANK = ''; + var STR_CHANGE_REQUEST = 'changeRequest'; + var STR_CLICK = 'click'; var STR_DATA = 'data'; + var STR_DIRECTION = 'direction'; + + var STR_DIRECTION_LEFT = 'left'; + + var STR_DIRECTION_RIGHT = 'right'; + var STR_DRAG_NODE = 'dragNode'; var STR_ENTRY_END = 'entryEnd'; @@ -81,17 +99,21 @@ AUI.add( var STR_FOLDER_START = 'folderStart'; + var STR_SUCCESS = 'success'; + var STR_TOGGLE_ACTIONS_BUTTON = 'toggleActionsButton'; + var STR_REPOSITORY_ID = 'repositoryId'; + var STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX = 'rowIdsDLFileShortcutCheckbox'; var STR_ROW_IDS_FOLDER_CHECKBOX = 'rowIdsFolderCheckbox'; var STR_ROW_IDS_FILE_ENTRY_CHECKBOX = 'rowIdsFileEntryCheckbox'; - var STRUTS_ACTION = 'struts_action'; + var STR_SYNC_NOTIFICATION = 'syncNotification'; - var SRC_DISPLAY_STYLE_BUTTONS = 0; + var STRUTS_ACTION = 'struts_action'; var SRC_ENTRIES_PAGINATOR = 1; @@ -119,8 +141,6 @@ AUI.add( var VIEW_FOLDERS = 'viewFolders'; - Liferay.DL_DISPLAY_STYLE_BUTTONS = SRC_DISPLAY_STYLE_BUTTONS; - Liferay.DL_ENTRIES_PAGINATOR = SRC_ENTRIES_PAGINATOR; Liferay.DL_GLOBAL = SRC_GLOBAL; @@ -168,15 +188,15 @@ AUI.add( instance._portletMessageContainer = A.Node.create(TPL_MESSAGE_RESPONSE); instance._displayStyle = instance.ns('displayStyle'); - instance._folderId = instance.ns('folderId'); + instance._folderId = instance.ns(STR_FOLDER_ID); var liferaySyncMessage = new Liferay.Message( { - boundingBox: instance.byId('syncNotification'), + boundingBox: instance.byId(STR_SYNC_NOTIFICATION), contentBox: instance.byId('syncNotificationContent'), id: instance.NS + 'show-sync-message', trigger: A.one('#' + instance.ns('showSyncMessageIcon')), - visible: instance.byId('syncNotification').test(':visible') + visible: instance.byId(STR_SYNC_NOTIFICATION).test(':visible') } ).render(); @@ -190,18 +210,18 @@ AUI.add( { circular: false, containers: '.document-entries-paginator', - firstPageLinkLabel: '<<', - lastPageLinkLabel: '>>', - nextPageLinkLabel: '>', + firstPageLinkLabel: FIRST_PAGE_LINK_LABEL, + lastPageLinkLabel: LAST_PAGE_LINK_LABEL, + nextPageLinkLabel: NEXT_PAGE_LINK_LABEL, page: entryPage, - prevPageLinkLabel: '<', + prevPageLinkLabel: PREV_PAGE_LINK_LABEL, rowsPerPage: config.entryRowsPerPage, rowsPerPageOptions: config.entryRowsPerPageOptions, total: config.entriesTotal } ).render(); - entryPaginator.on('changeRequest', instance._onEntryPaginatorChangeRequest, instance); + entryPaginator.on(STR_CHANGE_REQUEST, instance._onEntryPaginatorChangeRequest, instance); var folderPage = 0; @@ -214,18 +234,18 @@ AUI.add( alwaysVisible: false, circular: false, containers: '.folder-paginator', - firstPageLinkLabel: '<<', - lastPageLinkLabel: '>>', - nextPageLinkLabel: '>', + firstPageLinkLabel: FIRST_PAGE_LINK_LABEL, + lastPageLinkLabel: LAST_PAGE_LINK_LABEL, + nextPageLinkLabel: NEXT_PAGE_LINK_LABEL, page: folderPage, - prevPageLinkLabel: '<', + prevPageLinkLabel: PREV_PAGE_LINK_LABEL, rowsPerPage: config.folderRowsPerPage, rowsPerPageOptions: config.folderRowsPerPageOptions, total: config.foldersTotal } ).render(); - folderPaginator.on('changeRequest', instance._onFolderPaginatorChangeRequest, instance); + folderPaginator.on(STR_CHANGE_REQUEST, instance._onFolderPaginatorChangeRequest, instance); var eventHandles = [ Liferay.after(instance._eventDataRequest, instance._afterDataRequest, instance), @@ -373,12 +393,12 @@ AUI.add( var sendIOResponse = A.bind(instance._sendIOResponse, instance, ioRequest); - ioRequest.after(['failure', 'success'], sendIOResponse); + ioRequest.after(['failure', STR_SUCCESS], sendIOResponse); ioRequest.set(STR_DATA, data); if (src === SRC_SEARCH) { - var repositoryId = event.requestParams[instance.NS + 'repositoryId']; + var repositoryId = event.requestParams[instance.NS + STR_REPOSITORY_ID]; var repositoriesData = instance._repositoriesData; @@ -449,13 +469,13 @@ AUI.add( var dataViewEntries = item.attr(DATA_VIEW_ENTRIES); var dataViewFolders = item.attr(DATA_VIEW_FOLDERS); - var direction = 'left'; + var direction = STR_DIRECTION_LEFT; if (item.attr(DATA_DIRECTION_RIGHT)) { - direction = 'right'; + direction = STR_DIRECTION_RIGHT; } - instance._listView.set('direction', direction); + instance._listView.set(STR_DIRECTION, direction); var config = instance._config; @@ -737,30 +757,29 @@ AUI.add( instance._setParentFolderTitle(content); instance._syncDisplayStyleToolbar(content); instance._setSearchResults(content); + + instance._parseContent(content); } }, _onDataRequest: function(event) { var instance = this; - var src = event.src; - - if (src === SRC_DISPLAY_STYLE_BUTTONS || src === SRC_ENTRIES_PAGINATOR) { - var selectedEntries; + var selectedEntries; - var entriesSelector = CSS_DOCUMENT_DISPLAY_STYLE_SELECTED + ' :checkbox'; + var entriesSelector = CSS_DOCUMENT_DISPLAY_STYLE_SELECTED + ' :checkbox'; - if (instance._getDisplayStyle(DISPLAY_STYLE_LIST)) { - entriesSelector = 'td > :checkbox:checked'; - } + if (instance._getDisplayStyle(DISPLAY_STYLE_LIST)) { + entriesSelector = 'td > :checkbox:checked'; + } - selectedEntries = instance._entriesContainer.all(entriesSelector); + selectedEntries = instance._entriesContainer.all(entriesSelector); - if (selectedEntries.size()) { - instance._selectedEntries = selectedEntries.val(); - } + if (selectedEntries.size()) { + instance._selectedEntries = selectedEntries.val(); } - else if (src === SRC_SEARCH) { + + if (event.src === SRC_SEARCH) { instance._entryPaginator.setState( { page: 1 @@ -811,13 +830,13 @@ AUI.add( requestParams[instance.ns(VIEW_FOLDERS)] = viewFolders; } - var direction = 'left'; + var direction = STR_DIRECTION_LEFT; if (event.currentTarget.attr(DATA_DIRECTION_RIGHT)) { - direction = 'right'; + direction = STR_DIRECTION_RIGHT; } - instance._listView.set('direction', direction); + instance._listView.set(STR_DIRECTION, direction); Liferay.fire( instance._eventDataRequest, @@ -834,7 +853,7 @@ AUI.add( WIN[instance.ns(STR_TOGGLE_ACTIONS_BUTTON)](); - Liferay.Util.checkAllBox( + Util.checkAllBox( instance._entriesContainer, [ instance.ns(STR_ROW_IDS_FILE_ENTRY_CHECKBOX), @@ -1104,6 +1123,16 @@ AUI.add( } }, + _parseContent: function(data) { + var instance = this; + + var tmpNode = A.Node.create('
'); + + tmpNode.plug(A.Plugin.ParseContent); + + tmpNode.ParseContent.parseContent(data); + }, + _processDefaultParams: function(event) { var instance = this; @@ -1142,9 +1171,9 @@ AUI.add( var allRowsIdCheckbox = instance.ns(allRowIds + 'Checkbox'); - var folderIds = Liferay.Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'FolderCheckbox')); - var fileEntryIds = Liferay.Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'FileEntryCheckbox')); - var fileShortcutIds = Liferay.Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'DLFileShortcutCheckbox')); + var folderIds = Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'FolderCheckbox')); + var fileEntryIds = Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'FileEntryCheckbox')); + var fileShortcutIds = Util.listCheckedExcept(form, allRowsIdCheckbox, instance.ns(rowIds + 'DLFileShortcutCheckbox')); form.get(instance.ns('folderIds')).val(folderIds); form.get(instance.ns('fileEntryIds')).val(fileEntryIds); @@ -1219,8 +1248,6 @@ AUI.add( if (addButton) { var addButtonContainer = instance.byId('addButtonContainer'); - addButtonContainer.plug(A.Plugin.ParseContent); - addButtonContainer.setContent(addButton); } @@ -1231,8 +1258,6 @@ AUI.add( var displayStyleButtonsContainer = instance.byId('displayStyleButtonsContainer'); - displayStyleButtonsContainer.plug(A.Plugin.ParseContent); - displayStyleButtonsContainer.setContent(displayStyleButtons); } @@ -1241,8 +1266,6 @@ AUI.add( if (sortButton) { var sortButtonContainer = instance.byId('sortButtonContainer'); - sortButtonContainer.plug(A.Plugin.ParseContent); - sortButtonContainer.setContent(sortButton); } }, @@ -1257,13 +1280,9 @@ AUI.add( entriesContainer.empty(); - entriesContainer.plug(A.Plugin.ParseContent); - entriesContainer.setContent(entries); instance._initDropTargets(); - - instance._updateSelectedEntriesStatus(); } }, @@ -1278,8 +1297,6 @@ AUI.add( if (fileEntrySearchContainer) { fileEntrySearchContainer.purge(true); - fileEntrySearchContainer.plug(A.Plugin.ParseContent); - fileEntrySearchContainer.setContent(fileEntrySearch); } } @@ -1293,8 +1310,6 @@ AUI.add( if (folders) { var listViewDataContainer = A.one('.lfr-list-view-data-container'); - listViewDataContainer.plug(A.Plugin.ParseContent); - instance._listView.set(STR_DATA, folders.html()); } }, @@ -1328,7 +1343,7 @@ AUI.add( var repositoryId; - var repositoryIdNode = instance.one('#' + instance.ns('repositoryId'), content); + var repositoryIdNode = instance.one('#' + instance.ns(STR_REPOSITORY_ID), content); if (repositoryIdNode) { repositoryId = repositoryIdNode.val(); @@ -1349,8 +1364,6 @@ AUI.add( var fragmentSearchResults = instance.one('#' + instance.ns('fragmentSearchResults'), content); if (searchInfo && searchType != SRC_SEARCH_FRAGMENT) { - entriesContainer.plug(A.Plugin.ParseContent); - entriesContainer.setContent(searchInfo); } @@ -1360,16 +1373,12 @@ AUI.add( var multipleSearchResults = entriesContainer.one('#' + instance.ns('searchResults') + repositoryId); if (multipleSearchResults) { - multipleSearchResults.plug(A.Plugin.ParseContent); - multipleSearchResults.setContent(fragmentSearchResults.html()); } else { singleSearchResults = entriesContainer.one('#' + instance.ns('singleSearchResults')); if (singleSearchResults) { - singleSearchResults.plug(A.Plugin.ParseContent); - singleSearchResults.setContent(fragmentSearchResults.html()); } } @@ -1378,8 +1387,6 @@ AUI.add( singleSearchResults = instance.one('#' + instance.ns('singleSearchResults'), content); if (singleSearchResults) { - entriesContainer.plug(A.Plugin.ParseContent); - entriesContainer.append(singleSearchResults); } @@ -1388,8 +1395,6 @@ AUI.add( if (searchResults) { var searchResultsContainer = instance.one('#' + instance.ns('searchResultsContainer'), content); - entriesContainer.plug(A.Plugin.ParseContent); - entriesContainer.append(searchResultsContainer); } @@ -1400,21 +1405,22 @@ AUI.add( repositorySearchResultsContainer.empty(); - repositorySearchResultsContainer.plug(A.Plugin.ParseContent); - repositorySearchResultsContainer.append(repositorySearchResults); } + + instance._updateSelectedEntriesStatus(); }, _sendIOResponse: function(ioRequest, event) { var instance = this; var data = ioRequest.get(STR_DATA); + var reponseData = ioRequest.get('responseData'); var eventType = instance._eventDataRetrieveSuccess; - if (event.type.indexOf('success') == -1) { + if (event.type.indexOf(STR_SUCCESS) == -1) { eventType = instance._dataRetrieveFailure; } @@ -1468,9 +1474,9 @@ AUI.add( var selectAllCheckbox = instance._selectAllCheckbox; - Liferay.Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FOLDER_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); - Liferay.Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FILE_ENTRY_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); - Liferay.Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); + Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FOLDER_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); + Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FILE_ENTRY_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); + Util.checkAll(documentContainer, instance.ns(STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX), selectAllCheckbox, CSS_RESULT_ROW); WIN[instance.ns(STR_TOGGLE_ACTIONS_BUTTON)](); @@ -1511,7 +1517,7 @@ AUI.add( selectElement.attr(ATTR_CHECKED, !selectElement.attr(ATTR_CHECKED)); - Liferay.Util.updateCheckboxValue(selectElement); + Util.updateCheckboxValue(selectElement); } } @@ -1567,6 +1573,16 @@ AUI.add( ); selectedEntries.length = 0; + + Util.checkAllBox( + instance._entriesContainer, + [ + instance.ns(STR_ROW_IDS_FILE_ENTRY_CHECKBOX), + instance.ns(STR_ROW_IDS_FILE_SHORTCUT_CHECKBOX), + instance.ns(STR_ROW_IDS_FOLDER_CHECKBOX) + ], + instance._selectAllCheckbox + ); } }, diff --git portal-web/docroot/html/themes/_styled/css/application.css portal-web/docroot/html/themes/_styled/css/application.css index bc3188b..8714b31 100644 --- portal-web/docroot/html/themes/_styled/css/application.css +++ portal-web/docroot/html/themes/_styled/css/application.css @@ -578,6 +578,7 @@ .ie7 .aui-paginator-link { color: transparent; + font-size: 0; overflow: hidden; text-indent: 0; } diff --git portal-web/docroot/html/themes/_styled/css/base.css portal-web/docroot/html/themes/_styled/css/base.css index 8b29f28..6c67279 100644 --- portal-web/docroot/html/themes/_styled/css/base.css +++ portal-web/docroot/html/themes/_styled/css/base.css @@ -1,3 +1,5 @@ +@import "compass"; + /* ---------- Browser normalization ---------- */ article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { @@ -157,6 +159,11 @@ body.html-editor { color: #000; } +.html-editor.portlet-message-boards { + @include hyphenation; + word-wrap: break-word; +} + .html-editor.portlet-message-boards blockquote { background: #EEF0F2 url(../images/message_boards/quoteleft.png) no-repeat 5px 5px; border: 1px solid #777; diff --git portal-web/docroot/html/themes/classic/_diffs/css/custom.css portal-web/docroot/html/themes/classic/_diffs/css/custom.css index f129918..4e9e47b 100644 --- portal-web/docroot/html/themes/classic/_diffs/css/custom.css +++ portal-web/docroot/html/themes/classic/_diffs/css/custom.css @@ -46,6 +46,7 @@ hr, .separator { height: auto; margin-top: 1.4em; position: relative; + z-index: 210; } .site-title .site-name { @@ -107,6 +108,14 @@ hr, .separator { top: -1.2em; } +.ie7 #banner { + z-index: 2; +} + +.ie7 .portlet-message-boards .thread-body { + word-wrap: break-word; +} + .ie6 #banner { height: 1%; } @@ -266,6 +275,10 @@ hr, .separator { margin-top: 4px; } +.portlet-asset-publisher .asset-content, .portlet-asset-publisher .asset-summary, .portlet-asset-publisher .asset-title, .portlet-asset-publisher .header-title, .portlet-asset-publisher li.title-list, .portlet-asset-publisher .results-row, .portlet-blogs .entry-body, .portlet-blogs .entry-title, .portlet-blogs .header-title, .portlet-journal-content .journal-content-article, .portlet-message-boards .header-title, .portlet-message-boards .thread-body, .portlet-search .results-row { + @include hyphenation; +} + .portlet-icons { float: none; } diff --git portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css index b71c583..9280d1e 100644 --- portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css +++ portal-web/docroot/html/themes/control_panel/_diffs/css/custom.css @@ -4,7 +4,7 @@ /* ---------- Base styles ---------- */ body { - background: #EEF0F2; + background: #EEF0F2 url(../images/custom/sidebar_bg.png) repeat-y 0 0; color: #1A1A1A; font-size: 12px; } @@ -22,31 +22,15 @@ select { padding: 4px; } -.display-panel-columns:after, .display-panel-columns:before { - position: fixed; - content: ''; - display: block; - bottom: 0; - top: 0; - width: 238px; - z-index: -1; -} - -.display-panel-columns:after { - margin-left: 1px; - border-right: 1px solid #FFF; -} - -.display-panel-columns:before { - background-color: #CAD2DD; - border-right: 1px solid #B0B1B3; +body.portal-popup:after, body.portal-popup:before { + background-image: none; } -body.portal-popup:after, body.portal-popup:before { - display: none; +.panels-minimized.display-panel-columns { + background-position: -198px 0; } -.panels-minimized.display-panel-columns:before, .panels-minimized.display-panel-columns:after, .panels-minimized .panel-page-menu { +.panels-minimized .panel-page-menu { left: -198px; } diff --git portal-web/docroot/html/themes/control_panel/_diffs/images/custom/sidebar_bg.png portal-web/docroot/html/themes/control_panel/_diffs/images/custom/sidebar_bg.png new file mode 100644 index 0000000..23509bd Binary files /dev/null and portal-web/docroot/html/themes/control_panel/_diffs/images/custom/sidebar_bg.png differ diff --git portal-web/third-party/alloy-1.5.0.zip portal-web/third-party/alloy-1.5.0.zip index f010be4..7cea838 100644 Binary files portal-web/third-party/alloy-1.5.0.zip and portal-web/third-party/alloy-1.5.0.zip differ diff --git util-taglib/src/com/liferay/taglib/aui/ScriptTag.java util-taglib/src/com/liferay/taglib/aui/ScriptTag.java index b2bb629..ce00ac2 100644 --- util-taglib/src/com/liferay/taglib/aui/ScriptTag.java +++ util-taglib/src/com/liferay/taglib/aui/ScriptTag.java @@ -15,21 +15,17 @@ package com.liferay.taglib.aui; import com.liferay.portal.kernel.servlet.BodyContentWrapper; -import com.liferay.portal.kernel.servlet.BrowserSnifferUtil; import com.liferay.portal.kernel.servlet.PortalIncludeUtil; import com.liferay.portal.kernel.servlet.taglib.FileAvailabilityUtil; import com.liferay.portal.kernel.servlet.taglib.aui.ScriptData; import com.liferay.portal.kernel.util.ServerDetector; import com.liferay.portal.kernel.util.StringBundler; -import com.liferay.portal.kernel.util.StringPool; import com.liferay.portal.kernel.util.WebKeys; +import com.liferay.portal.model.Portlet; import com.liferay.taglib.aui.base.BaseScriptTag; -import java.util.Set; - import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; @@ -89,24 +85,15 @@ public class ScriptTag extends BaseScriptTag { (HttpServletRequest)pageContext.getRequest(); ScriptData scriptData = (ScriptData)request.getAttribute( - ScriptTag.class.getName()); + WebKeys.AUI_SCRIPT_DATA); if (scriptData == null) { - scriptData = (ScriptData)request.getAttribute( - WebKeys.AUI_SCRIPT_DATA); - - if (scriptData != null) { - request.removeAttribute(WebKeys.AUI_SCRIPT_DATA); - } + return; } - if (scriptData != null) { - ScriptTag scriptTag = new ScriptTag(); + request.removeAttribute(WebKeys.AUI_SCRIPT_DATA); - scriptTag.setPageContext(pageContext); - - scriptTag.processEndTag(scriptData); - } + scriptData.writeTo(request, pageContext.getOut()); } @Override @@ -117,6 +104,15 @@ public class ScriptTag extends BaseScriptTag { boolean positionInline = isPositionInLine(); try { + String portletId = null; + + Portlet portlet = (Portlet)request.getAttribute( + WebKeys.RENDER_PORTLET); + + if (portlet != null) { + portletId = portlet.getPortletId(); + } + StringBundler bodyContentSB = getBodyContentAsStringBundler(); String use = getUse(); @@ -124,9 +120,7 @@ public class ScriptTag extends BaseScriptTag { if (positionInline) { ScriptData scriptData = new ScriptData(); - request.setAttribute(ScriptTag.class.getName(), scriptData); - - scriptData.append(bodyContentSB, use); + scriptData.append(portletId, bodyContentSB, use); String page = getPage(); @@ -136,7 +130,7 @@ public class ScriptTag extends BaseScriptTag { PortalIncludeUtil.include(pageContext, page); } else { - processEndTag(scriptData); + scriptData.writeTo(request, pageContext.getOut()); } } else { @@ -149,7 +143,7 @@ public class ScriptTag extends BaseScriptTag { request.setAttribute(WebKeys.AUI_SCRIPT_DATA, scriptData); } - scriptData.append(bodyContentSB, use); + scriptData.append(portletId, bodyContentSB, use); } return EVAL_PAGE; @@ -158,10 +152,6 @@ public class ScriptTag extends BaseScriptTag { throw new JspException(e); } finally { - if (positionInline) { - request.removeAttribute(ScriptTag.class.getName()); - } - if (!ServerDetector.isResin()) { cleanUp(); } @@ -186,50 +176,4 @@ public class ScriptTag extends BaseScriptTag { setUse(null); } - protected void processEndTag(ScriptData scriptData) throws Exception { - JspWriter jspWriter = pageContext.getOut(); - - jspWriter.write(""); - } - } \ No newline at end of file diff --git util-taglib/src/com/liferay/taglib/util/PositionTagSupport.java util-taglib/src/com/liferay/taglib/util/PositionTagSupport.java index 57e2110..e20537b 100644 --- util-taglib/src/com/liferay/taglib/util/PositionTagSupport.java +++ util-taglib/src/com/liferay/taglib/util/PositionTagSupport.java @@ -78,10 +78,7 @@ public class PositionTagSupport extends BaseBodyTagSupport implements BodyTag { ThemeDisplay themeDisplay = (ThemeDisplay)request.getAttribute( WebKeys.THEME_DISPLAY); - if (themeDisplay.isIsolated() || - themeDisplay.isLifecycleResource() || - themeDisplay.isStateExclusive()) { - + if (themeDisplay.isIsolated()) { position = _POSITION_INLINE; } else {