From 500aa3a9a941f51b14f0e6f2a09e347f7d8cd48f Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 30 Nov 2009 16:31:21 +0000 Subject: [PATCH] "Floating" field for copies in copy editor and lists git-svn-id: svn://svn.open-ils.org/ILS/trunk@15043 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/copy_editor.js | 7 +++++++ Open-ILS/xul/staff_client/server/circ/util.js | 17 +++++++++++++++++ .../xul/staff_client/server/locale/en-US/cat.properties | 3 +++ .../staff_client/server/locale/en-US/circ.properties | 1 + 4 files changed, 28 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 9163d81bce..68fb2531d0 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -840,6 +840,13 @@ g.panes_and_field_names = { ], [ + $('catStrings').getString('staff.cat.copy_editor.field.floating.label'), + { + render: 'fm.floating() == null ? $("catStrings").getString("staff.cat.copy_editor.field.unset_or_null") : ( get_bool( fm.floating() ) ? $("catStrings").getString("staff.cat.copy_editor.field.floating.yes_or_true") : $("catStrings").getString("staff.cat.copy_editor.field.floating.no_or_false") )', + input: 'c = function(v){ g.apply("floating",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ $("catStrings").getString("staff.cat.copy_editor.field.floating.yes_or_true"), get_db_true() ], [ $("catStrings").getString("staff.cat.copy_editor.field.floating.no_or_false"), get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + } + ], + [ $('catStrings').getString('staff.cat.copy_editor.field.loan_duration.label'), { render: 'switch(Number(fm.loan_duration())){ case 1: $("catStrings").getString("staff.cat.copy_editor.field.loan_duration.short"); break; case 2: $("catStrings").getString("staff.cat.copy_editor.field.loan_duration.normal"); break; case 3: $("catStrings").getString("staff.cat.copy_editor.field.loan_duration.extended"); break; }', diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 667f91fbd9..da856ac012 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -743,6 +743,23 @@ circ.util.columns = function(modify,params) { 'persist' : 'hidden width ordinal' }, { + 'id' : 'floating', + 'fm_class' : 'acp', + 'label' : document.getElementById('circStrings').getString('staff.circ.utils.floating'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { + if (get_bool( my.acp.floating() )) { + return document.getElementById('circStrings').getString('staff.circ.utils.yes'); + } else { + return document.getElementById('circStrings').getString('staff.circ.utils.no'); + } + }, + 'persist' : 'hidden width ordinal' + }, + + { 'id' : 'opac_visible', 'fm_class' : 'acp', 'label' : document.getElementById('circStrings').getString('staff.circ.utils.opac_visible'), diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties index 143cc3ba62..1e5a96d15b 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties @@ -161,6 +161,9 @@ staff.cat.copy_editor.field.circulate.no_or_false=No staff.cat.copy_editor.field.holdable.label=Holdable? staff.cat.copy_editor.field.holdable.yes_or_true=Yes staff.cat.copy_editor.field.holdable.no_or_false=No +staff.cat.copy_editor.field.floating.label=Floating? +staff.cat.copy_editor.field.floating.yes_or_true=Yes +staff.cat.copy_editor.field.floating.no_or_false=No staff.cat.copy_editor.field.age_based_hold_protection.label=Age-based Hold Protection staff.cat.copy_editor.field.loan_duration.label=Loan Duration staff.cat.copy_editor.field.loan_duration.short=Short diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties index d78cd6ff75..b42964f7ef 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties @@ -231,6 +231,7 @@ staff.circ.utils.fine_level.high=High staff.circ.utils.circulate=Circulate? staff.circ.utils.deleted=Deleted? staff.circ.utils.holdable=Holdable? +staff.circ.utils.floating=Floating? staff.circ.utils.hold_note=Hold Note(s) staff.circ.utils.staff_hold=Staff Hold? staff.circ.utils.opac_visible=OPAC Visible? -- 2.11.0