From edd9310779bc39b332b90f9db3892edc0543ea51 Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 19 Jul 2006 18:27:39 +0000 Subject: [PATCH] get_db_true() and get_db_false() git-svn-id: svn://svn.open-ils.org/ILS/trunk@5089 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul | 8 ++++++++ Open-ILS/xul/staff_client/server/cat/copy_editor.js | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul b/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul index 5af42e0faf..cc8cd06812 100644 --- a/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul +++ b/Open-ILS/xul/staff_client/server/OpenILS/util_overlay.xul @@ -41,6 +41,14 @@ if (a) return true; else return false; } + function get_db_true() { + return 't'; + } + + function get_db_false() { + return 'f'; + } + ]]> 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 e4dd639743..0919a4515c 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -503,14 +503,14 @@ g.panes_and_field_names = { "Circulate?", { render: 'fm.circulate() == null ? "" : ( get_bool( fm.circulate() ) ? "Yes" : "No" )', - input: 'c = function(v){ g.apply("circulate",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", "1" ], [ "No", "0" ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("circulate",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", get_db_true() ], [ "No", get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], [ "Holdable?", { render: 'fm.holdable() == null ? "" : ( get_bool( fm.holdable() ) ? "Yes" : "No" )', - input: 'c = function(v){ g.apply("holdable",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", "1" ], [ "No", "0" ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("holdable",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", get_db_true() ], [ "No", get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], [ @@ -566,7 +566,7 @@ g.panes_and_field_names = { "Deposit?", { render: 'fm.deposit() == null ? "" : ( get_bool( fm.deposit() ) ? "Yes" : "No" )', - input: 'c = function(v){ g.apply("deposit",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", "1" ], [ "No", "0" ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("deposit",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", get_db_true() ], [ "No", get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], [ @@ -588,14 +588,14 @@ g.panes_and_field_names = { "OPAC Visible?", { render: 'fm.opac_visible() == null ? "" : ( get_bool( fm.opac_visible() ) ? "Yes" : "No" )', - input: 'c = function(v){ g.apply("opac_visible",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", "1" ], [ "No", "0" ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("opac_visible",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", get_db_true() ], [ "No", get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], [ "Reference?", { render: 'fm.ref() == null ? "" : ( get_bool( fm.ref() ) ? "Yes" : "No" )', - input: 'c = function(v){ g.apply("ref",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", "1" ], [ "No", "0" ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + input: 'c = function(v){ g.apply("ref",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Yes", get_db_true() ], [ "No", get_db_false() ] ] ); x.addEventListener("apply",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], ], -- 2.11.0