Namespaces
Variants
Actions
Revision as of 13:35, 30 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Customisable List

Jump to: navigation, search
Article Metadata

Article
Created: User:Kbwiki (09 Nov 2009)
Last edited: hamishwillee (30 Jul 2012)

Contents

Inheritance

Nokia.CustomizableList
| - Nokia.Widget
|- Nokia.Class (basic class)

1 - Description

The Customisable List component combines list behaviour with the following components: Button, Text, Link, and Images.


2 - Visual Design

Customizablelist01.png

3 - Component Dependencies

3.1 CSS

<!-- Themeroller CSS -->
<link rel="stylesheet" href="themes/themeroller/<theme>/Themeroller.css" type="text/css" media="screen">
<!-- Specific Theme/Resolution CSS -->
<link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen">


3.2 Javascript

<!-- jQuery file -->
<script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script>
<!-- Guarana file -->
<script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script>


4 - Functional Specifications/Requirements

4.1 - Options

  • element: 'selector'
    • jQuery selector or the DOM reference to become the container of the component.
  • visible: boolean
    • Defines the visible state of the component.


4.2 - Events - Callbacks

  • create: function()
    • Scope: [this.element]
  • addItem function(null, item)
    • Scope: [this.element]
  • removeItem: function(null, index)
    • Scope: [this.element]
  • show: function(event, openercustomizableList)
    • Scope: [this.element]
  • hide: function(event)
    • Scope: [this.element]


4.3 - Methods

  • addItem: function(item)
    • Adds a new element to the component.
    • return [void]
  • removeItem: function(item)
    • Removes an element from the component.
    • return [void]
  • show: function()
    • Shows the component.
    • return [void]
  • hide: function()
    • Hides the component.
    • return [void]


4.4- Default options

  • visible: false

 

5 - Component Demo

5.1 HTML

<div id="list"></div>
                
<div id="item1" class="ui-helper-clearfix">
     <img src="images/carousel02.jpg" id="textimage" />
          <p id="paragraph">Lorem ipsum dolor sit amet.</p>
          <br style="clear:both;" />
</div>


5.2 Javascript

window.list = new Nokia.CustomizableList({
     element: '#list',
     visible: true,
     create: function() {
          //alert("Customizable List: Create");
     },
     show: function(openerTransitionList) {
          //alert("Customizable List: Show", openerTransitionList);
     },
     hide: function() {
          //alert("Customizable List: Hide list1.");
     },
     addItem: function(event, item) {
          //alert("Customizable List: AddItem", item);
     },
     removeItem: function(event, item) {
          //alert("Customizable List: RemoveItem", item);
     }
});

list.addItem('#item1');

6 - Nokia WRT Browser Compatibility

 

▴   S60 3.1 S60 3.2 S60 5.0
Customisable List No YES  YES 

 

91 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved