view · edit · sidebar · attach · print · history


<< 20160712-migrate-davaz-com-dojo-widgets | Index | 20160710-bundle-gems-and-watir-feature-test-davaz-com >>


  • Repaired SlideShow widegt, Login Form Widget.
  • Arranged assets (js/css) files, Remove unnecessary files.
  • Refactored id attributes (as downcase), css and js.
  • Removed unnecessary variables from Ruby view class.
  • Add Gemfile.hack support.

Commits / Patches / Pull Requests, Scripts


Dojo Widgets

Current progress is below. Today I would like to migrate SlideShow and LoginWidget etc.

  • [x] Desk.js
  • EditButtons.js
  • EditWidget.js
  • GuestbookWidget.js
  • Input.js
  • InputText.js
  • InputTextarea.js
  • LoginWidget.js
  • [x] OneLiner.js
  • [x] Rack.js
  • [x] Show.js
  • SlideShow.js
  • [x] Ticker.js
  • [x] Tooltip.js

SlideShow widget

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)


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>


Refactor view, css and js

Before improvement of admin widgets, I've once refactored view, css and js files.

  • Renamed all html id addtributes snakecase e.g. artobject_image_123
  • Removed TAB and whitespace at line end. (Arrange Ruby and Css)
  • Rename unnecessary prefix or var name
  • Remove unnucessary variables

Commit:Refactored view, css, htmlattributes

Add Gemfile.hack support

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


Login Form widget

Tomorrow, admin widgets.

view · edit · sidebar · attach · print · history
Page last modified on July 11, 2016, at 06:14 PM