Details
-
Type:
Improvement
-
Status: Done/Fixed
-
Priority:
Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.0, 2.1.2
-
Fix Version/s: 2.2
-
Labels:None
-
Documentation Required?:None
Description
Clean up the Search form, and associated controller so that params and don't get out of sync and proximity fields can properly be handled in the URL, and the isProximitySearch function doesn't run in N^N
I refactored the search controller/service to use javascript's variable reference rather than creating new objects each time a search is run.
Proximity search params are now properly encoded and decoded so they can be passed in via url, and once changed the url is properly set.
Refactored the isProximitySearch code into a flag, evaluator and watcher so that it only runs when the params change.
PR: https://github.com/civicrm/org.civicrm.volunteer/pull/394