[open-ils-commits] r9236 - in trunk/Open-ILS/web/opac: common/js
skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Apr 5 08:21:25 EDT 2008
Author: miker
Date: 2008-04-05 07:44:42 -0400 (Sat, 05 Apr 2008)
New Revision: 9236
Modified:
trunk/Open-ILS/web/opac/common/js/init.js
trunk/Open-ILS/web/opac/common/js/opac_utils.js
trunk/Open-ILS/web/opac/skin/default/js/result_common.js
Log:
display the lasso name when appropriate
Modified: trunk/Open-ILS/web/opac/common/js/init.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/init.js 2008-04-04 21:18:48 UTC (rev 9235)
+++ trunk/Open-ILS/web/opac/common/js/init.js 2008-04-05 11:44:42 UTC (rev 9236)
@@ -46,7 +46,11 @@
runEvt("common", "run");
//checkUserSkin();
- G.ui.common.now_searching.appendChild(text(findOrgUnit(getLocation()).name()));
+
+ var loc = findOrgLasso(getLasso());
+ if (!loc) loc = findOrgUnit(getLocation());
+
+ G.ui.common.now_searching.appendChild(text(loc.name()));
}
function windowUnload() { runEvt("common", "unload"); }
Modified: trunk/Open-ILS/web/opac/common/js/opac_utils.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-04-04 21:18:48 UTC (rev 9235)
+++ trunk/Open-ILS/web/opac/common/js/opac_utils.js 2008-04-05 11:44:42 UTC (rev 9236)
@@ -790,8 +790,12 @@
showCanvas();
runEvt("common", "locationChanged", id, findOrgDepth(id) );
+
+ var loc = findOrgLasso(getLasso());
+ if (!loc) loc = findOrgUnit(id);
+
removeChildren(G.ui.common.now_searching);
- G.ui.common.now_searching.appendChild(text(findOrgUnit(id).name()));
+ G.ui.common.now_searching.appendChild(text(loc.name()));
}
function setFontSize(size) {
Modified: trunk/Open-ILS/web/opac/skin/default/js/result_common.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-04-04 21:18:48 UTC (rev 9235)
+++ trunk/Open-ILS/web/opac/skin/default/js/result_common.js 2008-04-05 11:44:42 UTC (rev 9236)
@@ -102,19 +102,21 @@
displaying, links to the next/prev pages, etc. */
function resultSetHitInfo() {
-
- /* tell the user where the results are coming from */
- var baseorg = findOrgUnit(getLocation());
- var depth = getDepth();
- var mydepth = findOrgDepth(baseorg);
- if( findOrgDepth(baseorg) != depth ) {
- var tmporg = baseorg;
- while( mydepth > depth ) {
- mydepth--;
- tmporg = findOrgUnit(tmporg.parent_ou());
+ var lasso = getLasso();
+ if (!lasso) {
+ /* tell the user where the results are coming from */
+ var baseorg = findOrgUnit(getLocation());
+ var depth = getDepth();
+ var mydepth = findOrgDepth(baseorg);
+ if( findOrgDepth(baseorg) != depth ) {
+ var tmporg = baseorg;
+ while( mydepth > depth ) {
+ mydepth--;
+ tmporg = findOrgUnit(tmporg.parent_ou());
+ }
+ unHideMe($('including_results_for'));
+ $('including_results_location').appendChild(text(tmporg.name()));
}
- unHideMe($('including_results_for'));
- $('including_results_location').appendChild(text(tmporg.name()));
}
More information about the open-ils-commits
mailing list