Difference between revisions of "MyPortal Development guide"

From Catglobe Wiki
Jump to: navigation, search
m
Line 5: Line 5:
 
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 an user defined element<br> ==
+
== How to make&nbsp;user defined elements<br> ==
  
An user defined element as its name is the one you can put anything you want. You have 2 sections to make it real.<br>
+
A user defined element as its name is the one you can put anything you want.  
  
- Use Detailed decsription tabs ( one for default, one for specific): They are just a HTML editor. It is required not empty to show on your portal page.<br>
+
[[Image:MyPortal - User-defined.jpg]]&nbsp;<br>
  
- Script editor: Available from version 5.5. Comes from the need to show data in real time using webservice to collect data. It is really a powerful feature which makes MyPortal more alive.<br>
+
An element&nbsp;contains 2 features:
 +
 
 +
*HTML content: input inside Detailed decsription tab's HTML editor. It is&nbsp;required to show your element in MyPortal page&nbsp;(empty content will end up in not displaying anything)
 +
*Javascript: input inside Detailed description tab's script mode. It&nbsp;is used&nbsp;to manipulate the way the element will act, it can connect to registered web services or&nbsp;change the HTML content dynamically. jQuery is also supported, which make it even more powerful.
  
 
== Script Enabled Feature<br> ==
 
== Script Enabled Feature<br> ==

Revision as of 12:23, 31 December 2008

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.

MyPortal - User-defined.jpg 

An element contains 2 features:

  • HTML content: input inside Detailed decsription tab's HTML editor. It is required to show your 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 Enabled Feature

Events supported:

onload: called when element finished loading
onadd: called when it is added to MyPortal for the first time ( by Insert dialog)
onminimize: when minimize
onmaximize: when maximize
onremove: when element is removed from MyPortal
onmouseover: when mouse is over an element.
onmouseout: when mouse is out of an element.

set_title(titleText): Change the title of element to the new one.

How to write code?

this.onload = function()

{

// use "this" keyword to access the element itself.

}

Examples

Call a webservice:

Play a movie clip using CGFlashPlayer:

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.