Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/html/lib/layout/list/source/AlphaJumpList.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/lib/layout/list/source/AlphaJumpList.js')
-rw-r--r--html/lib/layout/list/source/AlphaJumpList.js37
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