| Author | Dave Jarvis <email> |
|---|---|
| Date | 2014-11-24 16:58:28 GMT-0800 |
| Commit | f5c726add78dfa975e2e54d782618681aa222304 |
| Parent | 649fc52 |
| overflow: auto; | ||
| background: #949494; | ||
| + /*box-shadow: 2px 0px 8px 0px #AAA;*/ | ||
| } | ||
| div.column { | ||
| float: left; | ||
| display: inline-block; | ||
| background: #FFF; | ||
| font-size: 0.9em; | ||
| font-family: Arial; | ||
| border-right: 1px solid #666; | ||
| - /*box-shadow: 4px 0px 8px 0px #AAA;*/ | ||
| } | ||
| div.collapsed { | ||
| display: none; | ||
| } | ||
| li.parent:hover { | ||
| - background-color: #DDE4E8 !important; | ||
| + color: black; | ||
| + background-color: #DDE4E8; | ||
| +} | ||
| + | ||
| +/* Ensure the selection hierarchy is highlighted. */ | ||
| +li.selection { | ||
| + background-color: #08C !important; | ||
| + color: white !important; | ||
| } | ||
| div.breadcrumb, div.toolbar { | ||
| - background: #CCC; | ||
| height: 1.25em; | ||
| +} | ||
| + | ||
| +div.breadcrumb, div.toolbar { | ||
| + background: linear-gradient(#f0f0f0, #d8d8d8); | ||
| + background: -webkit-linear-gradient(#f0f0f0, #d8d8d8); | ||
| + background: -o-linear-gradient(#f0f0f0, #d8d8d8); | ||
| + background: -moz-linear-gradient(#f0f0f0, #d8d8d8); | ||
| } | ||
| + | ||
| div.breadcrumb { |
| // Hide everything. | ||
| $("div.column[data-parent!=0]").addClass( "collapsed" ); | ||
| + $("li").removeClass( "selection" ); | ||
| // The "id" for the clicked list item becomes the start of | ||
| // the ancestral chain. | ||
| + var $child = $("div.column[data-parent=" + id + "]" ); | ||
| + $child.removeClass( "collapsed" ); | ||
| - var $ancestor = $(this).parent().parent(); | ||
| - var parent_id = $ancestor.attr( "data-parent" ); | ||
| + var $li = $("li.parent[id=" + id + "]"); | ||
| + var $ancestor = $li.parent().parent(); | ||
| + var ancestor_id = $ancestor.attr( "data-parent" ); | ||
| - console.log( "clicked id: " + id ); | ||
| - console.log( "parent id: " + parent_id ); | ||
| + while( ancestor_id !== undefined ) { | ||
| + $li.addClass( "selection" ); | ||
| + $ancestor.removeClass( "collapsed" ); | ||
| - var $child = $("div.column[data-parent=" + id + "]" ); | ||
| + $li = $("li.parent[id=" + ancestor_id + "]"); | ||
| + $ancestor = $li.parent().parent(); | ||
| + ancestor_id = $ancestor.attr( "data-parent" ); | ||
| + } | ||
| - $child.removeClass( "collapsed" ); | ||
| - $ancestor.removeClass( "collapsed" ); | ||
| + $li.addClass( "selection" ); | ||
| }); | ||
| <name>Fracking</name> | ||
| </tag> | ||
| + <tag id="25"> | ||
| + <name>Shale</name> | ||
| + </tag> | ||
| </tag> | ||
| <tag id="15"> |
| Delta | 34 lines added, 10 lines removed, 24-line increase |
|---|