From 0edf0950a0f87936a01df0ee7ca77dad098182d7 Mon Sep 17 00:00:00 2001 From: Art Rhyno Date: Thu, 9 Aug 2012 22:27:51 -0400 Subject: [PATCH] First cut at increasing font size for catalogue in staff client My XUL skills are rusty and thin, so I took a simplistic approach to increasing font size. I have added two buttons, one that will use the 'font-adjust-size' property to increase the font, using a value of '1'. The other button resets the font to normal. I thought about using the XUL preferences as a way to create an increment but the preferences seem to be meant to be retained across sessions. I also suspect there's a browser directive that increases the size much more elegantly but I couldn't unearth it. Did I mention this was a first cut at this? Signed-off-by: Art Rhyno --- Open-ILS/web/opac/locale/en-US/lang.dtd | 2 ++ .../staff_client/chrome/content/util/browser.js | 26 +++++++++++++++++++++- .../staff_client/chrome/content/util/browser.xul | 8 +++++-- .../staff_client/chrome/content/util/rbrowser.xul | 18 +++++++++------ 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 4ad7f61a01..332bdc7a5e 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -58,6 +58,8 @@ + + diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.js b/Open-ILS/xul/staff_client/chrome/content/util/browser.js index fb0078ac22..dae2cd1fba 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.js @@ -133,6 +133,30 @@ util.browser.prototype = { } } ], + 'cmd_zoom_in' : [ + ['command'], + function() { + try { + var doc = obj.get_content().document; + doc.documentElement.style.setProperty('font-size-adjust','1.0','important'); + } catch(E) { + var err = 'cmd_zoom_in: ' + E; + obj.error.sdump('D_ERROR',err); + } + } + ], + 'cmd_zoom_out' : [ + ['command'], + function() { + try { + var doc = obj.get_content().document; + doc.documentElement.style.setProperty('font-size-adjust','0','important'); + } catch(E) { + var err = 'cmd_zoom_out: ' + E; + obj.error.sdump('D_ERROR',err); + } + } + ], 'cmd_find' : [ ['command'], function() { @@ -263,7 +287,7 @@ util.browser.prototype = { if (!obj.push_xulG) return; var cw = this.get_content(); cw.IAMXUL = true; - cw.XUL_BUILD_ID = '/xul/server/'.split(/\//)[2]; + cw.XUL_BUILD_ID = '/xul/server/server/'.split(/\//)[2]; cw.xulG = obj.passthru_content_params || {}; cw.xulG.fromBack = obj.from_back; if (!cw.xulG.set_tab) { cw.xulG.set_tab = function(a,b,c) { return window.xulG.set_tab(a,b,c); }; } diff --git a/Open-ILS/xul/staff_client/chrome/content/util/browser.xul b/Open-ILS/xul/staff_client/chrome/content/util/browser.xul index 4356f620c5..6295050d10 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/browser.xul +++ b/Open-ILS/xul/staff_client/chrome/content/util/browser.xul @@ -108,8 +108,10 @@ - + + + @@ -123,8 +125,10 @@