added dir attribute to html element; made tipsy gravity dependant on that

This commit is contained in:
MrZYX 2011-04-11 17:52:38 +02:00
parent 42523139c7
commit cf61bb756d
6 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
= javascript_include_tag "validation"
:javascript
$(function() {
$('#user_new [title]').tipsy({trigger: 'focus', gravity: 'w'});
$('#user_new [title]').tipsy({trigger: 'focus', gravity: ($('html').attr('dir') == 'rtl') ? 'e' : 'w'});
$("#user_username").focus();
});

View file

@ -1,6 +1,6 @@
:javascript
$(function() {
$('#new_user [title]').tipsy({trigger: 'focus', gravity: 'w'});
$('#new_user [title]').tipsy({trigger: 'focus', gravity: ($('html').attr('dir') == 'rtl') ? 'e' : 'w'});
$("#user_email").focus();
});

View file

@ -3,7 +3,7 @@
-# the COPYRIGHT file.
!!!
%html{:lang => I18n.locale.to_s}
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
%head
%meta{:charset => 'utf-8'}

View file

@ -3,7 +3,7 @@
-# the COPYRIGHT file.
!!!
%html{:lang => I18n.locale.to_s}
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
%head
%title
DIASPORA*

View file

@ -2,7 +2,7 @@
:javascript
$(function() {
$('#user_new [title]').tipsy({trigger: 'focus', gravity: 'w'});
$('#user_new [title]').tipsy({trigger: 'focus', gravity: ($('html').attr('dir') == 'rtl')? 'e' : 'w'});
$("#user_username").focus();
});

View file

@ -152,7 +152,7 @@ var View = {
addAspect: {
bind: function() {
$(".add_aspect_button", "#aspect_nav").tipsy({
gravity:"w"
gravity: ($('html').attr('dir') == 'rtl')? "e" : "w"
});
}
},