Bug 9755 added a refactoring of records merge adding the include merge-record.inc. This include contains a block "mergejs" containing all JavaScript code that was in merge.tt. I propose to export this code into a js file. These are some reasons : a js file is cached by browser and development is better because editors uses the JavaScript syntax coloring.
Created attachment 19962 [details] [review] Bug 10650 - export merge-record.inc javascript into a file See commit message
Created attachment 20914 [details] [review] [SIGNED-OFF] Bug 10650 - export merge-record.inc javascript into a file Bug 9755 added a refactoring of records merge adding the include merge-record.inc. This include contains a block "mergejs" containing all JavaScript code that was in merge.tt. This patch exports this code into a js file. Translatable strings contained in this file are in merge-record-strings.inc. Test plan : - Put two records is a list - Go to this list and check the two records - Click on "Merge selected" - Click on next - Go to second source record - Click on a repeatable field => The field is added to destination record - Click on a subfield of a field existing in destination record => The subfield is added to destination record - Click on a non repeatable field existing in destination record => You get an alert and field is not added - Click on a subfield of a field not existing in destination record => You get an alert and subfield is not added - Click on Merge => Records are merged Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 20975 [details] [review] [PASSED QA] Bug 10650 - export merge-record.inc javascript into a file Bug 9755 added a refactoring of records merge adding the include merge-record.inc. This include contains a block "mergejs" containing all JavaScript code that was in merge.tt. This patch exports this code into a js file. Translatable strings contained in this file are in merge-record-strings.inc. Test plan : - Put two records is a list - Go to this list and check the two records - Click on "Merge selected" - Click on next - Go to second source record - Click on a repeatable field => The field is added to destination record - Click on a subfield of a field existing in destination record => The subfield is added to destination record - Click on a non repeatable field existing in destination record => You get an alert and field is not added - Click on a subfield of a field not existing in destination record => You get an alert and subfield is not added - Click on Merge => Records are merged Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and test plan, no regressions found.
Pushed to master. Thanks, Fridolyn!