Author: hansbak
Date: Wed May 4 07:13:21 2011
New Revision: 1099345
URL:
http://svn.apache.org/viewvc?rev=1099345&view=revLog:
collapse portlet was not remembered
Modified:
ofbiz/trunk/framework/images/webapp/images/selectall.js
Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1099345&r1=1099344&r2=1099345&view=diff==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed May 4 07:13:21 2011
@@ -604,19 +604,19 @@ function toggleCollapsiblePanel(link, ar
*/
function toggleScreenlet(link, areaId, saveCollapsed, expandTxt, collapseTxt){
toggleCollapsiblePanel(link, areaId, expandTxt, collapseTxt);
- var container = jQuery("#" + areaId);
- var screenlet = jQuery(link).parents('div:first');;
- if(container.is(':visible')){
- var currentParam = screenlet.id + "_collapsed=false";
- var newParam = screenlet.id + "_collapsed=true";
+ var screenlet = jQuery(link).parents('div:eq(1)').attr('id');
+ var title = jQuery(link).attr('title');
+ if(title == expandTxt){
+ var currentParam = screenlet + "_collapsed=false";
+ var newParam = screenlet + "_collapsed=true";
if(saveCollapsed=='true'){
- setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet.id+"_collapsed",'true');
+ setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet+"_collapsed",'true');
}
} else {
- var currentParam = screenlet.id + "_collapsed=true";
- var newParam = screenlet.id + "_collapsed=false";
+ var currentParam = screenlet + "_collapsed=true";
+ var newParam = screenlet + "_collapsed=false";
if(saveCollapsed=='true'){
- setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet.id+"_collapsed",'false');
+ setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet+"_collapsed",'false');
}
}
var paginationMenus = jQuery('div.nav-pager');