Fixed missing js for login layout.

This commit is contained in:
benni 2011-05-11 15:24:34 +02:00
parent 2a72263bd3
commit 2eb714b603
2 changed files with 9 additions and 11 deletions

View File

@ -4,7 +4,7 @@
%meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"} %meta{"http-equiv" => "content-type", :content => "text/html;charset=UTF-8"}
%title= "FoodSoft - " + (yield(:title) or controller.controller_name) %title= "FoodSoft - " + (yield(:title) or controller.controller_name)
= stylesheet_link_tag 'main', 'rails_messages', 'nav', :cache => "all_cached" = stylesheet_link_tag 'main', 'rails_messages', 'nav', :cache => "all_cached"
= javascript_include_tag 'prototype', 'effects', 'controls', 'application', 'ordering', :cache => "all_cached" = javascript_include_tag 'jquery.min'
= yield(:head) = yield(:head)
%body %body
#login #login

View File

@ -1,20 +1,18 @@
- content_for :head do - content_for :head do
:javascript :javascript
document.observe("dom:loaded", function() { $(function() {
// initially hide javascript warn message, when javascript is available $('#nick').focus();
$('javascript-warn').hide(); $('login-form').show();
$('login_user').focus();
}); });
- title "FoodSoft login" - title "FoodSoft login"
#javascript-warn.error(style="font-size:1.5em") %noscript
%b Achtung, Cookies und Javascript müssen aktiviert sein! #javascript-warn.error(style="font-size:1.5em")
= link_to "NoScript", "http://noscript.net/" Achtung, Cookies und Javascript müssen aktiviert sein!
bitte abschalten. = link_to "NoScript", "http://noscript.net/"
bitte abschalten.
#login-form.edit_form(style="width:25em;display:none") #login-form.edit_form(style="width:25em")
= form_tag sessions_path do = form_tag sessions_path do
%p %p
%label{:for => 'user'} Benutzerin %label{:for => 'user'} Benutzerin