Piece of mind | of Łukasz Lipiński

Feb/10

3

Ajax.org Platform 3.0 beta2 Released!

I do not want to repeat over and over again the same things, so to get more informations please look at following articles:

Ruben Daniels blog:
http://www.rubendaniels.com/2010/02/01/ajaxorg-platform-30-beta2-released/

My blog (in polish)
http://uzza.pl/blog-javascript/2010/02/03/ajax-org-platform-3-0-beta-2-ujrzala-swiatlo-dzienne/

Stay tuned !

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, Hide

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

You’ll find answers on following questions:

  • How to add events to elements, and how to call component’s methods by its

At begining i would like to remind You about that we base on files from previous part of this article.

Events should be added in $draw function. We can do this in very simple way, by setting attribute to button node. Javeline Platform assing a unique id to each of components instances. In that way we can call component’s methods using that id’s to identify component object.

  1. oButton.setAttribute("onmouseover", "jpf.lookup(" + this.uniqueId + ").$setStyleClass(this, 'hover');");
  2. oButton.setAttribute("onmouseout", "jpf.lookup(" + this.uniqueId + ").$setStyleClass(this, '', ['hover']);");
  3. oButton.setAttribute("onmousedown", "jpf.lookup(" + this.uniqueId + ").selectButton(this.innerHTML);");

In next step we’ll set captions to each of buttons. Why we didn’t do that when we was setting attributes ? Answer is simple, because we worked with xmlNodes.

So now we need to get htmlNodes (we will use this.oStatus in next steps) and define array with captions:

  1. this.oStatus = this.$getLayoutNode("main", "status", this.oExt);
  2. this.oButtons = this.$getLayoutNode("main", "buttons", this.oExt);
  3.  
  4. var captions = [
  5. 1, 2, 3, 0, "/", "+",
  6. 4, 5, 6, ".", "*", "-",
  7. 7, 8, 9, "+/-", "%", "=",
  8. ];

We are looking for row and button elements among child nodes of oButtons element and we are setting captions to buttons:

  1. var nodes1 = this.oButtons.childNodes;
  2. for (var i = 0, l1 = nodes1.length, counter = 0; i < l1; i++) {
  3. if ((nodes1[i].className || "").indexOf("calcrow") != -1) {
  4. var nodes2 = nodes1[i].childNodes;
  5. for(var j = 0, l2 = nodes2.length; j < l2; j++) {
  6. if ((nodes2[j].className || "").indexOf("calcbtn") != -1) {
  7. nodes2[j].innerHTML = captions[counter++];
  8. }
  9. }
  10. }
  11. }

We can’t forget about selectButton function. In that way You can communicate with component. Of course You don’t need use innerHTML, it can be something else.

  1. this.selectButton = function(sChar) {
  2. this.oStatus.innerHTML += sChar;
  3. };
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , Hide

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

You’ll find answers on following questions:

  • How to add more elements to component
  • How to set CSS only for specific browsers

For add more elements to component we need to define its in skin file. If we want use its only one time (in component), we can add its to MAIN section:

  1. <j:main container="." buttons="div[2]" status="div[1]">
  2. <div class="calc">
  3. <div class="status"> </div>
  4. <div class="buttons"> </div>
  5. </div>
  6. </j:main>

if more, better will be create a new section:

  1. <j:calcrow>
  2. <div class="calcrow"> </div>
  3. </j:calcrow>
  4. <j:calcbtn>
  5. <div class="calcbtn"> </div>
  6. </j:calcbtn>

Now we can use this elements in this.$draw method. At begining we get a status and buttons elements:

  1. var oButtons = this.$getLayoutNode("main", "buttons", oExt);
  2. var oStatus = this.$getLayoutNode("main", "status", oExt);

First param sets a name of section from which we want to get a element, second a name of attribute which specify a XPath to it.

  1. status="div[1]" //XPath to status element in <div class="calc">

To switch section to which we are taking a data from and create a new instance of it, we need to use following function:

  1. this.$getNewContext(sectionName);

In that way we can create more the same elements. Like here where we created 3 rows with 6 buttons:

  1. for (var i = 0; i < 3; i++) {
  2. this.$getNewContext("calcrow");
  3. var oRow = oButtons.appendChild(this.$getLayoutNode("calcrow"));
  4.  
  5. for (var j = 0; j < 6; j++) {
  6. this.$getNewContext("calcbtn");
  7. var oButton = oRow.appendChild(this.$getLayoutNode("calcbtn"));
  8. }
  9. }

