Difference between revisions of "MyPortal Development guide"
Line 1: | Line 1: | ||
− | == Introduction == | + | == Introduction == |
The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you. | The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you. | ||
− | For more information, visit helpfiles at [http://vietnamhelpfiles.catglobe.com/ vietnamhelpfiles.catglobe.com/] under Persionalization/MyPortal. | + | For more information, visit helpfiles at [http://vietnamhelpfiles.catglobe.com/ vietnamhelpfiles.catglobe.com/] under Persionalization/MyPortal. |
== How to make user defined elements<br> == | == How to make user defined elements<br> == | ||
Line 23: | Line 23: | ||
*''onadd'': called when it is added to MyPortal for the first time (by Insert dialog) | *''onadd'': called when it is added to MyPortal for the first time (by Insert dialog) | ||
*''onminimize'': called when minimizing the element | *''onminimize'': called when minimizing the element | ||
− | *''onmaximize'': called when maximizing the element | + | *''onmaximize'': called when maximizing the element |
*''onremove'': called when the element is removed from MyPortal page | *''onremove'': called when the element is removed from MyPortal page | ||
*''onmouseover'': called when mouse is over the element | *''onmouseover'': called when mouse is over the element | ||
− | *''onmouseout'': called when mouse is out of the element | + | *''onmouseout'': called when mouse is out of the element |
*''set_title(titleText)'': change the title of element | *''set_title(titleText)'': change the title of element | ||
=== Sample code === | === Sample code === | ||
− | <source lang="javascript" line="1"> | + | <source lang="javascript" line="1"> |
− | this.onload = function() | + | this.onload = function() { |
− | { | ||
// use "this" keyword to access the element itself. | // use "this" keyword to access the element itself. | ||
− | } | + | } |
− | </source> | + | </source> |
− | == | + | == Problems == |
− | < | + | Even though it is quite simple to make an element but people usually get problems with using something. First, i want to mention some problems with HTML editor:<br> |
− | <u> | + | - <u>Using flash object</u>: You are free to add a flash object. Problem is that it is places on top of others, thus, you cannot see the menu opening from tools. To cover it, you need to add these parameters into flash:<br> |
− | == | + | ''IE: "<param name='wmode' value='transparent' />"<br>FF: 'wmode="transparent" '''<br> |
− | + | - Be careful with the HTML you made. There is no checking or warrantee from MyPortal framework. | |
− | + | == Examples == | |
− | + | <u>Call a webservice</u>: | |
− | + | <u>Play a movie clip using CGFlashPlayer</u>: |
Revision as of 11:34, 31 December 2008
Contents
Introduction
The My Portal page is your own personalized view of what goes on in the Catglobe system that is interesting to you.
For more information, visit helpfiles at vietnamhelpfiles.catglobe.com/ under Persionalization/MyPortal.
How to make user defined elements
A user defined element as its name is the one you can put anything you want.
An element contains 2 features:
- HTML content: input inside Detailed decsription tab's HTML editor. It is required to show the element in MyPortal page (empty content will end up in not displaying anything)
- Javascript: input inside Detailed description tab's script mode. It is used to manipulate the way the element will act, it can connect to registered web services or change the HTML content dynamically. jQuery is also supported, which make it even more powerful.
Script - Supported features
Events
- onload: called when element finished loading
- onadd: called when it is added to MyPortal for the first time (by Insert dialog)
- onminimize: called when minimizing the element
- onmaximize: called when maximizing the element
- onremove: called when the element is removed from MyPortal page
- onmouseover: called when mouse is over the element
- onmouseout: called when mouse is out of the element
- set_title(titleText): change the title of element
Sample code
1
2
3 this.onload = function() {
4
5 // use "this" keyword to access the element itself.
6
7 }
Problems
Even though it is quite simple to make an element but people usually get problems with using something. First, i want to mention some problems with HTML editor:
- Using flash object: You are free to add a flash object. Problem is that it is places on top of others, thus, you cannot see the menu opening from tools. To cover it, you need to add these parameters into flash:
IE: "<param name='wmode' value='transparent' />"
FF: 'wmode="transparent" '
- Be careful with the HTML you made. There is no checking or warrantee from MyPortal framework.
Examples
Call a webservice:
Play a movie clip using CGFlashPlayer: