view · edit · sidebar · attach · print · history

20130729-update-authentication-form-of-davaz-com

<< | Index | >>


Summary

  • Update login-form position for davaz.com
  • Create autolgin with login token for davaz.com
    • It does not save Password

Commits / Patches

Index / Status


Update login form for davaz.com

% grep -r login-form doc/resources 
doc/resources/css/davaz.css:div#login-form-div {
doc/resources/css/davaz.css:div#login-form {
doc/resources/javascript/davaz.js:                      var form = dojo.byId('login-form');
doc/resources/javascript/davaz.js:                              div.id = 'login-form';
doc/resources/javascript/davaz.js:      var form = dojo.byId('login-form');
doc/resources/javascript/widget/templates/HtmlLoginWidget.html: id='login-form' style='position: absolute;' >
doc/resources/javascript/widget/templates/HtmlLoginWidget.css:div#login-form {
doc/resources/javascript/widget/LoginWidget.js: 

position is before of </body>

function toggleLoginWidget(loginLink, url) {
  var newDiv = document.createElement("div"); 
  dojo.body().appendChild(newDiv);
  var login = new ywesee.widget.LoginWidget({ loginLink: loginLink,
      loginFormUrl: url, oldOnclick: loginLink.onclick }, newDiv);
  loginLink.onclick = "return false;";
  login.startup();
}

Updated login-form as always fixed to bottom.

commit

Create remember_me option for login form

@4000000051f600ad0a7986b4 error in SBSM::Session#process: /en/admin
@4000000051f600ad0a799a3c NoMethodError
@4000000051f600ad0a79adc4 undefined method `login_email' for #<Yus::EntitySession:0x7f99fa244870>
@4000000051f600ad0a79bd64 /var/www/davaz.yasuhiro.ch/src/util/session.rb:52:in `login'
@4000000051f600ad0a79d0ec /var/www/davaz.yasuhiro.ch/src/state/admin/login.rb:15:in `login'
@4000000051f600ad0a79e474 /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/state.rb:203:in `send'
@4000000051f600ad0a79f414 /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/state.rb:203:in `_trigger'
@4000000051f600ad0a7a655c /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/state.rb:192:in `trigger'

Created remember_me option (It does not save any password into cookie.)

This needs:

  • autologin
  • login_token
  • user.valid?
  • remember cookie field
  • remember_me option

Update login-form

  • Added remember_me checkbox
  • Update style for input fields. (It was too small)
commit

Fix illegal encondig error

Following Error caused in my VM. (not production)

@4000000051f610cd04657b0c error in SBSM::Session#to_html: /en/personal/ajax_images/
@4000000051f610cd0465927c JSON::GeneratorError
@4000000051f610cd0465a604 source sequence is illegal/malformed utf-8
@4000000051f610cd0465b98c /var/www/davaz.yasuhiro.ch/src/view/ajax_response.rb:12:in `to_json'
@4000000051f610cd0465cd14 /var/www/davaz.yasuhiro.ch/src/view/ajax_response.rb:12:in `to_html'
@4000000051f610cd0465e09c /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/state.rb:181:in `to_html'
@4000000051f610cd0465f424 /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/session.rb:447:in `to_html'
@4000000051f610cd0466944c /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/session.rb:173:in `drb_process'
@4000000051f610cd0466a7d4 /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `synchronize'
@4000000051f610cd0466bb5c /usr/local/lib/ruby/gems/1.8/gems/sbsm-1.2.3/lib/sbsm/session.rb:171:in `drb_process'

There is to_json_raw_object method in ruby 1.9.3 or 2.0.0.
But I cannot use these ruby in davaz.com.

And I debugged JSON Response.

There is not this error on production.


Check test suite

Port numbers are coflict in each example at runtime.
All selenium tests are fail with bind error.

% ruby -rrubygems test/suite.rb
...
...

28 tests, 0 assertions, 0 failures, 56 errors
view · edit · sidebar · attach · print · history
Page last modified on July 30, 2013, at 08:40 AM