From 816de0918c28461cc2d1e3457348fd5b6e11950f Mon Sep 17 00:00:00 2001 From: Lionel LASKE Date: Tue, 18 Sep 2012 19:16:20 +0000 Subject: Initial version --- (limited to 'html/lib/onyx/source/ProgressButton.js') diff --git a/html/lib/onyx/source/ProgressButton.js b/html/lib/onyx/source/ProgressButton.js new file mode 100644 index 0000000..05779e0 --- /dev/null +++ b/html/lib/onyx/source/ProgressButton.js @@ -0,0 +1,28 @@ +/** + A progress bar that can have controls inside of it and has a cancel button on the right. + + {kind: "onyx.ProgressButton"}, + {kind: "onyx.ProgressButton", barClasses: "onyx-light", progress: 20, components: [ + {content: "0"}, + {content: "100", style: "float: right;"} + ]} + +*/ +enyo.kind({ + name: "onyx.ProgressButton", + kind: "onyx.ProgressBar", + classes: "onyx-progress-button", + events: { + onCancel: "" + }, + components: [ + {name: "progressAnimator", kind: "Animator", onStep: "progressAnimatorStep", onEnd: "progressAnimatorComplete"}, + {name: "bar", classes: "onyx-progress-bar-bar onyx-progress-button-bar"}, + {name: "client", classes: "onyx-progress-button-client"}, + {kind: "onyx.Icon", src: "$lib/onyx/images/progress-button-cancel.png", classes: "onyx-progress-button-icon", ontap: "cancelTap"} + ], + //* @protected + cancelTap: function() { + this.doCancel(); + } +}); -- cgit v0.9.1