~daker/ubuntu-html5-theme/fix.1232533

« back to all changes in this revision

Viewing changes to 0.1/ambiance/js/option-selector.js

  • Committer: daker
  • Date: 2013-12-03 00:16:01 UTC
  • Revision ID: adnane002@gmail.com-20131203001601-6m9q18io5ueosdoa
Added documentation from the SDK

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 * <http://www.gnu.org/licenses/>
21
21
 */
22
22
 
23
 
/* OptionSelector */
 
23
/**
 
24
 * OptionSelector is a component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a
 
25
    listing of all the possible values for selection with an additional option of always being expanded. If multiple choice is selected the list is expanded automatically.
 
26
 
 
27
 * @class OptionSelector
 
28
 * @constructor
 
29
 * @namespace UbuntuUI
 
30
 * @example
 
31
      <section data-role="option-selector" id="OptionSelectorID">
 
32
        <ul>
 
33
          <li data-value="0">
 
34
            <p>Label 1</p>
 
35
          </li>
 
36
          <li data-value="1">
 
37
            <p>Label 2</p>
 
38
          </li>
 
39
          <li data-value="3">
 
40
            <p>Label 3</p>
 
41
          </li>
 
42
        </ul>
 
43
      </section>
 
44
 
 
45
      JavaScript:
 
46
      UI.optionselector.METHOD();
 
47
*/
24
48
var OptionSelector = (function () {
25
49
 
26
50
    var __currentIndex = 0,
57
81
 
58
82
    OptionSelector.prototype = {
59
83
 
 
84
        /**
 
85
         * @private
 
86
         */
60
87
        __onClicked: function (elm, e) {
61
88
            values = "";
62
89
            __currentIndex = 0;