The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
<!-- default styling for this widget -->
<link rel="stylesheet" type="text/css"
href="http://github.com/amrishk/yui3-gallery/raw/master/build/gallery-heat-bar-rater/assets/heat-bar-rater-core.css" />
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.07.28-20-07'
}).use('gallery-heat-bar-rater', function(Y) {
/*
* Create a new instance of heat bar rater from #myRatingParam1
* Widget would be initialized to 'selected' value i.e 5
* Widget will have its 'default' colors and rating legends
*/
var myHeatBarRater1 = new Y.HeatBarRater({
srcNode: '#myRatingParam1'
});
/*
* render the widget
*/
myHeatBarRater1.render();
/*
* get current rating value
*/
Y.log('Current rating myHeatBarRater1: ' + myHeatBarRater1.get('rating')); // 5
/*
* Create a new instance of heat bar rater from #myRatingParam2
* Widget would be initialized to 'selected' value i.e 0
* Give widget its 'custom' colors and rating legends
*/
var myHeatBarRater2 = new Y.HeatBarRater({
srcNode: '#myRatingParam2'
, valueMap: {
1: {color: '0e0', legend: 'Awful'}
, 5: {color: '0c0', legend: 'Poor'}
, 15: {color: '0a0', legend: 'Average'}
, 50: {color: '080', legend: 'Good'}
, 500: {color: '060', legend: 'Excellent'}
}
});
myHeatBarRater2.render();
/*
* listen to ratingChange events
*/
myHeatBarRater1.after('ratingChange', function(e) {
Y.log('myHeatBarRater1 rating value: ' + e.newVal);
});
/*
* listen to ratingChange events through YUI instance
*/
Y.after('heatbarrater:ratingChange', function(e) {
Y.log('ratingChange subscribed to YUI instance: ' + e.newVal);
});
});
/home/y/libexec/ant/bin/ant all Buildfile: build.xml [echo] Starting Build For gallery-heat-bar-rater [echo] Ant Properties [echo] Home : /home/y/libexec/ant [echo] Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008 [echo] Build File : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build.xml [echo] Local Build Properties [echo] version : 3 [echo] srcdir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery [echo] builddir : ../../../builder/componentbuild [echo] component : gallery-heat-bar-rater [echo] component.basefilename : gallery-heat-bar-rater [echo] component.basedir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater [echo] component.builddir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp [echo] Global Build Properties [echo] global.build.base : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build [echo] global.build.component : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater [echo] global.build.component.assets : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/assets clean: init: [mkdir] Created dir: /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp -concatdebug: [echo] Concatenating [echo] Source Files : heat-bar-rater.js [echo] In Source Dir : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/js [echo] To : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-debug.js [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/ant [delete] Deleting directory /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/ant -registerdebug: [echo] Wrapping /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-debug.js in YUI.add module [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp -prependdebug: -appenddebug: builddebug: -createcore: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp -loggerregex: [echo] Replacing Logger Statements in /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater.js buildcore: -rollupjs: -concatskins: -buildskins: -rollupcss: buildskins: -buildlangs: -rolluplangs: buildlangs: build: minify: [echo] Running yuicompressor on /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater.js [java] [java] [WARNING] Found an undeclared symbol: YUI [java] ---> YUI <--- .add("gallery-heat-bar-rater",function(Y){ lint: [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-debug.js [java] - OK [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-min.js [java] - OK [java] Running JSLint on : /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater.js [java] - OK local: deploybuild: [copy] Copying 3 files to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-min.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/gallery-heat-bar-rater-min.js [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/gallery-heat-bar-rater.js [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/build_tmp/gallery-heat-bar-rater-debug.js to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/gallery-heat-bar-rater-debug.js deployassets: [copy] Copying 1 file to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/assets [copy] Copying /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/src/gallery-heat-bar-rater/assets/heat-bar-rater-core.css to /home/y/var/builds/workspace/gallery/build_tmp/src/yui3-gallery/build/gallery-heat-bar-rater/assets/heat-bar-rater-core.css deployskins: deploylang: deploydocs: deploy: all: BUILD SUCCESSFUL Total time: 3 seconds
All code on this site is licensed under the BSD License unless stated otherwise.