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. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
e303854076
commit
d50baeabac
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue