Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customising CE10 ePortfolio mouse actions 5

Status
Not open for further replies.
Sep 29, 2004
3
GB
I've been customising CE10 ePortfolio, and have almost got it working the way we need it. However, comments from the user base, have led me to a little stumbling block.

When they place their mouse over a report object, it brings up a black box detailing the path and report name. As this is already shown on the screen, they want this removing, as they feel it is confusing.

Also, when they click on the report, they are presented with a list of options (“View” | “View Latest Instance” | “History” etc). We would like to be able to change the wording, as again, the users are getting confused.

Does anyone know how I can achieve this?

Any help would be appreciated.

Lee
 
Hi Lee

I've delved into the e-portfolio application and found that AVAILABLE.CSP (in your e-portfolio directory) contains the function WRITEACTIONS. I think this is the function that creates each object's options (and perhaps black box) at runtime.

Regards

Martin
 
I had exactly the same problem you described - and customized around it in CE9. The changes below are from CE10, but I have not begun testing the migration.

Look for the following code (somewhere near line 2200) and change as indicated:
Code:
// v9 customization simplifies the mouseover display
//Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + strTempDescription + "', CAPTION, '" + PathString + "<br><hr size=1>" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 20, SNAPY, 20);\"");	// Drop. v9 customization
Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + L_REPORT_TOOLTIP + "', CAPTION, '" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 0, SNAPY, 0);\""); 										// Add. v9 customization
And a few lines further on:
Code:
// v9 customization simplifies the mouseover display and replaces report filename with description
if( dv[SETTING_DESC] == 1 )
//	Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + strTempDescription + "', CAPTION, '" + PathString + "<br><hr size=1>" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 20, SNAPY, 20);\"");	// Drop. v9 customization
		Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + L_REPORT_TOOLTIP + "', CAPTION, '" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 0, SNAPY, 0);\""); 										// Add. v9 customization
//Response.Write(" >" + Server.HTMLEncode(reportTitle) + "</a><br>" + vbCRLF);		// Drop. v9 customization
Response.Write(" >" + Server.HTMLEncode(obj.Description) + "</a><br>" + vbCRLF);	// Add. v9 customization
The same occurs about 100 lines further down:
Code:
// v9 customization simplifies the mouseover display and replaces report filename with description
if( dv[SETTING_DESC] == 1 )
//	Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + strTempDescription + "', CAPTION, '" + PathString + "<br><hr size=1>" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 20, SNAPY, 20);\"");	// Drop. v9 customization
	Response.Write(" onMouseOut='nd();' onMouseOver=" + "\"" + "overlib('" + L_REPORT_TOOLTIP + "', CAPTION, '" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 0, SNAPY, 0);\"");										// Add. v9 customization
//Response.Write(" >" + HTMLNonBreakableSpaceStippled(Server.HTMLEncode(reportTitle)) + "</a></td>" + vbCRLF);		// Drop. v9 customization
Response.Write(" >" + HTMLNonBreakableSpaceStippled(Server.HTMLEncode(obj.Description)) + "</a></ul>" + vbCRLF);	// Add. v9 customization
And again:
Code:
// v9 customization simplifies the mouseover display and replaces report filename with description
//	Response.Write(" onmouseout='nd();' onmouseover=" + "\"" + "overlib('" + strTempDescription + "', CAPTION, '" + PathString + "<br><hr size=1>" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 20, SNAPY, 20);" + "\"");	// Drop. v9 customization
	Response.Write(" onmouseout='nd();' onmouseover=" + "\"" + "overlib('" + L_REPORT_TOOLTIP_AV + "', CAPTION, '" + Server.HTMLEncode(strJSReportTitle) + "', SNAPX, 0, SNAPY, 0);" + "\"");									// Add. v9 customization
	}
//Response.Write(">" + Server.HTMLEncode(reportTitle) + "</a></div>");		// Drop. v9 customization
Response.Write(">" + Server.HTMLEncode(obj.Description) + "</a></div>");	// Add. v9 customization
The following string variables were added in the localization area:
Code:
var L_REPORT_CAPTION = "Report Comments:";												// Add-on. v9 customization
var L_REPORT_TOOLTIP = "Click the report name for a menu of available actions.";		// Add-on. v9 customization
var L_REPORT_TOOLTIP_AV = "Click any of the available actions below the report name.";	// Add-on. v9 customization
You can also look at the following color and size tweaks:
Code:
// These define the action-menu appearance. "Over" colors are 
// used on mouse-over, i.e., for highlighting (from v9 customization)
HM_PG_MenuWidth = 150; // was 120;					v9 customization
HM_PG_FontFamily = "arial"; // was "verdana";		v9 customization
HM_PG_FontSize = 9; // was 8;						v9 customization
HM_PG_FontBold = 0;
HM_PG_FontItalic = 0;
HM_PG_FontColor = "#ffebcd"; // was "white";		v9 customization (brown/light)
HM_PG_FontColorOver = "f00"; // was "black";		v9 customization (orange)
HM_PG_BGColor = "#704020"; // darker -- was "#006699"; // darker -- adapted from a v9 customization (brown/dark)
HM_PG_BGColorOver = "#D2B48C"; // lighter -- was "#7B9AC5"; // lighter -- adapted from a v9 customization (brown/medium)

For changes to action names, I had written a conversion function for CE9, but it doesn't fit directly in CE10. It looks like this:
Code:
function LC_ConvertAction( actionName)
{
	switch( actionName)
	{
		case "View":					return "View From Database";
		case "View Latest Instance":	return "View Last Report";
		case "History":					return "Display Report History";
		case "Schedule":				return "Set Report Schedule";
		default: return actionName;
	}
}
I used the function on the variable actionItem.Name [i.e., LC_ConvertAction( actionItem.Name)], but that var seems to have been deprecated in CE10. I'm looking at a new variable, bean_action, but I haven't had time to try it out. Maybe LC_ConvertAction( bean_action) will work.
 
Thanks mdwyer,

Those code snippets have worked a treat. Although I didn't have to use all of it, as I didn't seem to have as many sections in my version of available.csp. It seems to be working ok though.

I took you idea for the ConvertAction function, and tried to incorporate it into our v10, and it looks like I've managed to get that working too.

What I have done is used

var desc = bean_action.Description(lang);

in the function function WriteActions(obj, realObj, index, instId ), to call your function, and seems to be working fine too.

So again, thanks for you help.

Regards
Lee
 
And thank you for the tip on bean_action.Description. You've probably saved me some time as well.
 
Sorry, I didn't make it very clear in my response above, for anyone else looking at this thread. It should have read:

I replaced

var desc = bean_action.Description(lang);

with

var desc = LC_ConvertAction(bean_action.Description(lang));

Regards
Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top