| Author | Dave Jarvis <email> |
|---|---|
| Date | 2014-12-31 04:42:02 GMT-0800 |
| Commit | 01af9c599c2d20480d69910108fa5f4642c0fe8e |
| Parent | 94e6d5b |
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/related.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| + | ||
| @import url( 'reset.min.css' ); | ||
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/related.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| + | ||
| @import url( "related.css" ); | ||
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/edit-discuss-flag.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| + | ||
| .policy { | ||
| display: flex; |
| +@charset "utf-8"; | ||
| + | ||
| /** | ||
| * Decorates the tabular data for the pie chart values. |
| +@charset "utf-8"; | ||
| + | ||
| .part > .title, .section > .title { | ||
| margin-top: 0.75em; |
| +@charset "utf-8"; | ||
| + | ||
| +.policy { | ||
| + padding-bottom: 0.5em; | ||
| + border-bottom: 1px solid black; | ||
| +} | ||
| + | ||
| +.title { | ||
| + border-bottom: 1px solid black; | ||
| +} | ||
| + | ||
| +.paragraph { | ||
| + padding-top: 0.5em; | ||
| + line-height: 120%; | ||
| +} | ||
| + | ||
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/edit-discuss-flag.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| + | ||
| .related { | ||
| display: flex; |
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/edit-discuss-flag.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| + | ||
| @import url( "css/related.css" ); | ||
| @import url( "css/xref.css" ); |
| +@charset "utf-8"; | ||
| +@import url( "css/policy.css" ); | ||
| @import url( "css/edit-discuss-flag.css" ); | ||
| @import url( "css/xref.css" ); | ||
| @import url( "css/votes.css" ); | ||
| - | ||
| -.policy { | ||
| - padding-bottom: 0.5em; | ||
| - border-bottom: 1px solid black; | ||
| -} | ||
| .implications::before { | ||
| font-family: 'Montserrat', Helvetica, sans-serif; | ||
| font-weight: bold; | ||
| -} | ||
| - | ||
| -.title { | ||
| - border-bottom: 1px solid black; | ||
| } | ||
| .support { | ||
| display: table; | ||
| -} | ||
| - | ||
| -.paragraph { | ||
| - padding-top: 0.5em; | ||
| - line-height: 120%; | ||
| } | ||
| @charset "utf-8"; | ||
| -@import url( "css/support.css" ); | ||
| +@import url( "css/policy.css" ); | ||
| +@import url( "css/xref.css" ); | ||
| div#container { | ||
| clear: both; | ||
| border-top: 1px solid #666; | ||
| -} | ||
| -div.toolbar:after { | ||
| - font-size: 0.8em; | ||
| - content: "new | edit | delete | flag"; | ||
| - height: 1.25em; | ||
| - line-height: 1.25em; | ||
| - float: right; | ||
| padding-right: 1em; | ||
| + | ||
| + text-align: right; | ||
| + font-size: 0.8em; | ||
| } | ||
| /** | ||
| * | ||
| * Breadcrumb and toolbar styling. | ||
| * | ||
| */ | ||
| div.breadcrumb, div.toolbar { | ||
| - height: 1.25em; | ||
| + padding-top: 0; | ||
| + height: 1.75em; | ||
| + line-height: 1.75em; | ||
| + | ||
| background: linear-gradient(#f0f0f0, #d8d8d8); | ||
| } | ||
| +@charset "utf-8"; | ||
| + | ||
| a { | ||
| text-decoration: none; |
| +@charset "utf-8"; | ||
| + | ||
| .votes { | ||
| display: flex; |
| +@charset "utf-8"; | ||
| + | ||
| a { | ||
| text-decoration: none; |
| -(function( $ ) { | ||
| - $.fn.millerColumns = function() { | ||
| +;(function( $, window, document, undefined ) { | ||
| + var settings; | ||
| + | ||
| + $.fn.millerColumns = function( options ) { | ||
| + var defaults = { | ||
| + selection: function( $item ) {}, | ||
| + breadcrumb: $.fn.millerColumns.breadcrumb, | ||
| + animation: $.fn.millerColumns.animation, | ||
| + delay: 500 | ||
| + }; | ||
| + | ||
| + settings = $.extend( defaults, options ); | ||
| + | ||
| return this.each( function() { | ||
| var $columns = $(this); | ||
| - $columns.before( $("<div/>").addClass( "breadcrumb" ) ); | ||
| - $columns.after( $("<div/>").addClass( "toolbar" ) ); | ||
| - unnest( $columns ); | ||
| - collapse(); | ||
| + $.fn.millerColumns.unnest( $columns ); | ||
| + $.fn.millerColumns.collapse(); | ||
| // Expand the requested child node on click. | ||
| $columns.find( "li" ).on( "click", function() { | ||
| - collapse(); | ||
| + $.fn.millerColumns.collapse(); | ||
| $(".selected").removeClass( "selected" ); | ||
| $ancestor = $ancestor.data( "ancestor" ); | ||
| } | ||
| - | ||
| - breadcrumb(); | ||
| - // Ensure the viewport shows the entire newly expanded item. | ||
| - $columns.animate( { scrollLeft: $(this).offset().left }, 500 ); | ||
| + settings.animation.call( this, $columns, $(this) ); | ||
| + settings.breadcrumb.call( this ); | ||
| + settings.selection.call( this, $(this) ); | ||
| }); | ||
| }); | ||
| } | ||
| - /** Determine the breadcrumb path via the selected items. */ | ||
| - function breadcrumb() { | ||
| + /** Ensure the viewport shows the entire newly expanded item. */ | ||
| + $.fn.millerColumns.animation = function( $columns, $column ) { | ||
| + $columns.animate( { scrollLeft: $column.offset().left }, settings.delay ); | ||
| + } | ||
| + | ||
| + /** Add the breadcrumb path using the chain of selected items. */ | ||
| + $.fn.millerColumns.breadcrumb = function() { | ||
| var $breadcrumb = $("div.breadcrumb").empty(); | ||
| - // Add the breadcrumb trail. | ||
| $("li.selected").each( function( _, crumb ) { | ||
| $("<span/>").text( $(crumb).text().trim() ).appendTo( $breadcrumb ); | ||
| }); | ||
| } | ||
| /** Convert nested lists into columns using breadth-first traversal. */ | ||
| - function unnest( $columns ) { | ||
| + $.fn.millerColumns.unnest = function( $columns ) { | ||
| var queue = []; | ||
| /** Hide all columns, except the first. */ | ||
| - function collapse() { | ||
| + $.fn.millerColumns.collapse = function() { | ||
| $(".column:gt(0)").addClass( "collapse" ); | ||
| } | ||
| $(document).ready( function() { | ||
| $.getScript( "js/columns.js", function() { | ||
| - $("div.columns").millerColumns(); | ||
| + $("div.columns").millerColumns({ | ||
| + selection: function( $item ) { | ||
| + console.log( $item.attr( "id" ) ); | ||
| + } | ||
| + }); | ||
| }); | ||
| }); |
| <xsl:template match="taglist" priority="1"> | ||
| <div id="container"> | ||
| + <div class="breadcrumb"></div> | ||
| <div class="columns"> | ||
| <ul> | ||
| <xsl:apply-templates mode="tag"/> | ||
| </ul> | ||
| + </div> | ||
| + <div class="toolbar"> | ||
| + <a href="do.xhtml?action=tag&command=new">New</a> | | ||
| + <a href="do.xhtml?action=tag&command=edit">Edit</a> | | ||
| + <a href="do.xhtml?action=tag&command=delete">Delete</a> | | ||
| + <a href="do.xhtml?action=tag&command=flag">Flag</a> | ||
| </div> | ||
| </div> |
| Delta | 97 lines added, 40 lines removed, 57-line increase |
|---|