From 105090013ed42b0e262ea747424e25a5005bdb4b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 19 Nov 2012 21:24:48 -0800 Subject: Create an edit page --- public/js/index.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'public') diff --git a/public/js/index.coffee b/public/js/index.coffee index a5821e90..d53a4e48 100644 --- a/public/js/index.coffee +++ b/public/js/index.coffee @@ -17,4 +17,13 @@ $(-> else $(this).css('color', 'red') ) + + if $('#login').val() != "" + $.getJSON('/' + $('#login').val() + '.json', (data) -> + $('#name').val(data.name) + $('#image').val(data.image) + $('#address').val(data.address) + $('#symbol option[value=' + data.symbol + ']').attr('selected', 'selected') + $('#commission').val(data.commission) + ) ) -- cgit v1.2.3