[open-ils-commits] r12224 - in branches/staff-client-experiment/Open-ILS/xul/staff_client/server: locale/en-US patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 18 17:03:57 EST 2009
Author: phasefx
Date: 2009-02-18 17:03:52 -0500 (Wed, 18 Feb 2009)
New Revision: 12224
Modified:
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary.js
branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
Log:
re-arranging the horizantal patron display. Making DOB more easily hidable. Some I18N. The xul persist mechanism doesn't appear to work with madeup attributes; probably need an org unit setting for that behavior
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-02-18 21:25:48 UTC (rev 12223)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-02-18 22:03:52 UTC (rev 12224)
@@ -273,6 +273,10 @@
staff.patron.usr_buckets.merge_records.fancy_prompt.alert=Merge Aborted
staff.patron.usr_buckets.merge_records.success=Records were successfully merged.
staff.patron.usr_buckets.merge_records.catch.std_unex_error=Records were not likely merged.
+# The < and > highlight that the value is hidden from immediate display; translate Hidden and change the delimiters as needed
+staff.patron.field.hidden=<Hidden>
+# The < and > highlight that the value is not set; translate Unset and change the delimiters as needed
+staff.patron.field.unset=<Unset>
web.staff.patron.ue.session_no_defined=User session is not defined
web.staff.patron.ue.uedit_show_search.search_would_be=Search would be:\n%1$s
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary.js
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary.js 2009-02-18 21:25:48 UTC (rev 12223)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary.js 2009-02-18 22:03:52 UTC (rev 12224)
@@ -365,7 +365,7 @@
patronStrings.getString('staff.patron.summary.expires_on') + ' ' + (
obj.patron.expire_date() ?
obj.patron.expire_date().substr(0,10) :
- '<Unset>'
+ patronStrings.getString('staff.patron.field.unset')
)
);
};
@@ -375,11 +375,30 @@
['render'],
function(e) {
return function() {
- e.setAttribute('value',
+ var hide_value = e.getAttribute('hide_value');
+ e.setAttribute( hide_value == 'true' ? 'hidden_value' : 'value',
obj.patron.dob() ?
obj.patron.dob().substr(0,10) :
- '<Unset>'
+ patronStrings.getString('staff.patron.field.unset')
);
+ e.setAttribute( hide_value == 'false' ? 'hidden_value' : 'value',
+ patronStrings.getString('staff.patron.field.hidden')
+ );
+ var x = document.getElementById('PatronSummaryContact_date_of_birth_label');
+ if (x) {
+ var click_to_hide_dob = x.getAttribute('click_to_hide_dob');
+ if (click_to_hide_dob == 'true') {
+ x.onclick = function() {
+ hide_value = e.getAttribute('hide_value');
+ e.setAttribute('hide_value', hide_value == 'true' ? 'false' : 'true');
+ var value = e.getAttribute('value');
+ var hidden_value = e.getAttribute('hidden_value');
+ e.setAttribute('value',hidden_value);
+ e.setAttribute('hidden_value',value);
+ alert('foo');
+ }
+ }
+ }
};
}
],
Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul 2009-02-18 21:25:48 UTC (rev 12223)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/server/patron/summary_overlay_horiz.xul 2009-02-18 22:03:52 UTC (rev 12224)
@@ -16,7 +16,11 @@
<hbox id="patron_info_sidebar">
<image id="patron_photo_url" />
<vbox id="pisbvb2a" persist="width" flex="1">
- <label id="patron_name" hidden="true" class="patronNameLarge"/>
+ <label id="patron_name" />
+ <hbox>
+ <label id="PatronSummaryContact_date_of_birth_label" click_to_hide_dob="true" class="text_left dob label click_link" value="&staff.patron_display.date_of_birth.label;"/>
+ <label id="patron_date_of_birth" class="dob value" hide_value="true" persist="hide_value"/><!-- FIXME: persist doesn't work for this -->
+ </hbox>
<grid flex="1" style="border: solid thin">
<columns>
<column/>
@@ -151,11 +155,6 @@
<label id="patron_ident_value_2" class="ident ident_value ident2 value"/>
</vbox>
</row>
- <row id="pdsgr3">
- <label id="PatronSummaryContact_date_of_birth_label" class="text_left dob label"
- value="&staff.patron_display.date_of_birth.label;"/>
- <label id="patron_date_of_birth" class="dob value"/>
- </row>
<row id="pdsgr4"><label id="pdsgr4l" value=" "/></row>
</rows>
</grid>
More information about the open-ils-commits
mailing list