From ef654b2ed06a16475982f695b42809fa3312d5e8 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 19 Sep 2006 16:34:55 +0000 Subject: [PATCH] added default action of toggle for new nodes git-svn-id: svn://svn.open-ils.org/ILS/trunk@6140 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/opac/common/js/slimtree.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/opac/common/js/slimtree.js b/Open-ILS/web/opac/common/js/slimtree.js index c119916740..e1fff891e8 100644 --- a/Open-ILS/web/opac/common/js/slimtree.js +++ b/Open-ILS/web/opac/common/js/slimtree.js @@ -44,12 +44,16 @@ SlimTree.prototype.addNode = function( id, pid, name, action, title ) { return; } + if(!action) + action='javascript:'+this.handle+'.toggle("'+id+'");'; + var div = elem('div',{id:id}); var topdiv = elem('div',{style:'vertical-align:middle'}); var link = elem('a', {id:'stlink_' + id}); var actionref = elem('a',{href:action}, name); var contdiv = elem('div',{id:'stcont_' + id}); - if(action) actionref.setAttribute('href',action); + + actionref.setAttribute('href',action); if(title) actionref.setAttribute('title',title); else actionref.setAttribute('title',name); -- 2.11.0