Our component will be nothing if we won’t use CSS for it. Here is a simple CSS style to arrange buttons inline in rows and set some colors to elements.

  1. <j:style><![CDATA[
  2. .calc {
  3. width : 192px;
  4. height : 118px;
  5. border : 1px solid black;
  6. overflow : hidden;
  7. padding : 0;
  8. }
  9. .calc .status {
  10. width : 100%;
  11. height : 23px;
  12. }
  13.  
  14. .calc .calcrow {
  15.  
  16. }
  17.  
  18. .calc .calcbtn {
  19. width : 30px;
  20. height : 30px;
  21. background-color : silver;
  22. display : inline-block;
  23. margin : 1px;
  24. }
  25. ]]></j:style>

Someone will tell “Ok, but this style is incorrect for Internet Exploerer”… Yes it is, now i need to introduct a simple way to specify CSS styles for specific browser. Here it is:

  1. <j:style condition="jpf.isIE"><![CDATA[
  2. .calc .calcbtn {
  3. float:left;
  4. }
  5. ]]></j:style>

This code fix all problems with display:inline-block; option.

Of course we can use different conditions like:
jpf.isOpera, jpf.isSafari, jpf.isKonqueror, jpf.isIphone, jpf.isChrome, jpf.isGecko, jpf.isGecko3 or jpf.isIE8.

You’ll find answers for Your all questions in Javeline Platform RefGuide at http://www.ajax.org/documentation/refguide/

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

No tags Hide

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

You’ll find answers on following questions:

  • Which namespace should be used, and what files should be included
  • How default skin declaration looks
  • How much javascript code is needed to create the simplest component

I would like to show You in this article how easy is creating components. For example this will be a calc component. First of all we need to prepare a default html document with linked JPF library, skin file and our component js file.

index.html file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns:j="http://www.javeline.com/2005/jml"
  4. xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <title>Calc component</title>
  7. <script src="jpf_release.js"></script>
  8. <script src="jpf.calc.js"></script>
  9. </head>
  10. <body>
  11. <j:skin src="skins.xml" icon-path=""></j:skin>
  12.  
  13. <j:calc />
  14. </body>
  15. </html>

In next step we should create a skin file with 2 sections: Style and Presentation:

skin.xml file

  1. <?xml version='1.0'?>
  2. <j:skin xmlns:j="http://www.javeline.com/2005/jml"
  3. xmlns="http://www.w3.org/1999/xhtml">
  4. <j:calc name="calc">
  5. <j:style><![CDATA[
  6. .calc {
  7.  
  8. }
  9. ]]></j:style>
  10. <j:presentation>
  11. <j:main container=".">
  12. <div class="calc"> </div>
  13. </j:main>
  14. </j:presentation>
  15. </j:calc>
  16. </j:skin>

As we see, there is a default declaration of skin for calc component:

Default declaration of skin

  1. <j:calc name="calc"></j:calc>

If we’ll create more skins we need to change name attribute and CSS class name of main container. If these component will can contain other components, name of main and child containers should be realy unique, because they won’t be overwriting classes of contained components. (Remember, space between DIV tags should be there, this is not a misstake).

Class name of main container

  1. <div class="calc"> </div>

And finaly, javascript code for new component should look like:

  1. jpf.calc = jpf.component(jpf.NODE_VISIBLE, function(){
  2. this.$draw = function() {
  3. this.oExt = this.$getExternal("main", null, function(oExt) {
  4.  
  5. });
  6. };
  7. }).implement(jpf.Presentation);

We are getting a container from skin file, and we puting it to document body. Please check source (for example in firebug). You should have there an empty DIV element with class=”calc”.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , Hide

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

Spreadsheet component is depreciated since Ajax.org Platform 3.0.

Open Your skin file and add this in spreadsheet skin:

  1. .spreadsheet .records div.empty {
  2. /* Here goes CSS code */
  3. }

If You don’t see results, go to presentation section and check what class name have this element:

  1. <j:empty caption=".">
  2. <div class="empty"> </div>
  3. </j:empty>

If You still don’t see any changes, clear cache in Your browser.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , , Hide

I assume that user have installed Zend Framework and downloaded Javeline Platform.

First we need to define Datagrid:

  1. <j:datagrid
  2. id = "DG"
  3. options = "sort|size"
  4. top = "150"
  5. left = "10"
  6. right = "10"
  7. height = "150"
  8. model = "mdlDG"
  9. >
  10. <j:bindings>
  11. <j:column caption="Username" select="@username" width="50%"></j:column>
  12. <j:column caption="Email" select="@email" width="50%"></j:column>
  13. <j:traverse select="user" />
  14. </j:bindings>
  15. <j:model id="mdlDG" >
  16. <data>
  17. </data>
  18. </j:model>
  19. </j:datagrid>

