From: erickson Date: Tue, 19 Sep 2006 16:34:55 +0000 (+0000) Subject: added default action of toggle for new nodes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ef654b2ed06a16475982f695b42809fa3312d5e8;p=Evergreen.git added default action of toggle for new nodes git-svn-id: svn://svn.open-ils.org/ILS/trunk@6140 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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);