Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/delibero.git

New version of Miller Columns with simplifications and proper namespace.

AuthorDave Jarvis <email>
Date2014-12-27 18:51:21 GMT-0800
Commit772f4d52c3fdb785d4c732a5e8ca05c885dfadfe
Parent7904ced
questions.ods
Binary files differ
xml/css/tags.css
@import url( "css/support.css" );
-@import url( "css/xref.css" );
-@import url( "css/edit-discuss-flag.css" );
/* ***********************************************************************
xml/tags.css
+div.columns {
+ float: left;
+ width: 100%;
+ height: 200px;
+ overflow-x: auto;
+ overflow-y: hidden;
+ white-space: nowrap;
+
+ background-color: #949494;
+}
+
+ul.column {
+ display: inline-block;
+ float: left;
+ padding: 0;
+ margin: 0;
+
+ vertical-align: top;
+ overflow: hidden;
+ border-right: 1px solid #666;
+ font-size: 0.9em;
+ font-family: Arial;
+ background-color: white;
+
+ white-space: normal;
+}
+
+ul.column.collapsed {
+ display: none;
+}
+
+ul.column > li {
+ list-style: none;
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ padding-top: 0.25em;
+ padding-bottom: 0.25em;
+}
+
+/* Zebra stripes. */
+ul.column > li:nth-child(odd) {
+ background-color: #EEE;
+}
+
+ul.column > li:hover {
+ color: black;
+ background-color: #DDE4E8;
+}
+
+/* Ensure the selection hierarchy is highlighted. */
+ul.column > li.selection {
+ background-color: #08C;
+ color: white;
+}
+
xml/tags.js
+(function( $ ) {
+ $.fn.millerColumns = function() {
+ return this.each( function() {
+ unnest( $(this) );
+
+ // Expand child node on click.
+ $(this).find( "li" ).on( "click", function() {
+
+ // In the end, there can only be one selected item per column.
+ $(this).addClass( "selection" );
+ $(this).siblings().removeClass( "selection" );
+ });
+ });
+ }
+
+ /**
+ *
+ */
+ function unnest( column_container ) {
+ var queue = [];
+ var $columns = column_container;
+
+ queue.push( $columns.children( "ul" ) );
+
+ while( queue.length > 0 ) {
+ var $child = queue.shift();
+
+ $child.children( "li" ).each( function( _, el ) {
+ var $children = $(this).children( "ul" );
+
+ if( $children.length > 0 ) {
+ queue.push( $children );
+ $(this).addClass( "parent" );
+ }
+
+ $(this).parent().detach().appendTo( $columns ).addClass( "column" );
+ });
+ }
+
+ // Hide all but the first column.
+ $(".column:gt(0)").addClass( "collapsed" );
+ }
+})(jQuery);
xml/tex/constants.tex
\define\WPProposals{\WPProposal{}s}
+\define\WPdeliberation{deliberation}
+\define\WPdeliberations{\WPdeliberation{}s}
+\define\WPDeliberation{\Word{\WPdeliberation{}}}
+\define\WPDeliberations{\WPdeliberation{}s}
+
% Separator for contiguous citations.
\define\WPcitesep{\high{\,}}
Delta103 lines added, 2 lines removed, 101-line increase