If we want set some default rows, we can do this between data tags.

  1. <data>
  2. <user username="Somebody" email="someone@gmail.com"></user>
  3. </data>

Next, we need to define button, which will be used to refreshing datagrid.

  1. <j:button left="10" top="320" width="70" tooltip="Refresh datagrid" onclick="refresh()">Refresh</j:button>

When user clicked this button, refresh() function will be called.

  1. function refresh() {
  2. socket.getUsers();
  3. }

To communicating with server we’ll use Javeline Teleport:

  1. <j:teleport>
  2. <j:rpc id="socket" protocol="cgi">
  3. <j:method
  4. name = "getUsers"
  5. url = "users/index/"
  6. receive = "afterGetUsers">
  7. </j:method>
  8. </j:rpc>
  9. </j:teleport>

Here we have created one method called getUsers refers to backend (PHP script).

Zend Framework understand “users/index” as: controller -> users, action -> index, of course we can put there link to “normal” script, for example: /modules/users.php.

After all, afterGetUsers function will be called automaticaly. getUsers and afterGetUsers its a javascript functions.

afterGetUsers function will be used for reloading datagrid with new content

  1. function afterGetUsers(data, state, extra) {
  2. if (state == jpf.SUCCESS) {
  3. DG.getModel().load(data);
  4. }
  5. }

Creating backend

Backend will be realy simple. We need to create one controller

application/controllers/UsersController.php

  1. <?php
  2. class UsersController extends Zend_Controller_Action {
  3. public $_model;
  4.  
  5. public function indexAction() {
  6. $resp = $this->getResponse();
  7.  
  8. $resp->setHeader('Content-Type', 'text/xml');
  9.  
  10. $model = $this->_getModel();
  11. $this->view->users = $model->getUsers();
  12.  
  13. $resp->setHttpResponseCode(200);
  14. }
  15.  
  16. protected function _getModel() {
  17. if (null === $this->_model) {
  18. require_once dirname(__FILE__).'/../models/Users.php';
  19. $this->_model = new Model_Users();
  20. }
  21. return $this->_model;
  22. }
  23. }

where we receive data from database agency model which have implemented function to get it.

Model (application/models/Users.php):

  1. class Model_Users {
  2. protected $_table;
  3.  
  4. public function getTable() {
  5. if (null === $this->_table) {
  6. require_once dirname(__FILE__) . '/DbTable/Users.php';
  7. $this->_table = new Model_DbTable_Users;
  8. }
  9. return $this->_table;
  10. }
  11.  
  12. public function getUsers() {
  13. $table = $this->getTable();
  14. $select = $table->getUsers();
  15.  
  16. return $table->fetchAll($select)->toArray();
  17. }
  18. }

Database table (application/models/DbTable/Users.php):

  1. class Model_DbTable_Users extends Zend_Db_Table_Abstract {
  2.  
  3. protected $_name = 'oda_user';
  4.  
  5. public function getUsers() {
  6. return parent::select();
  7. }
  8. }

If You want read more about it, please look at: Zend Framework Quick Start - Create a Model and Database Table

In next step we need to create view file, which parse our data to XML.

View (application/views/users/index.phtml):

  1. $data = $this->users;
  2. $len = count($data);
  3.  
  4. $result = '<?xml version="1.0" encoding="UTF-8" ?>'."\n";
  5. $result .= '<data>'."\n";
  6. if ($len > 0) {
  7. for($i = 0; $i < $len; $i++) {
  8. $result .= '<user username="'.$data[$i]["username"].'" email="'.$data[$i]["email"].'"></user>'."\n";
  9. }
  10. }
  11. else {
  12. //load empty row - You can leave this else
  13. $result .= '<user />'."\n";
  14. }
  15. echo $result .= '</data>';

If You have problems with getting new data, press F9 button to open JPF Debugger (remember, You need to have included jpf_debug.js not jpf_release.js) and check request and received data.

Example - Requested and recived data

GL & HF with JPF.

P.S. If You don’t know what GL & HF means… check GL & HF meaning

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , , Hide

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

Spreadsheet component is depreciated since Ajax.org Platform 3.0.

This is very simple operation. Please open Your skin.xml file and find Spreadsheet skin.

Under:

  1. .spreadsheet .records div {
  2. }

add this:

  1. .spreadsheet .records div.selected {
  2. //css code for selected row when spreadsheet is not focused
  3. }
  4. .spreadsheetFocus .records div.selected {
  5. //css code for selected row when spreadsheet is focused
  6. }

