start using new placeholders on login page
This commit is contained in:
parent
849db2f34b
commit
81ae0c644c
4 changed files with 24 additions and 16 deletions
|
|
@ -1,4 +1,4 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# Copyright (c) 2010-2012, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
|
|
@ -27,12 +27,12 @@
|
|||
|
||||
%p
|
||||
= f.label :username , t('username')
|
||||
= f.text_field :username, :tabindex => 1, :value => prefilled_username
|
||||
= f.text_field :username, :tabindex => 1, :value => prefilled_username, :placeholder => t('username')
|
||||
%br
|
||||
|
||||
%p
|
||||
= f.label :password , t('password')
|
||||
= f.password_field :password, :tabindex => 2
|
||||
= f.password_field :password, :tabindex => 2, :placeholder => t('password')
|
||||
|
||||
- if display_password_reset_link?
|
||||
= link_to t('devise.shared.links.forgot_your_password'), new_password_path(resource_name), :id => "forgot_password_link", :tabindex => 5
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ javascripts:
|
|||
- public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js
|
||||
- public/javascripts/vendor/jquery.charcount.js
|
||||
- public/javascripts/vendor/jquery.expander.js
|
||||
- public/javascripts/vendor/jquery.placeholder.js
|
||||
- public/javascripts/vendor/timeago.js
|
||||
- public/javascripts/vendor/facebox.js
|
||||
- public/javascripts/jquery.infinitescroll-custom.js
|
||||
- public/javascripts/jquery.autocomplete-custom.js
|
||||
- public/javascripts/jquery.infieldlabel-custom.js
|
||||
- public/javascripts/keycodes.js
|
||||
- public/javascripts/fileuploader-custom.js
|
||||
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ var View = {
|
|||
/* Buttons */
|
||||
$("input:submit").addClass("button");
|
||||
|
||||
/* In field labels */
|
||||
$("label").inFieldLabels();
|
||||
$(document).bind('afterReveal.facebox', function() {
|
||||
jQuery("#facebox label").inFieldLabels();
|
||||
});
|
||||
/* label placeholders */
|
||||
$("input, textarea").placeholder();
|
||||
if( jQuery.fn.placeholder.input ) {
|
||||
$("input[placeholder], textarea[placeholder]").siblings("label").hide();
|
||||
}
|
||||
|
||||
/* "Toggling" the search input */
|
||||
$(this.search.selector)
|
||||
|
|
|
|||
|
|
@ -886,14 +886,22 @@ form p.checkbox_select
|
|||
:top 6px
|
||||
|
||||
label:not(.bootstrapped)
|
||||
:font
|
||||
:weight normal
|
||||
:display none
|
||||
:font-weight normal
|
||||
|
||||
@mixin placeholder_styles
|
||||
:color #999
|
||||
:position absolute
|
||||
:top 3px
|
||||
:left 0.48em
|
||||
:text
|
||||
:shadow 0 1px 1px #eee
|
||||
:text-shadow 0 1px 1px #eeeeee
|
||||
|
||||
.placeholder
|
||||
@include placeholder_styles
|
||||
|
||||
/* those can't be combined, see: http://stackoverflow.com/questions/2610497 */
|
||||
*::-webkit-input-placeholder
|
||||
@include placeholder_styles
|
||||
|
||||
*:-moz-placeholder
|
||||
@include placeholder_styles
|
||||
|
||||
#file-upload
|
||||
input
|
||||
|
|
|
|||
Loading…
Reference in a new issue