×
Namespaces

Variants
Actions
Revision as of 10:30, 31 July 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LightBox

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: User:Kbwiki (09 Nov 2009)
Last edited: hamishwillee (31 Jul 2012)

Contents

Inheritance

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

1 - Description

The generic Note is a customisable panel popup. This component should be used as a confirmation note or an information note. The generic Note component must be considered as a container to HTML, more specifically text or image content with a size restriction.


2 - Visual Design

Lightbox01.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.
  • animation: boolean
    • Defines whether showing and hiding the component has animation effects.
  • autoOpen: boolean
    • Defines whether the component is displayed after creation.
  • height: int
    • Defines the component height.
  • width: int
    • Defines the component width.
  • buttonCose: boolean
    • Defines the component to be be created in info mode, with only a Close button in the top-right corner of the component.
  • applyRoundedCorners: boolean
    • Defines rounded corners in the lightbox container.

4.2 - Events - Callbacks

  • create: function()
    • Scope: [this.element]
  • destroy: function()
    • Scope: [this.element]
  • hide: function()
    • Scope: [this.element]
  • show: function()
    • Scope: [this.element]


4.3 - Methods

  • destroy: function()
    • Destroys the component.
    • return [void]
  • close: function()
    • Closes the component.
    • return [void]
  • open: function()
    • Opens the component.
    • return [void]


4.4 - Default options

  • autoOpen: false
  • overflow: true
  • height: 28
  • width: 28
  • applyRoundedCorners: true

5 - Component Demo

5.1 HTML

<div id="lightbox01" class="ui-widget-header ui-state-default">
     <h1>Lightbox Example</h1>
     <p>Lorem <strong>ipsum dolor</strong> sit amet. </p>
</div>

5.2 Javascript

window.dialog1 = new Nokia.LightBox({
     element: '#lightbox01',
     height: '80%',
     width: '80%',
     buttons: {
          "Yes": function() {
               alert('yes');
          },
          "No": function() {
               this.close();
          }
     },
     create: function() {
          //alert("Lightbox 01: Create.");
     },
     show: function() {
          //alert("Lightbox 01: Show.");
     }
});

6 - Nokia WRT Browser Compatibility

 

▴   S60 3.1 S60 3.2 S60 5.0
LightBox NO YES  YES 

 

This page was last modified on 31 July 2012, at 10:30.
101 page views in the last 30 days.
×