From 6b419fe6abe7c779bf97c262776e446f829f9e8e Mon Sep 17 00:00:00 2001 From: Mike Rylander <mrylander@gmail.com> Date: Mon, 27 Jun 2011 10:12:33 -0400 Subject: [PATCH] Add function to set Control Set by Thesaurus Code Signed-off-by: Mike Rylander <mrylander@gmail.com> --- Open-ILS/web/js/dojo/openils/AuthorityControlSet.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Open-ILS/web/js/dojo/openils/AuthorityControlSet.js b/Open-ILS/web/js/dojo/openils/AuthorityControlSet.js index 9993c728a8..ae650af6ef 100644 --- a/Open-ILS/web/js/dojo/openils/AuthorityControlSet.js +++ b/Open-ILS/web/js/dojo/openils/AuthorityControlSet.js @@ -173,6 +173,15 @@ if(!dojo._hasResource["openils.AuthorityControlSet"]) { return openils.AuthorityControlSet._controlsets[''+this.controlSetId(x)]; }, + controlSetByThesaurusCode: function (x) { + var thes = dojo.filter( + openils.AuthorityControlSet._thesaurus_list, + function (at) { return at.code() == x } + )[0]; + + return this.controlSet(thes.controlSet()); + }, + bibFieldByTag: function (x) { var me = this; return dojo.filter( -- 2.11.0