01org/appframework — pull request #459 by krisrak (2013-11-13 22:38:55+00:00)
Title: Updated pullToRefresh style and added defaults

Issue
-
addPullToRefresh() had a fixed black background and text color, this did not match will all UI themes.
addPullToRefresh() requires users to manually set the text of *_pulldown DIV by adding refresh-* event handlers
scrollerMoveCSS in hideRefresh() code had a non existing callback param

Test Case
-
open the index.html kitchensink app and go to plugins -> af.scroller demo:
notice that the pull to refresh pulldown DIV has fixed color on all themes.
In the code if you remove all event handlers there is no default text for pulldown DIV at different refresh events.
refresh_finish event is never fired because of non existing callback param called "complete"

Fix
-
`af.scroller.js:`
1. changed HIDE_REFRESH_TIME to 325 to make it smoother.
2. changed css style of *_pulldown DIV to be compatible with all themes, by removing fixed background and text color.
3. added default strings for _pulldown DIV at refresh-* event triggers, it will say "Pull to Refresh", "Release to Refresh" and "Refreshing..." for events = "refresh-cancel/finish", "refresh-trigger" and "refresh-release" respectively. This will make sure there is a default string if the user does not manually set by adding pullToRefresh event handlers.
4. fixed a bug where scrollerMoveCSS in hideRefresh() had a callback param called "complete" which did not exist in the definition, removed it and added trigger at the end of hideRefresh().

`index.html:`
1. removed setting pulldown text in event handler, so that it gets values from defaults
2. updated style for infinite scroll