Dropdown
m (Protected "Dropdown" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
|||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
=Inheritance= | =Inheritance= | ||
| − | |||
<code>Nokia.Widget | <code>Nokia.Widget | ||
| − | + | |- Nokia.DropDown</code> | |
| − | |- Nokia.DropDown</code> | + | |
=1 - Description= | =1 - Description= | ||
| Line 25: | Line 23: | ||
<pre> | <pre> | ||
<!-- Themeroller CSS --> | <!-- Themeroller CSS --> | ||
| − | <link rel="stylesheet" href=" | + | <link rel="stylesheet" href="themes/themeroller/<theme>/Themeroller.css" type="text/css" media="screen"> |
| − | + | ||
| − | + | ||
<!-- Specific Theme/Resolution CSS --> | <!-- Specific Theme/Resolution CSS --> | ||
<link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen"> | <link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen"> | ||
| − | </pre> | + | </pre> |
==3.2 Javascript== | ==3.2 Javascript== | ||
| Line 36: | Line 32: | ||
<pre> | <pre> | ||
<!-- jQuery file --> | <!-- jQuery file --> | ||
| − | <script src="/lib/jquery/ | + | <script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script> |
| − | <!-- | + | <!-- Guarana file --> |
| − | <script src="/lib/ | + | <script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script> |
</pre> | </pre> | ||
Revision as of 17:53, 18 November 2009
Inheritance
Nokia.Widget
|- Nokia.DropDown
1 - Description
The Drop Down component behaves similarly to the Options Menu component.
2 - Visual Design
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.
- items[]: string
- Defines the list of component items.
- maximize: boolean
- Defines whether the component is created as maximised.
4.2 - Events - Callbacks
- create: function()
- Scope: [this.element]
4.3 - Methods
- showOptions: function()
- Shows the component options.
- return [void]
- hideOptions: function()
- Hides the component options.
- return [void]
- select: function(i, event)
- Selects specific item i in the component.
- return [void]
- getSelected: function()
- Returns the selected item in the component.
- return [Object]
4.4 - Default options
- maximize: false
5 - Component Demo
5.1 HTML
<div id="dropdown"></div>
5.2 Javascript
window.dropdown = new Nokia.DropDown({
element: '#dropdown',
items: [
{
label: "First option",
value: 'some value',
select: function(item, event) {
alert('Drop Down Clicked on: ' + item.label);
}
},
{
label: "Second option",
value: 'some value',
select: function(item, event) {
alert('Drop Down Clicked on: ' + item.label);
}
},
{
label: "Third option",
value: 'some value',
select: function(item, event) {
alert('Drop Down Clicked on: ' + item.label);
}
},
]
});
6 - Nokia WRT Browser Compatibility:
| ▴ | S60 3.1 | S60 3.2 | S60 5.0 |
| DropDown | NO | YES | YES |


