From 57c5322a2039988ca8b5356bcc2dcaa9dc3e7ace Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 23 Jun 2006 16:14:45 +0000 Subject: [PATCH] tweaks git-svn-id: svn://svn.open-ils.org/ILS/trunk@4742 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../staff_client/server/cat/copy_editor.js | 114 +++++++++--------- .../staff_client/server/cat/copy_editor.xul | 25 +++- 2 files changed, 80 insertions(+), 59 deletions(-) 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 c4c3d4d705..5e32698efb 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -67,15 +67,16 @@ function my_init() { document.getElementById('copy_notes').setAttribute('hidden','true'); g.apply("status",5 /* In Process */); } else { - g.panes_and_field_names.right_pane4.push( + g.panes_and_field_names.left_pane = [ - "Status", - { - render: 'fm.status().name();', - input: 'c = function(v){ g.apply("status",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( util.functional.map_list( g.data.list.ccs, function(obj) { return [ obj.name(), obj.id() ]; } ).sort() ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', - } - ] - ); + [ + "Status", + { + render: 'fm.status().name();', + input: 'c = function(v){ g.apply("status",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( util.functional.map_list( g.data.list.ccs, function(obj) { return [ obj.name(), obj.id() ]; } ).sort() ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + } + ] + ].concat(g.panes_and_field_names.left_pane); } if (g.copies.length != 1) { @@ -308,15 +309,15 @@ g.panes_and_field_names = { } ], [ - "Last Edit Date", + "Creator", { - render: 'util.date.formatted_date( fm.edit_date(), "%F");', + render: 'fm.creator();', } ], [ - "Creator", + "Last Edit Date", { - render: 'fm.creator();', + render: 'util.date.formatted_date( fm.edit_date(), "%F");', } ], [ @@ -330,26 +331,6 @@ g.panes_and_field_names = { 'right_pane' : [ - [ - "Call Number", - { - render: 'fm.call_number();', - } - ], - [ - "OPAC Visible?", - { - render: 'fm.opac_visible() == null ? "" : ( fm.opac_visible() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', - } - ], - [ - "Reference?", - { - render: 'fm.ref() == null ? "" : ( fm.ref() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', - } - ], [ "Shelving Location", { @@ -365,7 +346,12 @@ g.panes_and_field_names = { input: 'c = function(v){ g.apply("circ_lib",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( util.functional.map_list( util.functional.filter_list(g.data.list.my_aou, function(obj) { return g.data.hash.aout[ obj.ou_type() ].can_have_vols(); }), function(obj) { return [ obj.shortname(), obj.id() ]; }).sort() ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], - + [ + "Call Number", + { + render: 'fm.call_number();', + } + ], [ "Copy Number", { @@ -373,16 +359,17 @@ g.panes_and_field_names = { input: 'c = function(v){ g.apply("copy_number",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.addEventListener("change",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], + + ], 'right_pane2' : [ [ - "Loan Duration", - { - render: 'switch(fm.loan_duration()){ case 1: "Short"; break; case 2: "Normal"; break; case 3: "Long"; break; }', - input: 'c = function(v){ g.apply("loan_duration",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Short", "1" ], [ "Normal", "2" ], [ "Long", "3" ] ] ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', - + "Circulate?", + { + render: 'fm.circulate() == null ? "" : ( fm.circulate() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], [ @@ -392,13 +379,23 @@ g.panes_and_field_names = { 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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], + [ - "Circulate?", - { - render: 'fm.circulate() == null ? "" : ( fm.circulate() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + "Loan Duration", + { + render: 'switch(fm.loan_duration()){ case 1: "Short"; break; case 2: "Normal"; break; case 3: "Long"; break; }', + input: 'c = function(v){ g.apply("loan_duration",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Short", "1" ], [ "Normal", "2" ], [ "Long", "3" ] ] ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + + } + ], + [ + "Fine Level", + { + render: 'switch(fm.fine_level()){ case 1: "Low"; break; case 2: "Normal"; break; case 3: "High"; break; }', + input: 'c = function(v){ g.apply("fine_level",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Low", "1" ], [ "Normal", "2" ], [ "High", "3" ] ] ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], + [ "Circulate as Type", { @@ -416,14 +413,14 @@ g.panes_and_field_names = { ], 'right_pane3' : -[ - [ - "Fine Level", +[ [ + "Alert Message", { - render: 'switch(fm.fine_level()){ case 1: "Low"; break; case 2: "Normal"; break; case 3: "High"; break; }', - input: 'c = function(v){ g.apply("fine_level",v); if (typeof post_c == "function") post_c(v); }; x = util.widgets.make_menulist( [ [ "Low", "1" ], [ "Normal", "2" ], [ "High", "3" ] ] ); x.addEventListener("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + render: 'fm.alert_message();', + input: 'c = function(v){ g.apply("alert_message",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.addEventListener("change",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], + [ "Deposit?", { @@ -445,17 +442,25 @@ g.panes_and_field_names = { input: 'c = function(v){ g.apply("price",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.addEventListener("change",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], -], -'right_pane4' : -[ [ - "Alert Message", - { - render: 'fm.alert_message();', - input: 'c = function(v){ g.apply("alert_message",v); if (typeof post_c == "function") post_c(v); }; x = document.createElement("textbox"); x.addEventListener("change",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + "OPAC Visible?", + { + render: 'fm.opac_visible() == null ? "" : ( fm.opac_visible() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', + } + ], + [ + "Reference?", + { + render: 'fm.ref() == null ? "" : ( fm.ref() == 1 ? "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("command",function(f){ return function(ev) { f(ev.target.value); } }(c), false);', } ], +], + +'right_pane4' : +[ ] }; @@ -688,6 +693,7 @@ g.render_input = function(node,blob) { */ var x; var c; eval( input_cmd ); if (x) { + util.widgets.remove_children(vbox); util.widgets.remove_children(hbox2); hbox2.appendChild(x); setTimeout( function() { x.focus(); }, 0 ); diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul index ff18cdd136..15d4a07d6e 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul @@ -42,15 +42,30 @@ - + + -- 2.43.2