From: phasefx Date: Sun, 12 Sep 2010 19:29:40 +0000 (+0000) Subject: Allows you to create *_custom.properties files for overlaying stock strings with... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dc6416af61c69cbe8eecdad7fb0281cacbcb6130;p=evergreen%2Fbjwebb.git Allows you to create *_custom.properties files for overlaying stock strings with . So for example, a recent commit changed how circ modifiers are displayed in the staff client, with common.properties: staff.circ_modifier.display=%1$s : %2$s : %3$s You could do this for the original rendering: common_custom.properties: staff.circ_modifier.display=%1$s The custom file need only contain the properties that you wish to change. The xul will attempt to parse both common.properties and common_custom.properties git-svn-id: svn://svn.open-ils.org/ILS/trunk@17617 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml b/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml index e3bc819d3..d17f839c1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml +++ b/Open-ILS/xul/staff_client/chrome/content/main/bindings.xml @@ -188,6 +188,17 @@ var msg = "messageCatalog: No text from " + this.src; alert(msg); throw(msg); } + + var custom_src = String(this.src).replace('.','_custom.'); + var x2 = new XMLHttpRequest(); + x2.open("GET",custom_src,false); + x2.send(null); + if (x2.responseText) { + var props = this._props2object(x2.responseText); + for (var i in props) { + this._props[i] = props[i]; + } + } } catch(E) { alert('Error loading properties in messagecatalog in bindings.xml: ' + E); throw(E);