Summary: | Make CodeMirror content searchable | ||
---|---|---|---|
Product: | Koha | Reporter: | George Williams (NEKLS) <george> |
Component: | System Administration | Assignee: | Bugs List <koha-bugs> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | 1joynelson, barbara.johnson, gmcharlt, hayleypelham, jonathan.druart, lucas |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.05.00, 19.11.03, 19.05.08
|
|
Circulation function: | |||
Bug Depends on: | 21582 | ||
Bug Blocks: | |||
Attachments: |
Bug 24025: Make CodeMirror content searchable
Bug 24025: Make CodeMirror content searchable Bug 24025: Make CodeMirror content searchable |
Description
George Williams (NEKLS)
2019-11-12 17:36:02 UTC
It seems to work on their demo, without additional addon: https://codemirror.net/demo/complete.html Maybe we need to upgrade (no idea how big it could be) to the newest version, but I do not see something in the changelog. (In reply to George Williams (NEKLS) from comment #0) > you can only search for > content in the two UserJS system preferences if the content is displayed on > the screen. I don't see how this is connected to the addition of CodeMirror. It has always been the case that you can't search the page for text which is hidden. Owen, If you're in 18.05 and you go to preferences.pl?tab=opac and hit the "Click to edit" link for OPACUserJS and then search for a word that appears in the textarea for #pref_OPACUserJS using the browser's built in "Find in this page..." feature, Firefox will search all of #pref_OPACUserJS - even if the text you're searching for is not visible on the page. When you hit "Click to edit" you get about 16 lines of OPACUserJS on the screen, but if you've got 500 lines in OPACUserJS and the text your searching for is on line 300, "Find in this page..." will scroll you down to line 300. If you're in 19.05 and follow these same steps, when you "Click to edit" you're no longer opening the textarea for #pref_OPACUserJS. The Code Mirror input area is a div styled as .CodeMirror.cm-s-default.CodeMirror-wrap and when you hit "Click to edit" you will get about 18 lines of OPACUserJS and only those 18 lines are searchable using "Find in this page...". Code Mirror has two searh addons (search.js and searchcursor.js) that could be added that would allow users to put the cursor in the Code Mirror div, type CTRL-F and search through all lines in the Code Mirror div. I think those addons would be a good addition to Koha. George (In reply to George Williams (NEKLS) from comment #3) > when you hit "Click to edit" you will get about 18 lines of OPACUserJS and > only those 18 lines are searchable using "Find in this page...". Thanks for the clarification! Created attachment 97747 [details] [review] Bug 24025: Make CodeMirror content searchable TEST PLAN: 1. Have a system pref like OPACUserJS will plenty of content. 2. Search for some with CTRL + F that is below the scroll 3. It is not findable. 4. Apply patch, restart_all, and clear your browser cache. 5. Reload the sys pref and try again, you should be able to search through everything. 6. Rejoice! Created attachment 97748 [details] [review] Bug 24025: Make CodeMirror content searchable Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> I tested this patch with OPACUserJS, OPACUserCSS, IntranetUserJS, IntranetUserCSS and RestrictedPageContent. It worked for all of them. Created attachment 97755 [details] [review] Bug 24025: Make CodeMirror content searchable Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice work everyone! Pushed to master for 20.05 Pushed to 19.11.x branch for 19.11.03 backported to 19.05.x for 19.05.08 Enhancement will not be backported to 18.11.x series. |