Skip to content

Instantly share code, notes, and snippets.

@machal
Created February 3, 2009 15:24
Show Gist options
  • Save machal/57568 to your computer and use it in GitHub Desktop.
Save machal/57568 to your computer and use it in GitHub Desktop.
<%= link_to_remote("Kalendář",
{:url => calendar_path, :method => 'get', :loading => 'Aplication.Calendar.loading()', :complete => 'Aplication.Calendar.loaded()'},
{:href => calendar_path, :class => 'calendar-link'})
%>
Calendar : {
show : function() {
$('body').addClassName('has-calendar')
$('body').addClassName('calendar')
$('calendar-shadow').hide()
Effect.Appear('calendar-shadow', {duration:0.3, to:0.8})
},
hide : function() {
$('body').removeClassName('has-calendar')
$('calendar').remove()
$('calendar-shadow').remove()
// Effect.Fade('calendar-overlay', {duration:0.4})
// try { $('calendar-overlay').remove.delay(0.5) } catch(e) {}
},
loading : function() {
$$('.calendar-link').addClassName('loading')
},
loaded : function() {
$$('.calendar-link').removeClassName('loading')
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment