Bug 10650

Summary: export merge-record.inc javascript into a file
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: Architecture, internals, and plumbingAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: gmcharlt
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 9755    
Bug Blocks: 10648    
Attachments: Bug 10650 - export merge-record.inc javascript into a file
[SIGNED-OFF] Bug 10650 - export merge-record.inc javascript into a file
[PASSED QA] Bug 10650 - export merge-record.inc javascript into a file

Description Fridolin Somers 2013-07-26 13:53:55 UTC
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.
Comment 1 Fridolin Somers 2013-07-26 14:36:22 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-09-09 13:34:10 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2013-09-10 20:50:40 UTC
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.
Comment 4 Galen Charlton 2013-09-16 16:18:00 UTC
Pushed to master.  Thanks, Fridolyn!