<< 20160712-migrate-davaz-com-dojo-widgets | Index | 20160710-bundle-gems-and-watir-feature-test-davaz-com >>
Gemfile.hack
support.
Current progress is below. Today I would like to migrate SlideShow and LoginWidget etc.
I could let it work, again. (mostly)
But, in fadein/out animation, When prerious image dom is already gone, some exceptions are caused.
TypeError: node is null .cache["dojo/dom-style"]/</_3e4()dojo.js (line 15) .cache["dojo/dom-style"]/</_3ed<()dojo.js (line 15) getStyle()dojo.js (line 15) .cache["dojo/_base/fx"]/</dojo._fade/_53f.start<()dojo.js (line 15) .cache["dojo/_base/fx"]/</dojo.animateProperty/<()dojo.js (line 15) .cache["dojo/_base/lang"]/</_1d4/<()dojo.js (line 15) _3c0/</_3c6()dojo.js (line 15) .cache["dojo/_base/fx"]/</<._fire()dojo.js (line 15) .cache["dojo/_base/fx"]/</<.play()dojo.js (line 15) .backgroundImageLoaded/callback2()SlideShow.js (line 93) .backgroundImageLoaded()SlideShow.js (line 115) .showNextImage()SlideShow.js (line 133) .cache["dojo/_base/lang"]/</_1d4/<()dojo.js (line 15) ...,error:function(){_322.push(_2eb[url]={});}});}}}});_321&&_321.apply(null,_322);... dojo.js (line 15)
It seems that it is caused, because dom (background/foreground image) is disapper before fadein/out animation in some situation.
Then I've improved callback functions to check if its dom exists or not.
Commit:Make SlideShow widget to work
The data-dojo-attach-point
must be camelCase.
# If I change once to hyphenated name, then does not attach.
# valid <div data-dojo-attach-point="thisIsVarName"></div> # invalid <div data-dojo-attach-point="this-is-var-name"></div>
Before improvement of admin widgets, I've once refactored view, css and js files.
e.g. artobject_image_123
Commit:Refactored view, css, htmlattributes
I would like to use debuger or some development gems.
But some other developer might do not like these gems. (They might like another way).
Then I've a small developer support feature as Gemfile.hack
Each developer can write favorite gems into Gemfile.hack
(this file is ignored). Then bundle install reads this file.
Just put HACK=no
(or HACK=false) If you need to commit Gemfile.
% bundle install #=> loads Gemfile.hack file, if it exists % HACK=no bundle install #=> ignores Gemfile.hack file, even if it exists
See: https://github.com/grauwoelfchen/davaz.com/commit/dae20fb08243fc56cb14c562170cac077933f608
Tomorrow, admin widgets.