[open-ils-commits] r16137 - in trunk: . Open-ILS/src/perlmods/OpenILS/Application/Circ Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher Open-ILS/web/opac/skin/default/js build/tools (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 5 16:24:00 EDT 2010
Author: miker
Date: 2010-04-05 16:23:54 -0400 (Mon, 05 Apr 2010)
New Revision: 16137
Modified:
trunk/
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
trunk/Open-ILS/web/opac/skin/default/js/holds.js
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
trunk/build/tools/update.sh
Log:
merging MR holds topic branch
Property changes on: trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2010-04-03 10:10:37.155999899 -0400
committer: Mike Rylander <miker at esilibrary.com>
properties:
branch-nick: test-trunk
rebase-of: miker at esilibrary.com-20100403141037-3c384nb5vsqci54s
+ timestamp: 2010-04-05 16:22:54.654999971 -0400
committer: Mike Rylander <miker at whirly>
properties:
branch-nick: ILS-trunk-master
Name: bzr:ancestry:v4
- phasefx at batrepo-20091014063314-vwbu74yuns94tzb4
jason at esilibrary.com-20091202233704-ej5adh761jjyc97k
jason at esilibrary.com-20091204160629-ilcxw9t02sqmo1qr
jason at esilibrary.com-20091208134806-0n0h8hf3gieuu5zz
jason at esilibrary.com-20091208155338-qatq3itbybh68tst
jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
jason at esilibrary.com-20091209143255-f95jqqpfprksx7x8
jason at esilibrary.com-20091209221402-nzzmam31s4hyctoz
jason at esilibrary.com-20100324193921-j28bezf2tfdopx3s
+ phasefx at batrepo-20091014063314-vwbu74yuns94tzb4
jason at esilibrary.com-20091202233704-ej5adh761jjyc97k
jason at esilibrary.com-20091204160629-ilcxw9t02sqmo1qr
jason at esilibrary.com-20091208134806-0n0h8hf3gieuu5zz
jason at esilibrary.com-20091208155338-qatq3itbybh68tst
jason at esilibrary.com-20091209133349-f98dfqy22fe4lt0m
jason at esilibrary.com-20091209143255-f95jqqpfprksx7x8
jason at esilibrary.com-20091209221402-nzzmam31s4hyctoz
jason at esilibrary.com-20100324193921-j28bezf2tfdopx3s
opensrf at fulfillment2.esilibrary.com-20100405202638-dy1gigwnnvvqzc1x
Name: bzr:file-ids
- Open-ILS/src/sql/Pg/950.data.seed-values.sql 8134 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fsrc%2Fsql%2FPg%2F950.data.seed-values.sql
+ Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 983 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fsrc%2Fperlmods%2FOpenILS%2FApplication%2FCirc%2FHolds.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 309 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fsrc%2Fperlmods%2FOpenILS%2FApplication%2FStorage%2FPublisher%2Fmetabib.pm
Open-ILS/web/opac/skin/default/js/holds.js 2092 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fweb%2Fopac%2Fskin%2Fdefault%2Fjs%2Fholds.js
Open-ILS/web/opac/skin/default/js/result_common.js 1680 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:Open-ILS%2Fweb%2Fopac%2Fskin%2Fdefault%2Fjs%2Fresult_common.js
build/tools/update.sh 15015 at dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk%2Fbuild%2Ftools%2Fupdate.sh
Name: bzr:revision-id:v4
- 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
12215 jason at esilibrary.com-20091209133642-bp8mb3tc5vpoc1ij
12220 jason at esilibrary.com-20091209143447-i1st1to8ln4hhwyb
12231 jason at esilibrary.com-20091209221438-vv4crqppm8ajj3dr
12804 jason at esilibrary.com-20100324194046-jza2ic2dlpq8txhc
12946 miker at esilibrary.com-20100402183612-8xznj35wfohk7zyu
12955 miker at esilibrary.com-20100403141037-h8d57ryrmkkg9yhb
+ 11741 phasefx at batrepo-20091014063041-ama3i5s87ziqohxo
11742 phasefx at batrepo-20091014063644-pn3a6urkw3uxgr6n
12108 phasefx at batrepo-20091120084700-lavt73oserscgalf
12166 jason at esilibrary.com-20091202233906-g8kh2kh3qmmz66r1
12184 jason at esilibrary.com-20091204161020-0dqezh01c05btffh
12198 jason at esilibrary.com-20091208140008-eofwdbn2u8dxk2kk
12199 jason at esilibrary.com-20091208155412-4qdzy8sgs51vm0yq
12215 jason at esilibrary.com-20091209133642-bp8mb3tc5vpoc1ij
12220 jason at esilibrary.com-20091209143447-i1st1to8ln4hhwyb
12231 jason at esilibrary.com-20091209221438-vv4crqppm8ajj3dr
12804 jason at esilibrary.com-20100324194046-jza2ic2dlpq8txhc
12946 miker at esilibrary.com-20100402183612-8xznj35wfohk7zyu
12955 miker at esilibrary.com-20100403141037-h8d57ryrmkkg9yhb
12971 miker at whirly-20100405202254-aztbsf3p3eey9e8e
Name: bzr:text-parents
- Open-ILS/src/sql/Pg/950.data.seed-values.sql svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:16104
+ Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:16098
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:16068
Open-ILS/web/opac/skin/default/js/holds.js miker at whirly-20100405180745-p9g56elbog1dqlpl
Open-ILS/web/opac/skin/default/js/result_common.js miker at whirly-20100405174521-wh9p3wl2jg4eyi83
build/tools/update.sh svn-v4:dcc99617-32d9-48b4-a31d-7c20da2025e4:trunk:15381
Name: bzr:text-revisions
-
+ Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm miker at whirly-20100405174521-wh9p3wl2jg4eyi83
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm opensrf at fulfillment2.esilibrary.com-20100405202401-azfy1oyik95qjmyu
Open-ILS/web/opac/skin/default/js/holds.js opensrf at fulfillment2.esilibrary.com-20100405202638-dy1gigwnnvvqzc1x
Open-ILS/web/opac/skin/default/js/result_common.js miker at whirly-20100405180906-0hf79wthr5kvd418
build/tools/update.sh opensrf at fulfillment2.esilibrary.com-20100405202213-clhs5vspmixixbt3
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-04-05 18:58:48 UTC (rev 16136)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-04-05 20:23:54 UTC (rev 16137)
@@ -1644,7 +1644,7 @@
} elsif( $hold_type eq OILS_HOLD_TYPE_METARECORD ) {
- my $maps = $e->search_metabib_source_map({metarecord=>$mrid});
+ my $maps = $e->search_metabib_metarecord_source_map({metarecord=>$mrid});
my @recs = map { $_->source } @$maps;
for my $rec (@recs) {
my @status = _check_title_hold_is_possible(
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2010-04-05 18:58:48 UTC (rev 16136)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm 2010-04-05 20:23:54 UTC (rev 16137)
@@ -3097,6 +3097,7 @@
$query = "skip_check($args{skip_check}) $query" if ($args{skip_check});
$query = "superpage($args{superpage}) $query" if ($args{superpage});
$query = "offset($args{offset}) $query" if ($args{offset});
+ $query = "#metarecord $query" if ($self->api_name =~ /metabib/);
$query = "#available $query" if ($args{available});
$query = "#descending $query" if ($args{sort_dir} && $args{sort_dir} =~ /^d/i);
$query = "#staff $query" if ($self->api_name =~ /staff/);
Modified: trunk/Open-ILS/web/opac/skin/default/js/holds.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/holds.js 2010-04-05 18:58:48 UTC (rev 16136)
+++ trunk/Open-ILS/web/opac/skin/default/js/holds.js 2010-04-05 20:23:54 UTC (rev 16137)
@@ -281,8 +281,19 @@
// grab the list of record desciptors attached to this records metarecord
if( ! args.recordDescriptors ) {
- var params = { record: args.record };
+ var params = {};
+ if (args.type == 'M') {
+ if( !args.metarecord && args.record) {
+ params.metarecord = args.metarecord = args.record;
+ delete(args.record);
+ } else {
+ params = { metarecord : args.metarecordObject.doc_id() };
+ }
+ } else {
+ params = { record: args.record };
+ }
+
if( ! args.record ) {
if( args.metarecord )
params = { metarecord : args.metarecord };
@@ -294,11 +305,11 @@
req.callback(
function(r) {
var data = r.getResultObject();
- args.recordDescriptors = data.descriptors;
- args.metarecord = data.metarecord;
+ holdArgs.recordDescriptors = args.recordDescriptors = data.descriptors;
+ holdArgs.metarecord = args.metarecord = data.metarecord;
if( args.type == 'M' && ! args.metarecordObject)
- args.metarecordObject = findRecord(args.metarecord, 'M');
-
+ holdArgs.metarecordObject = args.metarecordObject = findRecord(args.metarecord, 'M');
+
if(doneCallback) doneCallback(args);
}
);
@@ -425,7 +436,30 @@
}
if( holdArgs.type == 'M' ) {
- var data = holdsParseMRFormats(holdArgs.editHold.holdable_formats());
+ var mr_formats;
+ if(holdArgs.editHold){
+ mr_formats = holdArgs.editHold.holdable_formats();
+ }else{
+ mr_formats = ''; // collect the item_type()s from all holdArgs.recordDescriptors
+ for(var desc in holdArgs.recordDescriptors){
+ if (!holdArgs.recordDescriptors[desc].item_type()) continue;
+ mr_formats += holdArgs.recordDescriptors[desc].item_type();
+ }
+
+ var first_form = 1;
+ for(var desc in holdArgs.recordDescriptors){
+ if (!holdArgs.recordDescriptors[desc].item_form()) continue;
+ if (first_form) {
+ mr_formats += '-';
+ first_form = 0;
+ }
+ mr_formats += holdArgs.recordDescriptors[desc].item_form();
+ }
+
+
+ }
+
+ var data = holdsParseMRFormats(mr_formats);
mods_formats = data.mods_formats;
formats = data.formats;
}
@@ -533,13 +567,20 @@
var avail_formats = data.avail_formats;
var sel_formats = data.sel_formats;
holdArgs.language = data.lang;
+ if( type=='M'){
+ hideMe($('holds_alt_formats_row_extras'));
+ unHideMe($('holds_alt_formats_row'));
+ }else{
+ unHideMe($('holds_alt_formats_row_extras'));
+ }
- unHideMe($('holds_alt_formats_row_extras'));
var selector = $('hold_alt_form_selector');
for( var i = 0; i < avail_formats.length; i++ ) {
var form = avail_formats[i];
- unHideMe(findSelectorOptByValue(selector, form));
+ var opt = findSelectorOptByValue(selector,form);
+ if(type=='M') opt.selected=true;
+ unHideMe(opt);
}
}
@@ -555,8 +596,16 @@
var rec = holdArgs.record;
var mrec = holdArgs.metarecord;
- if( type == 'T' ) {
+ for( var i = 0; i < desc.length; i++ ) {
+ var d = desc[i];
+ if( type == 'T' && d.item_lang() != lang ) continue;
+ formats.push( _t_f_2_format(d.item_type(), d.item_form()));
+ }
+ formats = uniquify(formats);
+
+ if( type == 'T') {
+
for( var i = 0; i < desc.length; i++ ) {
var d = desc[i];
if( d.record() == holdArgs.record ) {
@@ -566,16 +615,14 @@
break;
}
}
- }
+ } else if( type =='M') {
- for( var i = 0; i < desc.length; i++ ) {
- var d = desc[i];
- if( d.item_lang() != lang ) continue;
- formats.push( _t_f_2_format(d.item_type(), d.item_form()));
+ // All available formats are selected by default in MR holds
+ for( var i = 0; i < formats.length; i++ ) {
+ sformats.push(formats[i]);
+ }
}
- formats = uniquify(formats);
-
return {
lang : lang,
avail_formats : formats,
@@ -586,6 +633,7 @@
function _t_f_2_format(type, form) {
+ if( (type == 'a' || type == 't') && form == 's' ) return 'at-s';
if( form == 'd' ) return 'at-d';
return (type == 'a' || type == 't') ? 'at' :
( type == 'i' || type == 'g' || type == 'j' ) ? type : null;
@@ -603,14 +651,16 @@
var fstring = "";
- if( contains(vals, 'at-d') ) {
- if( contains(vals, 'at') )
+ if( contains(vals, 'at-d') || contains(vals, 'at-s')) {
+ if( contains(vals, 'at') ) {
fstring = 'at';
- else
+ } else if (contains(vals, 'at-s') && contains(vals, 'at-d')) {
+ fstring = 'at-sd';
+ } else if (!contains(vals, 'at-s')) {
fstring = 'at-d';
} else {
- if( contains(vals, 'at') )
- fstring = 'at';
+ fstring = 'at-s';
+ }
}
for( var i = 0; i < vals.length; i++ ) {
@@ -634,6 +684,7 @@
var args = {
titleid : holdArgs.record,
+ mrid : holdArgs.record,
volume_id : holdArgs.volume,
copy_id : holdArgs.copy,
hold_type : holdArgs.type,
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2010-04-05 18:58:48 UTC (rev 16136)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2010-04-05 20:23:54 UTC (rev 16137)
@@ -482,7 +482,7 @@
pic.parentNode.setAttribute("href", buildOPACLink(args));
title_link.setAttribute("href", buildOPACLink(args));
title_link.appendChild(text(normalize(truncate(rec.title(), 65))));
-
+
var here = findOrgUnit(getLocation());
if (findOrgType(here.ou_type()).can_have_vols()) { // show the callnumber list
dojo.require('openils.BibTemplate');
@@ -511,6 +511,10 @@
pic.parentNode.setAttribute("href", buildOPACLink(args));
}
+ unHideMe($n(r,'place_hold_span'));
+ $n(r,'place_hold_link').setAttribute(
+ 'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"M"});');
+
} else {
buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', rec.doc_id());
Modified: trunk/build/tools/update.sh
===================================================================
--- trunk/build/tools/update.sh 2010-04-05 18:58:48 UTC (rev 16136)
+++ trunk/build/tools/update.sh 2010-04-05 20:23:54 UTC (rev 16137)
@@ -108,7 +108,7 @@
[ ! -d "$OSRF" ] && die_msg "OpenSRF Source Directory '$OSRF' does not exist!";
which sudo >/dev/null || die_msg "sudo not installed (or in PATH)";
-[ -d "${ILS}/.svn" ] || [ -d "${ILS}/.git" ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN or git repo";
+[ -d "${ILS}/.svn" ] || [ -d "${ILS}/.git" ] || [ -d ${ILS}/.bzr ] || die_msg "Evergreen Source Directory '$ILS' is not a SVN, bzr or git repo";
if [ ! -z "$OPT_TEST" ] ; then
feedback;
More information about the open-ils-commits
mailing list