Bugzilla – Attachment 159169 Details for
Bug 35134
cn_browser.pl pop-up size should be configurable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35134: Make cn_browser popup responsive to screen size
Bug-35134-Make-cnbrowser-popup-responsive-to-scree.patch (text/plain), 1.57 KB, created by
Lucas Gass
on 2023-11-21 15:28:28 UTC
(
hide
)
Description:
Bug 35134: Make cn_browser popup responsive to screen size
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2023-11-21 15:28:28 UTC
Size:
1.57 KB
patch
obsolete
>From 7dfa0731b4afdbb84a540940b7323fe426507a19 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 21 Nov 2023 15:26:13 +0000 >Subject: [PATCH] Bug 35134: Make cn_browser popup responsive to screen size > >To test: >1. Use the cn_browser.pl plugin for the 952$o ( call number ) >2. Add or edit an item and select the `...` to the right of the call number field. >3. The pop-up is hardcoded as 500px x 400px pop-up. >4. APPLY PATCH >5. Clear browser cache and try again. The window width should now be half of the current screen size. The window height should be 100% of the screen height. >--- > cataloguing/value_builder/cn_browser.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/value_builder/cn_browser.pl b/cataloguing/value_builder/cn_browser.pl >index 55128fc7bc3..881103c8f82 100755 >--- a/cataloguing/value_builder/cn_browser.pl >+++ b/cataloguing/value_builder/cn_browser.pl >@@ -35,8 +35,10 @@ my $builder = sub { > > function Click$function_name(ev) { > ev.preventDefault(); >+ let window_width = screen.width / 2; >+ let window_height = screen.height; > q = document.getElementById(ev.data.id); >- window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+encodeURIComponent(q.value),\"cnbrowser\",\"width=500,height=400,toolbar=false,scrollbars=yes\"); >+ window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+encodeURIComponent(q.value),\"cnbrowser\",\"width=\"+window_width+\"\,height=\"+window_height+\"\,toolbar=false,scrollbars=yes\"); > } > > </script> >-- >2.30.2
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 35134
:
159169
|
159171
|
165381