Needs review
Project:
Money field
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2011 at 06:03 UTC
Updated:
17 Oct 2012 at 02:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
Bevan commentedComment #2
Bevan commentedHere is an initial stab at this.
It implements the jQuery part of it. The javascript expects
Drupal.settings.moneyInheritCurrencyto be an object where the property names are the parent-field's names and their values are arrays of child-field's names. This example module-implementation would go in a form_alter function or similar for a node-form;Comment #3
Bevan commentedAdds a trigger('change') so that other jQuery can respond to changes to currency
elements.
Comment #4
Bevan commentedRefactors to be comply with jslint and only trigger events if a value was set.
Comment #5
Bevan commentedOn review, it's a bad idea to initialize everything on page load.