Bugzilla – Attachment 93602 Details for
Bug 17179
Advanced editor: Add keyboard shortcuts to repeat (duplicate) a field, and cut text
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17179: (follow-up) Correct typos, add default select.
Bug-17179-follow-up-Correct-typos-add-default-sele.patch (text/plain), 2.92 KB, created by
Alex Sassmannshausen
on 2019-10-03 13:42:53 UTC
(
hide
)
Description:
Bug 17179: (follow-up) Correct typos, add default select.
Filename:
MIME Type:
Creator:
Alex Sassmannshausen
Created:
2019-10-03 13:42:53 UTC
Size:
2.92 KB
patch
obsolete
>From 46902359c819b8e914e73feb5b89a01961e35d81 Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Thu, 3 Oct 2019 15:36:26 +0200 >Subject: [PATCH] Bug 17179: (follow-up) Correct typos, add default select. > >Correct error whereby object curCursor was invoked as a function. > >Added action whereby the most recent entry in the clipboard is >selected after all copy and cut operations. >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >index d3528eae88..5e39a43b75 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js >@@ -163,6 +163,7 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > var curLine = cm.getLine( cm.getCursor().line ); > > $("#clipboard").prepend('<option>'+curLine+'</option>'); >+ $("#clipboard option:first-child").prop('selected', true); > > cm.execCommand('deleteLine'); > } >@@ -197,10 +198,11 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > if ( !field ) return; > > var curCursor = cm.getCursor(); >- var subfield = field.getSubfieldAt( curCursor().ch ); >+ var subfield = field.getSubfieldAt( curCursor.ch ); > var subfieldText= cm.getRange({line:curCursor.line,ch:subfield.start},{line:curCursor.line,ch:subfield.end}); > if ( subfield ) { > $("#clipboard").prepend('<option>'+subfieldText+'</option>'); >+ $("#clipboard option:first-child").prop('selected', true); > subfield.delete(); > } > } >@@ -210,6 +212,7 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > if ( cm.somethingSelected() ) return true; > var curLine = cm.getLine( cm.getCursor().line ); > $("#clipboard").prepend('<option>'+curLine+'</option>'); >+ $("#clipboard option:first-child").prop('selected', true); > } > > _editorKeys[copy_subfield] = function( cm ) { >@@ -218,10 +221,11 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], > if ( !field ) return; > > var curCursor = cm.getCursor(); >- var subfield = field.getSubfieldAt( curCursor().ch ); >+ var subfield = field.getSubfieldAt( curCursor.ch ); > var subfieldText= cm.getRange({line:curCursor.line,ch:subfield.start},{line:curCursor.line,ch:subfield.end}); > if ( subfield ) { > $("#clipboard").prepend('<option>'+subfieldText+'</option>'); >+ $("#clipboard option:first-child").prop('selected', true); > } > } > >-- >2.11.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 17179
:
65090
|
67817
|
68675
|
85396
|
86025
|
86041
|
92406
|
93601
|
93602
|
93676
|
93677
|
93857
|
93858
|
93861
|
93897
|
93898
|
93899