That’s all.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , , , , Hide

Mar/09

25

Drag & Drop in few lines of code

Implementing possiblity of moving elements on website seems to be hard for person with little experience with Javascript. Only thought is “i need to use some library”, it’s realy good idea… ? when we want add only one feature ? Probably not… I’ll show You 30 lines of code which does it.

Try this code

Please open Your favourite text editor or other tool which You are using to write Your code and type:

Primary content of HTML file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Drag &amp; Drop</title>
  6. </head>
  7. <body>
  8.  
  9. </body>
  10. </html>

Between of BODY tags add DIV element (with its drag indicator) which will be moved.

  1. <div>
  2. <div class="drag_indicator"></div>
  3. </div>

In next order we are connecting style sheet and javascript file:

  1. <link href="style.css" rel="stylesheet" type="text/css" />
  2. <script type="text/javascript" src="dragdrop.js"></script>

Body of .css file:

  1. div.drag_indicator {
  2. width : 100px;
  3. height : 20px;
  4. background-color : yellow;
  5. }
  6.  
  7. #block1 {
  8. width : 100px;
  9. height : 100px;
  10. background-color : red;
  11. position : absolute;
  12. }

In this way we defined red block of 100×100 pixels dimension with absolute position relative to browser window and yellow block of 100×20 pixels dimension.

In file with .js extension we are writing code which catch 3 actions in document object:

  • onmousedown - when user press mouse button
  • onmousemove - when user move mouse cursor
  • onmouseup - when user release mouse button

Please look, mouse movement will be supported only when mouse button is pressed, that’s why onmousemove event is captured in onmousedown event.

  1. document.onmousedown = function(e) {
  2. e = (e || event);
  3.  
  4. document.onmousemove = function(e) {
  5. e = (e || event);
  6. }
  7. };
  8.  
  9. document.onmouseup = function(e) {
  10. };

Code which supports events in Internet Explorer browser

  1. e = (e || event);

When mouse button is pressed “onmousedown” event is activated. In first order we catch clicked object:

  1. var target = e.target || e.srcElement;

If it is a HTML element, we break a code because this is highest embed element.

  1. if (target.tagName == 'HTML')
  2. return;

In next step, we are looking for “drag_indicator” class in clicked element. If it haven’t, we are checking its parent nodes as long as we’ll found it or we came to the top of elements tree.

  1. while (target != document.body && (target.className || "").indexOf("drag_indicator") == -1) {
  2. target = target.parentNode || target.parentElement;
  3. }

If correct element haven’t been found, we break a script

  1. if ((target.className || "").indexOf("drag_indicator") == -1)
  2. return;

When correct element has been clicked (div with block_indicator css class) script will go further. Because we wants to move entire block, not only a indicator we needs to find out its object. block_indicator is a child of block, so we needs to get it as follow:

  1. target = target.parentNode;

In nexts lines we credit cursor position at the moment of click to sx and sy variables. In dx and dy we’ll keeping alteration (default is 0) and in l and t current position of block element.

  1. var sx = e.clientX, sy = e.clientY,
  2. dx = 0, dy = 0,
  3. l = target.offsetLeft,
  4. t = target.offsetTop;

In Firefox browser we encount a inconvenience of moving block. We can solve this problem using that condition:

  1. if (e.preventDefault) {
  2. e.preventDefault();
  3. }

In this moment we have all initial values. Now time has come for implementing dragging.

When block is moving, this function is called

  1. document.onmousemove = function(e) {
  2. }

To change a block position we need to read mouse cursor current position (e.clientX, e.clientY) and subtract it from initial values simultaneously saving it to dx i dy.

  1. dx = e.clientX - sx;
  2. dy = e.clientY - sy;

Finaly, we need to set current position (last position + alteration) to block element.

  1. target.style.left = (l + dx) + "px";
  2. target.style.top = (t + dy) + "px";

When mouse button will be release, following code will be ran:

  1. document.onmouseup = function(e) {
  2. document.onmousemove = null;
  3. };

In this way, we created cross-browser compatible code that is smaller than 1kB.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , Hide

Dec/08

18

Notifier (Growl) Component

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

We know it good from Windows or OS X. This is a cloud which allows notifying user about some actions or conditions.

Example of Growl which will be displayed when user choose Christmas Eve date.

  1. <j:notifier position="bottom-right" margin="10 10">
  2. <j:event
  3. when="{txtDrop.value == '2008-12-24'}"
  4. message="Marry christmas !"
  5. icon="Reindeer.png"
  6. onclick="alert('something')">
  7. </j:event>
  8. </j:notifier>

