From a5bef8ee1003645bcf7377e95a89426939b424b8 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 27 May 2010 20:02:05 +0200 Subject: [PATCH] load change form inline using jQuery .load --- templates/changes/index.html.ep | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/changes/index.html.ep b/templates/changes/index.html.ep index 1909719..dafd11c 100644 --- a/templates/changes/index.html.ep +++ b/templates/changes/index.html.ep @@ -18,7 +18,7 @@ actiontimestamp % foreach my $change ( @$changes ) { -<%= $change->{action} %> +<%= $change->{action} %> <%= $change->{t} %> @@ -35,5 +35,13 @@ $(document).ready( function(){ $('tt.ts').each( function(){ $(this).text( date_pretty( new Date(this.textContent * 1000) ) ); }); + + $('a.view').live( 'click', function() { + console.debug(this + , this.href + ); + $(this).parent().load( this.href + ' form' ).css({ 'border': '3px dashed #f84' }); + return false; + }); }); -- 2.20.1