Created
August 11, 2010 17:41
-
-
Save apipkin/519370 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YUI.add('gallery-slider-captcha', function(Y){ | |
Y.SliderCaptcha = Y.Base.create('slider-captcha', Y.Widget, [], { | |
// P U B L I C // | |
initializer : function() { | |
// publish release-success event | |
// publish release-failure event | |
}, | |
renderUI : function() { | |
// build message container | |
// build handle | |
// append to content box | |
}, | |
bindUI : function() { | |
// add dd to handle and constrain to content box | |
// add opacity change to text while dragging based on percentage to end. 100% - 10%? | |
// add animation to spring back on release if not at the edge of the container | |
// add release callback to fire success or failure event | |
}, | |
// S U G A R // | |
isHuman : function() { | |
return this.get('isHuman'); | |
}, | |
// P R O T E C T E D // | |
_defSuccessReleaseFn : function(e) { | |
// update text | |
// set isHuman to true | |
}, | |
_defFailureReleaseFn : function(e) { | |
// set isHuman to false | |
} | |
}, { | |
ATTRS : { | |
form : {}, | |
startText : {}, | |
successText : {}, | |
isHuman : { | |
value : false | |
}, | |
submitOnSuccess : { | |
value : true // should it default to submit? | |
} | |
} | |
}); | |
}, '0.1', {'widget','dd-constrain'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Only had about 30 minutes to work on this... will do more tonight, if you havn't already started... You can find my fork here: http://gist.github.com/519956