Result:
Example ilustration

In order to avoid any doubts, i’ll show Caldropdown component, from which this date is collected:

  1. <j:caldropdown
  2. id="txtDrop"
  3. output-format="yyyy-mm-dd">
  4. </j:caldropdown>

Please remember about closing all tags, because Safari browser mind this.

In order to change growl’s skin, it’s enough to set skin attribute. Prepared are three:

  • Notifer (default)
  • Smoke
  • Bubble
  1. <j:notifier
  2. skin="bubble">
  3. <j:event></j:event>
  4. </j:notifier>

“Default” means that, we musn’t set skin attribute for choosing it.

For all events which its defined in this component we can set too:

  • position - vertical and horizontal element’s start position, it can be changed in any time, default is “top-right”
      Możliwe wartości:

    • top-right or right-top - element is placed in top-right corner of browser window
    • top-left or left-top - element is placed in top-left corner of browser window
    • bottom-right or right-bottom - element is placed in bottom-right corner of browser window
    • bottom-left or left-bottom - element is placed in bottom-left corner of browser window
    • center-center - element is placed in the middle of browser window
  • margin - it’s a free space around popup element, default is 10px
  • columnsize - specify element width and cols width where element will be displayed, default is 300 px
  • arrange - popup elements can be displayed in rows or columns, default is “vertical”
    • vertical - element will be displayed in rows
    • horizontal - element will be displayed in columns
  • timeout - after the timeout has passed the popup will dissapear automatically, when the mouse hovers over the popup it doesn’t dissapear, default is 2 seconds

Example:

  1. <j:notifier
  2. position="top-right"
  3. margin="20"
  4. timeout="1"
  5. arrange="horizontal"
  6. columnsize="200">
  7. <j:event></j:event>
  8. </j:notifier>

For more details, please check documentation on www.ajax.org.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , Hide

Dec/08

15

Slideshow Component

This article was written for Javeline Platform library. Examples contained therein are not fully compatible with the library Ajax.org Platform, which is the continuation of. Visit www.ajax.org for more details.

It’s a component designated for browsing various types of images. We are loading images using model in very easy way:

  1. <j:model id="mdlImages" save-original="true" >
  2. <slideshow>
  3. <picture
  4. src="stuff/pic13.jpg"
  5. thumb="stuff/pic13_small.jpg"
  6. title="Landscape">
  7. </picture>
  8. ...
  9. </slideshow>
  10. </j:model>

set path to image file, its thumbnail and discription. If we are loading images from database (that’s enough loaded PHP file as model, which will be generating an XML code) and we are not sure whether all images, its thumbnails or discriptions exists, we can set default values:

  1. <j:slideshow
  2. defaultimage="stuff/default_image.jpg"
  3. defaultthumb="stuff/default_thumb.jpg"
  4. defaulttitle="Some discription">
  5. </j:slideshow>

If dimension of image is bigger than allowed size, it will be limited to maximal allowed size.

Using mouse we can move it in any direction to see rest of image. That overrun is signalized to user with “four arrows” icon in the left bottom corner of viewport.

Under viewport we will find three buttons. Two extreme buttons allows us changing images to next and previous. Centered button runs slideshow mode, that is automatic image swiching with some delay. Interval could be set in delay parameter.

  1. <j:slideshow delay="5"></j:slideshow>

which is expressed in seconds (default is 5 seconds). When this mode is active, extreme buttons its hided and Play button is changed to Stop button, which allows disabling this mode. During image is loading, “Loading…” is displaying, which could be set in loadmsg parameter.

  1. <j:slideshow loadmsg="Loading..."></j:slideshow>

In the bottom of browser window discription and thumbnails bars are placed.

Discription bar shows two informations. Image position on list and its discription. Of course We could choose what we want to display using title attribute:

  1. <j:slideshow title="number+text"></j:slideshow>

Possible values:

  • number - description contains only slide number on a list
  • text - description contains only text
  • number+text - description contains slide number on a list and text

Thumbnails bar serve to browsing entire content without necessity of opening each picture. Using arrows placed on begining and on end we could scroll entire content.

Parameter thumbheight define thumbnails bar height.

  1. <j:slideshow thumbheight="60"></j:slideshow>

Default is 50px. Dimensions less than 40px will need intervention into graphics, because some elements will be to big for displaying.

It’s possible to make choice with mousewheel, which is scrolling thumbnails bar and automaticly choose selected image and with left-right arrows from keyboard.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Reddit
  • Twitter
  • Wykop
  • Yahoo! Bookmarks

, , , Hide

Theme Design by devolux.org