From: phasefx Date: Thu, 17 Sep 2009 15:06:19 +0000 (+0000) Subject: Add ISBN and Circ Modifier options to Pre-Cat dialog. Circ Modifier value gets remem... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=165b235e1089f6ef4bf79a1a347548ed50829dde;p=contrib%2FConifer.git Add ISBN and Circ Modifier options to Pre-Cat dialog. Circ Modifier value gets remembered between pre-cat invocations for a given staff client session. General reworking of the dialog to better handle closure of the window on non-submits. TODO: Test against middle layer .checkout.full once it supports circ_modifier argument. We're broken until then. git-svn-id: svn://svn.open-ils.org/ILS/trunk@14034 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 24e6856b45..cbd66e3e93 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1907,8 +1907,14 @@ - - + + + + + + + + diff --git a/Open-ILS/xul/staff_client/server/circ/checkout.js b/Open-ILS/xul/staff_client/server/circ/checkout.js index 604dfb4712..fb962e4556 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkout.js +++ b/Open-ILS/xul/staff_client/server/circ/checkout.js @@ -658,11 +658,13 @@ circ.checkout.prototype = { obj.data.stash_retrieve(); params.permit_key = permit.payload; - params.dummy_title = obj.data.dummy_title; - params.dummy_author = obj.data.dummy_author; + params.dummy_title = obj.data.precat_dummy_title; + params.dummy_author = obj.data.precat_dummy_author; + params.dummy_isbn = obj.data.precat_dummy_isbn; + params.circ_modifier = obj.data.precat_circ_modifier; params.precat = 1; - if (params.dummy_title !== '') { + if (obj.data.precat_submit == 'go') { //obj._checkout( params ); No real request method here anymore obj.checkout( params ); } else { diff --git a/Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul b/Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul index ec32c395ff..8085b225cc 100644 --- a/Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul +++ b/Open-ILS/xul/staff_client/server/circ/pre_cat_fields.xul @@ -24,7 +24,6 @@ @@ -49,19 +48,44 @@ JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'}); + g.data.precat_dummy_title = ''; + g.data.precat_dummy_author = ''; + g.data.precat_dummy_isbn = ''; + g.data.precat_submit = 'cancel'; + g.data.stash('precat_submit'); + + JSAN.use('util.widgets'); JSAN.use('util.functional'); + var x = util.widgets.make_menulist( + [ [ $("catStrings").getString("staff.cat.copy_editor.field.unset_or_null"), "" ] ].concat( + util.functional.map_list( g.data.list.circ_modifier, function(obj) { return [ obj, obj ]; } ).sort() + ) + ); + x.setAttribute('id','dummy_circ_modifier'); + document.getElementById('placeholder').appendChild(x); + if (g.data.precat_circ_modifier) { + x.setAttribute('value', g.data.precat_circ_modifier); + x.value = g.data.precat_circ_modifier; + } document.getElementById('dummy_title').focus(); } function my_finish() { - /* FIXME -- need unique temp space name */ - /* FIXME -- We need to blank dummy_title on a forced window close */ - g.data.stash('dummy_title','dummy_author'); + g.data.precat_dummy_title = document.getElementById('dummy_title').value; + g.data.precat_dummy_author = document.getElementById('dummy_author').value; + g.data.precat_dummy_isbn = document.getElementById('dummy_isbn').value; + var cm = document.getElementById('dummy_circ_modifier').value; + if (cm == '') cm = null; + g.data.precat_circ_modifier = cm; + g.data.precat_submit = 'go'; + g.data.stash('precat_dummy_title','precat_dummy_author','precat_dummy_isbn','precat_circ_modifier','precat_submit'); + window.close(); } ]]> + @@ -69,19 +93,27 @@ - - + + + + -