Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-3085 - fixing community portlet for ajax page reload
Browse files Browse the repository at this point in the history
  • Loading branch information
vrockai authored and bdaw committed Jun 3, 2013
1 parent 2f6c3ad commit eebab3d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
14 changes: 14 additions & 0 deletions mobile-integration/portlets/community/pom.xml
Expand Up @@ -57,6 +57,20 @@
<artifactId>common-logging</artifactId>
<type>jar</type>
</dependency>

<!-- ExoKernel Integration to retrieve Service -->
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.commons</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>

<repositories>
Expand Down
Expand Up @@ -2,6 +2,9 @@
* jQuery accordion pane plugin for responsive community portlet.
*/
(function($){

init = function() {

$.fn.accordion = function(options) {

var settings = $.extend({}, {
Expand All @@ -21,4 +24,8 @@
});
};

};

return {init: init};

})(jQuery);
@@ -1,5 +1,5 @@
(function ($) {

init = function() {
var loadWithAjax = function(feed){

var loader = feed.children(".ajaxLoader").first();
Expand All @@ -26,4 +26,7 @@

$(".gtnResponsiveCommunityPortlet #conversation-accordion").accordion();

};
return {init: init};

})(jQuery);
Expand Up @@ -5,6 +5,8 @@
<%@ page import="java.util.Locale"%>
<%@ page import="java.util.ResourceBundle"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ page import="org.exoplatform.webui.application.WebuiRequestContext" %>
<%@ page import="org.exoplatform.web.application.JavascriptManager" %>
<portlet:defineObjects />

<c:set var="resourceBundle" value="${portletConfig.getResourceBundle(renderRequest.locale)}"/>
Expand All @@ -13,6 +15,13 @@
<c:set var="urlDocumentation" value="${renderRequest.getPreferences().getValue('url.docs', '/#')}" />
<c:set var="urlJira" value="${renderRequest.getPreferences().getValue('url.jira', '/#')}" />

<%-- Hack because web ui can't properly handle javascript modules after a full ajax page reload --%>
<%
JavascriptManager jsMan = ((WebuiRequestContext)WebuiRequestContext.getCurrentInstance()).getJavascriptManager();
jsMan.require("SHARED/accordion_jquery", "accordion_jquery").addScripts("accordion_jquery.init();");
jsMan.require("SHARED/org_gatein_community", "community").addScripts("community.init();");
%>

<div id="id<portlet:namespace/>_gtnResponsiveCommunityPortlet" class="gtnResponsiveCommunityPortlet ">

<div id="willing">
Expand Down

0 comments on commit eebab3d

Please sign in to comment.