Better display of result

xushi - January 21, 2008 - 13:43
Project:Currency Exchange
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I think we need a better way to display the result, than a drupal message. This way, it can be easier to customise, move around, and well, look better :)

#1

kbahey - January 21, 2008 - 15:44

You have a patch for that?

#2

xushi - January 22, 2008 - 19:59

No i don't.

#3

2222a - February 14, 2008 - 15:05

I second this request too. It needs to stand out. Sadly I have no clue on how to do it through

#4

chris.cohen - October 15, 2008 - 11:11

This is not exactly a patch, but rather the whole thing as a zip file. I'm sorry but I have no idea how to turn this into a patch. I'm hoping someone else will be able to do this.

This is a modified copy of 5.x-1.1, with a new sub-module called 'currency_toolbox'. It adds a new, blank form field to the currency form, and when the 'convert' button is clicked, an AJAX function is called and the conversion takes place, putting the converted amount into the empty form field, negating the need to reload the page at all.

There are a couple of issues with this approach, but my development time has run out on the site where this is used, so I presently cannot continue development.

  • The AJAX part resides in a separate module (mainly so that I can use a separate part of the repository). This could probably be put in the main currency module.
  • There is no visual indicator (like a throbber or something) between the user clicking 'convert' and the currency conversion being returned, so the user has no feedback in the case when it takes a long time to convert.
  • There is no check performed as to whether cURL is enabled. This will cause the conversion to fail silently instead of providing the user with feedback (especially important because most default installs of PHP have cURL disabled).
AttachmentSize
currency_ajax.zip 35.65 KB
 
 

Drupal is a registered trademark of Dries Buytaert.