Bugzilla – Attachment 27993 Details for
Bug 11559
Professional cataloger's interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11559 followup - Allow insertion of dollar sign, remove fixFloat
Bug-11559-followup---Allow-insertion-of-dollar-sig.patch (text/plain), 3.97 KB, created by
Jesse Weaver
on 2014-05-06 17:53:01 UTC
(
hide
)
Description:
Bug 11559 followup - Allow insertion of dollar sign, remove fixFloat
Filename:
MIME Type:
Creator:
Jesse Weaver
Created:
2014-05-06 17:53:01 UTC
Size:
3.97 KB
patch
obsolete
>From 7e46de0a647c68b8b43bbabbdad3878bfe229f6a Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <pianohacker@gmail.com> >Date: Tue, 6 May 2014 11:50:19 -0600 >Subject: [PATCH] Bug 11559 followup - Allow insertion of dollar sign, remove > fixFloat > >The dollar sign now shows up as {dollar} inside subfield contents. This >is converted on load and save. > >Also, remove fixFloat, as it has moved and is no longer needed anyway. >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js | 17 +++++++++++++---- > .../intranet-tmpl/prog/en/modules/cataloguing/editor.tt | 1 - > 2 files changed, 13 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js >index 5c76c62..f522f2c 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js >@@ -1,4 +1,13 @@ > define( [ 'marc-record' ], function( MARC ) { >+ // Convert any characters for display >+ function _sanitize( text ) { >+ return text.replace( '$', '{dollar}' ); >+ } >+ >+ // Undo conversion >+ function _desanitize( text ) { >+ return text.replace( '{dollar}', '$' ); >+ } > return { > RecordToText: function( record ) { > var lines = []; >@@ -8,7 +17,7 @@ define( [ 'marc-record' ], function( MARC ) { > var field = fields[i]; > > if ( field.isControlField() ) { >- lines.push( field.tagnumber() + ' ' + field.subfield( '@' ) ); >+ lines.push( field.tagnumber() + ' ' + _sanitize( field.subfield( '@' ) ) ); > } else { > var result = [ field.tagnumber() + ' ' ]; > >@@ -16,7 +25,7 @@ define( [ 'marc-record' ], function( MARC ) { > result.push( field.indicator(1) == ' ' ? '_' : field.indicator(1), ' ' ); > > $.each( field.subfields(), function( i, subfield ) { >- result.push( '$' + subfield[0] + ' ' + subfield[1] ); >+ result.push( '$' + subfield[0] + ' ' + _sanitize( subfield[1] ) ); > } ); > > lines.push( result.join('') ); >@@ -40,7 +49,7 @@ define( [ 'marc-record' ], function( MARC ) { > tagNumber = tagNumber[1]; > > if ( tagNumber < '010' ) { >- var field = new MARC.Field( tagNumber, ' ', ' ', [ [ '@', line.substring( 4 ) ] ] ); >+ var field = new MARC.Field( tagNumber, ' ', ' ', [ [ '@', _desanitize( line.substring( 4 ) ) ] ] ); > field.sourceLine = i; > record.addField( field ); > } else { >@@ -64,7 +73,7 @@ define( [ 'marc-record' ], function( MARC ) { > $.each( subfields, function( i, subfield ) { > var next = subfields[ i + 1 ]; > >- field.addSubfield( [ subfield.code, line.substring( subfield.ch + 3, next ? next.ch : line.length ) ] ); >+ field.addSubfield( [ subfield.code, _desanitize( line.substring( subfield.ch + 3, next ? next.ch : line.length ) ) ] ); > } ); > > field.sourceLine = i; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >index 6d61381..17ef1b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt >@@ -1,7 +1,6 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cataloging › Editor</title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script> > <link type="text/css" rel="stylesheet" href="[% themelang %]/css/cateditor.css" /> > <link type="text/css" rel="stylesheet" href="/intranet-tmpl/lib/codemirror/codemirror.css" /> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/humanmsg.css" /> >-- >1.9.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11559
:
26069
|
26070
|
26071
|
26104
|
26653
|
26654
|
27140
|
27141
|
27142
|
27757
|
27758
|
27759
|
27760
|
27761
|
27900
|
27901
|
27902
|
27993
|
27995
|
34458
|
34459
|
34460
|
34461
|
34462
|
34463
|
36243
|
36244
|
36245
|
36246
|
36247
|
36248
|
36455
|
38533
|
38534
|
38535
|
38536
|
38537
|
38538
|
38539
|
40153
|
40154
|
40155
|
40543
|
40555
|
40556
|
40557
|
40558
|
40811
|
40812
|
40813
|
40814
|
40815
|
41425
|
41453
|
41476
|
42373
|
43261
|
43547
|
43614
|
43615
|
43616
|
43617
|
43618
|
43619
|
43620
|
43621
|
43622
|
43623
|
43703
|
43704
|
43705
|
43706
|
43707
|
43708
|
43709
|
43710
|
43711
|
43712
|
43713
|
43772
|
43790
|
43883
|
43969
|
44016
|
44018
|
44022
|
44023
|
44024
|
44025
|
44026
|
44027
|
44028
|
44029
|
44030
|
44031
|
44032
|
44033
|
44034
|
44035
|
44036