8 function cnBrowseGo(cn) {
10 //unHideMe($('cn_browse_loading'));
11 var req = new Request( FETCH_CNBROWSE_TARGET,
12 'org_unit', getLocation(),
15 'page_size', MAX_CN );
16 req.callback( cnBrowseDraw );
20 function cnBrowseNext() {
21 //unHideMe($('cn_browse_loading'));
22 var req = new Request( FETCH_CNBROWSE_NEXT,
23 'org_unit', getLocation(),
25 'label', cnBrowseBottomCn,
26 'boundry_id', cnBrowseBottomId,
27 'page_size', MAX_CN );
28 req.callback( cnBrowseDraw );
32 function cnBrowsePrev() {
33 //unHideMe($('cn_browse_loading'));
34 var req = new Request( FETCH_CNBROWSE_PREV,
35 'org_unit', getLocation(),
37 'label', cnBrowseTopCn,
38 'boundry_id', cnBrowseTopId,
39 'page_size', MAX_CN );
40 req.callback( cnBrowseDraw );
49 function cnBrowseDraw( r ) {
50 var list = r.getResultObject();
53 cnTbody = $('cn_tbody');
54 cnRowT = $('cn_browse_row');
55 cnTdT = cnRowT.removeChild($('cn_browse_td'));
56 cnTbody.removeChild(cnRowT);
58 removeChildren(cnTbody);
61 var currentRow = cnRowT.cloneNode(true);
62 cnTbody.appendChild(currentRow);
64 for( var idx in list ) {
67 var currentTd = cnTdT.cloneNode(true);
68 currentRow.appendChild(currentTd);
70 var td = cnTdT.cloneNode(true);
71 var label = list[idx][0];
72 var lib = list[idx][1];
73 var record = list[idx][2];
74 var id = list[idx][3];
77 if( label != cnBrowseCurrent ) {
78 removeCSSClass( td, 'cn_browse_home_cn' );
83 cnBrowseTopCn = label;
85 //alert('top cn: ' + cnBrowseTopCn + ' : top id : ' + cnBrowseTopId );
87 cnBrowseBottomCn = label;
88 cnBrowseBottomId = id;
89 //alert('bottom cn: ' + cnBrowseBottomCn + ' : bottom id : ' + cnBrowseBottomId );
92 var cn_td = $n(currentTd, 'cn_browse_cn');
93 var lib_td = $n(currentTd, 'cn_browse_lib');
94 var title_td = $n(currentTd, 'cn_browse_title');
95 var author_td = $n(currentTd, 'cn_browse_author');
96 var pic_td = $n(currentTd, 'cn_browse_pic');
98 cn_td.appendChild(text(label));
99 lib_td.appendChild(text(findOrgUnit(lib).name()));
101 var req = new Request( FETCH_RMODS, record );
102 req.request.title_td = title_td;
103 req.request.author_td = author_td;
104 req.request.pic_td = pic_td;
105 req.callback( cnBrowseDrawTitle );
109 if( counter++ % 3 == 0 ) {
111 currentRow = cnRowT.cloneNode(true);
112 cnTbody.appendChild(currentRow);
117 function cnBrowseDrawTitle(r) {
118 var mods = r.getResultObject();
119 buildTitleDetailLink(mods, r.title_td);
120 buildSearchLink(STYPE_AUTHOR, mods.author(), r.author_td);
121 r.pic_td.setAttribute("src", buildISBNSrc(cleanISBN(mods.isbn())));
125 args[PARAM_OFFSET] = 0;
126 args[PARAM_RID] = mods.doc_id();
127 args[PARAM_MRID] = 0;
128 r.pic_td.parentNode.setAttribute("href", buildOPACLink(args));