From: Art Rhyno Date: Fri, 10 Aug 2012 02:27:51 +0000 (-0400) Subject: First cut at increasing font size for catalogue in staff client X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fartunit%2Fxul_client_zoom;p=contrib%2FConifer.git 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 --- 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 @@