From 6bde3a63525f257665cca1c468b3acbea262ab9f Mon Sep 17 00:00:00 2001 From: Yamil Suarez Date: Thu, 25 Sep 2014 14:11:26 -0400 Subject: [PATCH] Fixed typo and Dijit issue with ternary operator Signed-off-by: Yamil Suarez --- Open-ILS/src/templates/cat/authority/list.tt2 | 2 +- Open-ILS/web/js/ui/default/cat/authority/list.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/cat/authority/list.tt2 b/Open-ILS/src/templates/cat/authority/list.tt2 index 36204a1fe9..7a355d999f 100644 --- a/Open-ILS/src/templates/cat/authority/list.tt2 +++ b/Open-ILS/src/templates/cat/authority/list.tt2 @@ -34,7 +34,7 @@ - + diff --git a/Open-ILS/web/js/ui/default/cat/authority/list.js b/Open-ILS/web/js/ui/default/cat/authority/list.js index 01bdb656c5..8c33223f74 100644 --- a/Open-ILS/web/js/ui/default/cat/authority/list.js +++ b/Open-ILS/web/js/ui/default/cat/authority/list.js @@ -1,4 +1,5 @@ dojo.require('dijit.Dialog'); +dojo.require('dijit.form.CheckBox'); dojo.require('dijit.form.Button'); dojo.require('dijit.form.DropDownButton'); dojo.require('dijit.form.FilteringSelect'); @@ -375,15 +376,18 @@ function displayRecords(parms) { dojo.query("#authlist-div").query("div").orphan(); + var search_type = dijit.byId('searchOrNot').attr('checked') ? '.search' : ''; var url = '/opac/extras/browse/marcxml/authority.' + dijit.byId('authAxis').attr('value') - + dijit.byId('searchOrNot').attr('checked') ? '.search' : '' - // + '/' + dijit.byId('authOU').attr('value') + + search_type + // + '/' + dijit.byId('authOU').attr('value') + '/1' // replace with preceding line if OUs gain some meaning + '/' + encodeURIComponent(dijit.byId('authTerm').attr('value')) + '/' + dijit.byId('authPage').attr('value') + '/' + '20' // 20 results per page ; +alert(url); +alert(dijit.byId('searchOrNot').attr('checked')); dojo.xhrGet({"url":url, "handleAs":"xml", "content":{"format":"marcxml"}, "preventCache": true, "load":displayAuthorities }); } -- 2.11.0