Bugzilla – Attachment 167262 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: [Alternative] Save popup size to cookies and use that instead
Bug-35134-Alternative-Save-popup-size-to-cookies-a.patch (text/plain), 1.89 KB, created by
David Nind
on 2024-05-30 05:15:12 UTC
(
hide
)
Description:
Bug 35134: [Alternative] Save popup size to cookies and use that instead
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-05-30 05:15:12 UTC
Size:
1.89 KB
patch
obsolete
>From 67d274f502aa2d4d83b631987acc96a59f9ffe12 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 23 Apr 2024 12:11:59 +0000 >Subject: [PATCH] Bug 35134: [Alternative] Save popup size to cookies and use > that instead > >Follow the original test-plan, open the pop-up and resize to whatever size. >Close the pop-up, open again, notice it opens to the same size it was previously closed. > >Signed-off-by: David Nind <david@davidnind.com> >--- > cataloguing/value_builder/cn_browser.pl | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/cataloguing/value_builder/cn_browser.pl b/cataloguing/value_builder/cn_browser.pl >index 881103c8f8..364f32a922 100755 >--- a/cataloguing/value_builder/cn_browser.pl >+++ b/cataloguing/value_builder/cn_browser.pl >@@ -38,7 +38,18 @@ function Click$function_name(ev) { > 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=\"+window_width+\"\,height=\"+window_height+\"\,toolbar=false,scrollbars=yes\"); >+ >+ if(Cookies.get(\"popup_window_height\") && Cookies.get(\"popup_window_width\")){ >+ window_width = Cookies.get(\"popup_window_width\"); >+ window_height = Cookies.get(\"popup_window_height\"); >+ } >+ >+ var windowref = 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\"); >+ >+ windowref.onresize = function(){ >+ Cookies.set(\"popup_window_height\", windowref.innerHeight, { path: '/', sameSite: 'Lax' }); >+ Cookies.set(\"popup_window_width\", windowref.innerWidth, { path: '/', sameSite: 'Lax' }); >+ } > } > > </script> >-- >2.39.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
|
167261
| 167262