Recent Changes - Search:

Administrators

Developers

Articles

Cookbook

edit

How to display QuiX custom widgets and load external stylesheets

Developers.HowToIncludeQuiXCustomWidgetsAndStylesheets History

Hide minor edits - Show changes to markup

June 07, 2007, at 10:02 PM by Tassos Koutsovassilis -
Changed lines 33-34 from:

First you need to load the JavaScript file (module) that contains your widget implementation. Incude the following declaration inside your QuiX? UI file:

to:

First you need to load the JavaScript file (module) that contains your widget implementation. Simply, include the following declaration inside your QuiX UI file:

Changed lines 40-41 from:

This loads the JavaScript file dynamically. After this in order to have you custom widget displayed add this kind of node:

to:

This loads the JavaScript file dynamically and your class becomes available. After this in order to have you custom widget displayed add this kind of node:

Changed lines 47-48 from:

The classname attribute should contain the name of the class that implements our custom widget.

to:

The classname attribute should contain the name of the JavaScript class that implements our custom widget.

June 07, 2007, at 09:59 PM by Tassos Koutsovassilis -
Changed lines 3-6 from:

Loading external stylesheets is pretty simple. All you have to do is to include the following declaration inside your QuiX? UI file:

to:

Loading external stylesheets is pretty simple. All you have to do is to include the following declaration inside your QuiX UI file:

Added lines 9-51:

This declaration creates a new LINK node appended to the document's HEAD.

Third party widgets are implemented inside JavaScript files. A typical widget class looks like this:

function VPlayer(params) {
	params = params || {};

	params.width = params.width || '100%';
	params.height = params.height || '100%';
	params.overflow = 'hidden';

	this.base = Widget;
	this.base(params);
}

VPlayer.prototype = new Widget;

...add here your widget's methods...

Then, in order to include it inside a QuiX UI file, follow the following steps. First you need to load the JavaScript file (module) that contains your widget implementation. Incude the following declaration inside your QuiX? UI file:

<a:module xmlns:a="http://www.innoscript.org/quix" name="My Custom Widgets" src="JAVASCRIPT_FILE_URL"/>

This loads the JavaScript file dynamically. After this in order to have you custom widget displayed add this kind of node:

<a:custom classname="VPlayer"/>

The classname attribute should contain the name of the class that implements our custom widget.

That's all.

June 07, 2007, at 09:43 PM by Tassos Koutsovassilis -
Added lines 1-9:

(:title How to display QuiX custom widgets and load external stylesheets:)

Loading external stylesheets is pretty simple. All you have to do is to include the following declaration inside your QuiX? UI file:

<a:stylesheet xmlns:a="http://www.innoscript.org/quix" name="THE_NAME_OF_YOUR_STYLESHEET" src="SYLESHEET_URL"/>

Page last modified on June 07, 2007, at 10:02 PM