diff options
author | Lionel LASKE <llaske@c2s.fr> | 2012-08-25 20:23:36 (GMT) |
---|---|---|
committer | Lionel LASKE <llaske@c2s.fr> | 2012-08-25 20:23:36 (GMT) |
commit | ca3ad6305ec0655ad8475a12ac2228b61cdd9ba0 (patch) | |
tree | 7ef2b853640f99807fba7fd3f2a28bda81727297 /html/lib/layout/list/source/AlphaJumpList.js |
Init commit
Diffstat (limited to 'html/lib/layout/list/source/AlphaJumpList.js')
-rw-r--r-- | html/lib/layout/list/source/AlphaJumpList.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/html/lib/layout/list/source/AlphaJumpList.js b/html/lib/layout/list/source/AlphaJumpList.js new file mode 100644 index 0000000..6b6e326 --- /dev/null +++ b/html/lib/layout/list/source/AlphaJumpList.js @@ -0,0 +1,37 @@ +/** + A control that presents an alphabetic panel that you can select from, in + order to perform actions based on the item selected. + + {kind: "AlphaJumpList", onSetupItem: "setupItem", + onAlphaJump: "alphaJump", + components: [ + {name: "divider"}, + {kind: "onyx.Item"} + ] + } + +*/ +enyo.kind({ + name: "enyo.AlphaJumpList", + kind: "List", + //* @protected + scrollTools: [ + {name: "jumper", kind: "AlphaJumper"} + ], + initComponents: function() { + this.createChrome(this.scrollTools); + this.inherited(arguments); + }, + rendered: function() { + this.inherited(arguments); + this.centerJumper(); + }, + resizeHandler: function() { + this.inherited(arguments); + this.centerJumper(); + }, + centerJumper: function() { + var b = this.getBounds(), sb = this.$.jumper.getBounds(); + this.$.jumper.applyStyle("top", ((b.height - sb.height) / 2) + "px"); + } +});
\ No newline at end of file |