Bugzilla – Attachment 97548 Details for
Bug 24452
Add visual cue for whitespace in the advanced editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24452: Advanced editor - show multiple spaces visually
Bug-24452-Advanced-editor---show-multiple-spaces-v.patch (text/plain), 2.65 KB, created by
ByWater Sandboxes
on 2020-01-17 17:12:39 UTC
(
hide
)
Description:
Bug 24452: Advanced editor - show multiple spaces visually
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-01-17 17:12:39 UTC
Size:
2.65 KB
patch
obsolete
>From 3736c92adea4b58d3c2d68bbf0fef173bc705e5e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Jan 2020 15:00:31 +0000 >Subject: [PATCH] Bug 24452: Advanced editor - show multiple spaces visually > >This patch updates the JavaScript and CSS for the advanced MARC editor >so that multiple consecutive spaces within a line will be detected and >highlighted. > >To test the EnableAdvancedCatalogingEditor system preference should be >enabled. Apply the patch and clear your browser cache if necessary. > > - Go to Cataloging -> Advanced editor. > - On any text entry line (e.g. 245), enter some words with one, two, > and more spaces in between them. When there are two or more spaces > between words the spaces between the words should have a dotted red > underline. > - Remove the extra spaces and confirm that the dotted line disappears. > >Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> >--- > koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js | 4 ++++ > koha-tmpl/intranet-tmpl/prog/css/cateditor.css | 4 ++++ > 2 files changed, 8 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js >index 511a2bad84..8b67815980 100644 >--- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js >+++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js >@@ -130,6 +130,8 @@ CodeMirror.defineMode( 'marc', function( config, modeConfig ) { > // matching. > if ( stream.match( /[ \t]+$/ ) ) { > return 'end-space'; >+ } else if ( stream.match( /\s{2,}/ ) ) { >+ return 'double-space'; > } else if ( stream.match( /[^ \tâ¡]+/ ) || stream.match( /[ \t]+/ ) ) { > return; > } >@@ -156,6 +158,8 @@ CodeMirror.defineMode( 'marc', function( config, modeConfig ) { > // Match space at end of line > if ( stream.match( /[ \t]+$/ ) ) { > return 'end-space'; >+ } else if ( stream.match( /\s{2,}/ ) ) { >+ return 'double-space'; > } else { > stream.match( /[ \t]+/ ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/css/cateditor.css b/koha-tmpl/intranet-tmpl/prog/css/cateditor.css >index 277a1b1aa6..ba7de2e5b2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/cateditor.css >+++ b/koha-tmpl/intranet-tmpl/prog/css/cateditor.css >@@ -106,6 +106,10 @@ body { > background-color: #DDDDBB; > } > >+.cm-double-space { >+ border-bottom: 2px dotted #CC3333; >+} >+ > #editor .modified-line-gutter { > width: 10px; > } >-- >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 24452
:
97531
|
97548
|
97692