From 95c5636b670caf50b008b2fea6a3cc5abd0ca204 Mon Sep 17 00:00:00 2001 From: Noah Manger Date: Tue, 2 Jun 2015 11:39:41 -0700 Subject: [PATCH 1/8] Fixing IE 10 browser issues --- static/js/modules/typeahead.js | 9 ++------- static/styles/_base/_forms.scss | 6 ++++++ static/styles/_components/_glossary.scss | 4 ++++ static/styles/_components/_search-bar.scss | 2 +- static/styles/_layout/_layout.scss | 4 ++++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/static/js/modules/typeahead.js b/static/js/modules/typeahead.js index f5ea1b998..873e9cce6 100644 --- a/static/js/modules/typeahead.js +++ b/static/js/modules/typeahead.js @@ -116,9 +116,8 @@ module.exports = { window.location = window.location.origin + '/' + datasetName + '/' + datum.id; }); - $('.twitter-typeahead').css({ - display: 'flex', - }); + $('.twitter-typeahead').addClass('flex-container'); + $('.twitter-typeahead').css('display',''); }, init: function(){ @@ -233,9 +232,5 @@ module.exports = { definition: datum.definition }); }); - - $('.twitter-typeahead').css({ - display: 'flex', - }); } }; diff --git a/static/styles/_base/_forms.scss b/static/styles/_base/_forms.scss index e176b4fa2..15ff91538 100644 --- a/static/styles/_base/_forms.scss +++ b/static/styles/_base/_forms.scss @@ -112,6 +112,10 @@ select { &:focus { outline: 3px solid $focus; } + + &::-ms-expand { + display: none; + } } select[multiple] { @@ -123,6 +127,8 @@ select[multiple] { .input-button-combo { @include display(flex); + @include align-items(stretch); + @include flex-direction(row); @include justify-content(center); height: 4rem; diff --git a/static/styles/_components/_glossary.scss b/static/styles/_components/_glossary.scss index efd8f416b..2c1fe7d92 100644 --- a/static/styles/_components/_glossary.scss +++ b/static/styles/_components/_glossary.scss @@ -31,6 +31,10 @@ .glossary { z-index: 999; + .twitter-typeahead { + width: 100%; + } + .tt-dropdown-menu { width: 100%; } diff --git a/static/styles/_components/_search-bar.scss b/static/styles/_components/_search-bar.scss index 0fd91734f..c38a6cc74 100644 --- a/static/styles/_components/_search-bar.scss +++ b/static/styles/_components/_search-bar.scss @@ -43,7 +43,7 @@ // Typeahead .twitter-typeahead { @include display(flex); - width: 100%; + width: 50%; } .tt-dropdown-menu { diff --git a/static/styles/_layout/_layout.scss b/static/styles/_layout/_layout.scss index 394b21280..297d2782a 100644 --- a/static/styles/_layout/_layout.scss +++ b/static/styles/_layout/_layout.scss @@ -53,6 +53,10 @@ body { @include span-columns(6); } +.flex-container { + @include display(flex); +} + // Chunks // These are common grouping sizes, described by their desktop size From 6756ebd4c829e82b7ab3ac8dd919068fa818490d Mon Sep 17 00:00:00 2001 From: Noah Manger Date: Tue, 2 Jun 2015 11:39:53 -0700 Subject: [PATCH 2/8] Filter button consistency --- templates/committees.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/committees.html b/templates/committees.html index 0601e4aa6..8c0db6f84 100644 --- a/templates/committees.html +++ b/templates/committees.html @@ -18,7 +18,7 @@

Filter Results +
From 0c991ff21a808c42b78875e90ece5412eab346de Mon Sep 17 00:00:00 2001 From: Noah Manger Date: Tue, 2 Jun 2015 11:43:41 -0700 Subject: [PATCH 3/8] condensing --- static/js/modules/typeahead.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/js/modules/typeahead.js b/static/js/modules/typeahead.js index 873e9cce6..751627112 100644 --- a/static/js/modules/typeahead.js +++ b/static/js/modules/typeahead.js @@ -116,8 +116,7 @@ module.exports = { window.location = window.location.origin + '/' + datasetName + '/' + datum.id; }); - $('.twitter-typeahead').addClass('flex-container'); - $('.twitter-typeahead').css('display',''); + $('.twitter-typeahead').addClass('flex-container').css('display',''); }, init: function(){ From adf548a47a20b5d61e997a1a459ef551ded5cb40 Mon Sep 17 00:00:00 2001 From: msecret Date: Tue, 2 Jun 2015 15:13:42 -0700 Subject: [PATCH 4/8] Don't collapse accordion menu People want to see the various parts of the report at the same time so not collapsing the other accordion items when you open a new one is better. --- static/js/modules/accordion.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/static/js/modules/accordion.js b/static/js/modules/accordion.js index 2c3aa3e0d..215bcf892 100644 --- a/static/js/modules/accordion.js +++ b/static/js/modules/accordion.js @@ -34,7 +34,6 @@ var accordion = { events.on(this.EV_EXPAND, function(props) { var $header = $(props.header); - self.hideAll(); if ($.inArray($header, self.$headers)) { self.showHeader($header); } @@ -42,7 +41,7 @@ var accordion = { events.on(this.EV_COLLAPSE, function(props) { var $header = $(props.header); if ($.inArray($header, self.$headers)) { - self.hideAll(); + self.hideHeader($header); } }); }, @@ -106,6 +105,20 @@ var accordion = { }); this.$headers.toggleClass(this.CLS_COLLAPSED, true); }, + + /** + * Hide all items under the accordion header passed in. + * @param $header {jQuery} The header to hide items under. + */ + hideHeader: function($header) { + var $items = this.findItemsFromHeader($header), + self = this; + $items.each(function() { + self.hide($(this)); + }); + $header.toggleClass(this.CLS_COLLAPSED, true); + }, + /** * Show all items under the accordion header passed in. * @param $header {jQuery} The header to show items under. From 3e06d26c6a66ed4bcd60a0c58f7d902b4a6e2012 Mon Sep 17 00:00:00 2001 From: msecret Date: Tue, 2 Jun 2015 15:18:49 -0700 Subject: [PATCH 5/8] Include option for closing all on opening Users of the accordion plugin might want to configure it so it closes the various items when you open a new one. --- static/js/modules/accordion.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/static/js/modules/accordion.js b/static/js/modules/accordion.js index 215bcf892..0d2de1f79 100644 --- a/static/js/modules/accordion.js +++ b/static/js/modules/accordion.js @@ -4,6 +4,10 @@ var $ = require('jquery'); var events = require('./events.js'); +var defaultOpts = { + closeAll: false +}; + var accordion = { SLT_HEADER: '.js-accordion_header', SLT_ITEM: '.js-accordion_item', @@ -19,11 +23,13 @@ var accordion = { * Events * accordion:active * @param header {jQuery} The accordion header that is activated to be expanded. + * @param opts {Object} A hash of options to use. * * @param $base {jQuery} The container of the accordion. */ - init: function($base) { + init: function($base, opts) { var self = this; + this.options = $.extend({}, defaultOpts, opts); this.$headers = this.findHeaders($base); this.$items = this.findItems($base); this.$buttons = this.findButtons(this.$headers); @@ -34,6 +40,9 @@ var accordion = { events.on(this.EV_EXPAND, function(props) { var $header = $(props.header); + if (self.options.closeAll) { + self.hideAll(); + } if ($.inArray($header, self.$headers)) { self.showHeader($header); } @@ -41,7 +50,11 @@ var accordion = { events.on(this.EV_COLLAPSE, function(props) { var $header = $(props.header); if ($.inArray($header, self.$headers)) { - self.hideHeader($header); + if (self.options.closeAll) { + self.hideAll(); + } else { + self.hideHeader($header); + } } }); }, From 0703e8082e1e7e32695622aca70c9a6d3e1e2dea Mon Sep 17 00:00:00 2001 From: msecret Date: Tue, 2 Jun 2015 16:05:26 -0700 Subject: [PATCH 6/8] Ensures charts properly deal with negative values When a user sees a chart for a negative value, they should see a bar chart of zero. TODO: A better implementation of this would be to actually show a negative value through a different kind of chart or a different color, but this requires design consideration. --- static/js/modules/charts.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/modules/charts.js b/static/js/modules/charts.js index 519a8b921..fcd801332 100644 --- a/static/js/modules/charts.js +++ b/static/js/modules/charts.js @@ -53,8 +53,11 @@ function chartSeries() { .call(drawScale, scale, dim); bars.each(function(d) { - d.size = scale(d.value); - // console.log(d.value, '->', d.height); + if (d.value < 0) { + d.size = 0; + } else { + d.size = scale(d.value); + } }) .style(dim, function(d) { return d.size + '%'; From 1b54fddf9f79898ac3b530b89b86834048467944 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 3 Jun 2015 09:57:17 -0400 Subject: [PATCH 7/8] Expand definition when user clicks term in page. --- static/js/modules/glossary.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/static/js/modules/glossary.js b/static/js/modules/glossary.js index 2d115e76a..2428e4a10 100644 --- a/static/js/modules/glossary.js +++ b/static/js/modules/glossary.js @@ -28,13 +28,13 @@ populateList = function(terms) { + ''; var options = { item: itemTemplate, - valueNames: ['glossary-term','glossary-definition'], + valueNames: ['glossary-term', 'glossary-definition'], listClass: 'glossary__list', - searchClass: 'glossary__search', + searchClass: 'glossary__search' }; - glossaryList = new List('glossary',options,terms); + glossaryList = new List('glossary', options, terms); glossaryList.sort('glossary-term', {order: 'asc'}); -} +}; populateList(terms); @@ -42,12 +42,18 @@ populateList(terms); $('.term').attr('title', 'Click to define').attr('tabindex', 0); findTerm = function(term){ - glossaryList.search(term, ['glossary-term']); $('.glossary__search').val(term); // Highlight the term and remove other highlights $('.term--highlight').removeClass('term--highlight'); $('span[data-term="' + term + '"]').addClass('term--highlight'); -} + glossaryList.filter(function(item) { + return item._values['glossary-term'] === term; + }); + // Hack: Expand text for selected item + _.each(glossaryList.visibleItems, function(item) { + $(item.elm).find('.accordion__button').click(); + }); +}; // Opens the glossary showGlossary = function() { @@ -56,7 +62,7 @@ showGlossary = function() { $('#glossary-toggle').addClass('active'); $('#glossary-search').focus(); glossaryIsOpen = true; -} +}; // Hides the glossary hideGlossary = function() { @@ -91,5 +97,12 @@ module.exports = { showGlossary(); } }); + + // Hack: Remove filters applied by clicking a term on new user input + $('#glossary-search').keyup(function() { + if (glossaryList.filtered) { + glossaryList.filter(); + } + }); } }; From 4ce1194d22f2c84611d6e72d43d2c24e10941a88 Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Wed, 3 Jun 2015 10:09:27 -0400 Subject: [PATCH 8/8] Un-vendorize list.js. --- package.json | 1 + static/js/modules/glossary.js | 18 +++++++++--------- static/js/vendor/list.min.js | 1 - 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 static/js/vendor/list.min.js diff --git a/package.json b/package.json index af577c18f..ae89adb7d 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "gulp-util": "^3.0.4", "handlebars": "^2.0.0", "jquery": "^2.1.4", + "list.js": "git://github.com/slifszyc/list.js.git", "node-bourbon": "^4.2.2", "node-neat": "^1.7.1-beta1", "querystring": "^0.2.0", diff --git a/static/js/modules/glossary.js b/static/js/modules/glossary.js index 2428e4a10..0c6cf9cf8 100644 --- a/static/js/modules/glossary.js +++ b/static/js/modules/glossary.js @@ -6,7 +6,7 @@ var $ = require('jquery'); var _ = require('underscore'); var terms = require('./terms'); -require('../vendor/list.min.js'); +var List = require('list.js'); var glossaryLink = $('.term'), glossaryIsOpen = false, @@ -19,13 +19,13 @@ var glossaryLink = $('.term'), // Builds the List in the glossary slide panel populateList = function(terms) { - var itemTemplate = '
  • ' - + '
    ' - + '

    ' - + '' - + '
    ' - + '

    ' - + '
  • '; + var itemTemplate = '
  • ' + + '
    ' + + '

    ' + + '' + + '
    ' + + '

    ' + + '
  • '; var options = { item: itemTemplate, valueNames: ['glossary-term', 'glossary-definition'], @@ -72,7 +72,7 @@ hideGlossary = function() { $('#glossary-toggle').removeClass('active'); glossaryIsOpen = false; clearTerm(); -} +}; clearTerm = function() { $('#glossary-term').html(''); diff --git a/static/js/vendor/list.min.js b/static/js/vendor/list.min.js deleted file mode 100644 index 56c17e398..000000000 --- a/static/js/vendor/list.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){function a(b,c,d){var e=a.resolve(b);if(null==e){d=d||b,c=c||"root";var f=new Error('Failed to require "'+d+'" from "'+c+'"');throw f.path=d,f.parent=c,f.require=!0,f}var g=a.modules[e];if(!g._resolving&&!g.exports){var h={};h.exports={},h.client=h.component=!0,g._resolving=!0,g.call(this,h.exports,a.relative(e),h),delete g._resolving,g.exports=h.exports}return g.exports}a.modules={},a.aliases={},a.resolve=function(b){"/"===b.charAt(0)&&(b=b.slice(1));for(var c=[b,b+".js",b+".json",b+"/index.js",b+"/index.json"],d=0;di;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()}),a.register("javve-get-attribute/index.js",function(a,b,c){c.exports=function(a,b){var c=a.getAttribute&&a.getAttribute(b)||null;if(!c)for(var d=a.attributes,e=d.length,f=0;e>f;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}}),a.register("javve-natural-sort/index.js",function(a,b,c){c.exports=function(a,b,c){var d,e,f=/(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,g=/(^[ ]*|[ ]*$)/g,h=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,i=/^0x[0-9a-f]+$/i,j=/^0/,c=c||{},k=function(a){return c.insensitive&&(""+a).toLowerCase()||""+a},l=k(a).replace(g,"")||"",m=k(b).replace(g,"")||"",n=l.replace(f,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),o=m.replace(f,"\x00$1\x00").replace(/\0$/,"").replace(/^\0/,"").split("\x00"),p=parseInt(l.match(i))||1!=n.length&&l.match(h)&&Date.parse(l),q=parseInt(m.match(i))||p&&m.match(h)&&Date.parse(m)||null,r=c.desc?-1:1;if(q){if(q>p)return-1*r;if(p>q)return 1*r}for(var s=0,t=Math.max(n.length,o.length);t>s;s++){if(d=!(n[s]||"").match(j)&&parseFloat(n[s])||n[s]||0,e=!(o[s]||"").match(j)&&parseFloat(o[s])||o[s]||0,isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(typeof d!=typeof e&&(d+="",e+=""),e>d)return-1*r;if(d>e)return 1*r}return 0}}),a.register("javve-to-string/index.js",function(a,b,c){c.exports=function(a){return a=void 0===a?"":a,a=null===a?"":a,a=a.toString()}}),a.register("component-type/index.js",function(a,b,c){var d=Object.prototype.toString;c.exports=function(a){switch(d.call(a)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===a?"null":void 0===a?"undefined":a!==a?"nan":a&&1===a.nodeType?"element":typeof a.valueOf()}}),a.register("list.js/index.js",function(a,b,c){!function(a,d){"use strict";var e=a.document,f=b("get-by-class"),g=b("extend"),h=b("indexof"),i=function(a,c,i){var j,k=this,l=b("./src/item")(k),m=b("./src/add-async")(k),n=b("./src/parse")(k);j={start:function(){k.listClass="list",k.searchClass="search",k.sortClass="sort",k.page=200,k.i=1,k.items=[],k.visibleItems=[],k.matchingItems=[],k.searched=!1,k.filtered=!1,k.handlers={updated:[]},k.plugins={},k.helpers={getByClass:f,extend:g,indexOf:h},g(k,c),k.listContainer="string"==typeof a?e.getElementById(a):a,k.listContainer&&(k.list=f(k.listContainer,k.listClass,!0),k.templater=b("./src/templater")(k),k.search=b("./src/search")(k),k.filter=b("./src/filter")(k),k.sort=b("./src/sort")(k),this.items(),k.update(),this.plugins())},items:function(){n(k.list),i!==d&&k.add(i)},plugins:function(){for(var a=0;af;f++){var h=null;a[f]instanceof l?(h=a[f],h.reload()):(e=k.items.length>k.page?!0:!1,h=new l(a[f],d,e)),k.items.push(h),c.push(h)}return k.update(),c},this.show=function(a,b){return this.i=a,this.page=b,k.update(),k},this.remove=function(a,b,c){for(var d=0,e=0,f=k.items.length;f>e;e++)k.items[e].values()[a]==b&&(k.templater.remove(k.items[e],c),k.items.splice(e,1),f--,e--,d++);return k.update(),d},this.get=function(a,b){for(var c=[],d=0,e=k.items.length;e>d;d++){var f=k.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return k.items.length},this.clear=function(){return k.templater.clear(),k.items=[],k},this.on=function(a,b){return k.handlers[a].push(b),k},this.off=function(a,b){var c=k.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),k},this.trigger=function(a){for(var b=k.handlers[a].length;b--;)k.handlers[a][b](k);return k},this.reset={filter:function(){for(var a=k.items,b=a.length;b--;)a[b].filtered=!1;return k},search:function(){for(var a=k.items,b=a.length;b--;)a[b].found=!1;return k}},this.update=function(){var a=k.items,b=a.length;k.visibleItems=[],k.matchingItems=[],k.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&k.matchingItems.length+1>=k.i&&k.visibleItems.lengthb;b++)j.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(j.values(a.values(),c[b]))return a.found=!0,void 0},values:function(a,c){return a.hasOwnProperty(c)&&(b=f(a[c]).toLowerCase(),""!==g&&b.search(g)>-1)?!0:!1},reset:function(){a.reset.search(),a.searched=!1}},k=function(b){return a.trigger("searchStart"),i.resetList(),i.setSearchString(b),i.setOptions(arguments),i.setColumns(),""===g?j.reset():(a.searched=!0,h?h(g,c):j.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],d.bind(e(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||k(c.value)}),d.bind(e(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&k("")}),a.helpers.toString=f,k}}),a.register("list.js/src/sort.js",function(a,b,c){var d=b("natural-sort"),e=b("classes"),f=b("events"),g=b("get-by-class"),h=b("get-attribute");c.exports=function(a){a.sortFunction=a.sortFunction||function(a,b,c){return c.desc="desc"==c.order?!0:!1,d(a.values()[c.valueName],b.values()[c.valueName],c)};var b={els:void 0,clear:function(){for(var a=0,c=b.els.length;c>a;a++)e(b.els[a]).remove("asc"),e(b.els[a]).remove("desc")},getOrder:function(a){var b=h(a,"data-order");return"asc"==b||"desc"==b?b:e(a).has("desc")?"asc":e(a).has("asc")?"desc":"asc"},getInSensitive:function(a,b){var c=h(a,"data-insensitive");b.insensitive="true"===c?!0:!1},setOrder:function(a){for(var c=0,d=b.els.length;d>c;c++){var f=b.els[c];if(h(f,"data-sort")===a.valueName){var g=h(f,"data-order");"asc"==g||"desc"==g?g==a.order&&e(f).add(a.order):e(f).add(a.order)}}}},c=function(){a.trigger("sortStart"),options={};var c=arguments[0].currentTarget||arguments[0].srcElement||void 0;c?(options.valueName=h(c,"data-sort"),b.getInSensitive(c,options),options.order=b.getOrder(c)):(options=arguments[1]||options,options.valueName=arguments[0],options.order=options.order||"asc",options.insensitive="undefined"==typeof options.insensitive?!0:options.insensitive),b.clear(),b.setOrder(options),options.sortFunction=options.sortFunction||a.sortFunction,a.items.sort(function(a,b){return options.sortFunction(a,b,options)}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=g(a.listContainer,a.sortClass),f.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),a.helpers.classes=e,a.helpers.naturalSort=d,a.helpers.events=f,a.helpers.getAttribute=h,c}}),a.register("list.js/src/item.js",function(a,b,c){c.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return e.elm.parentNode==a.list?!0:!1},f(b,c,d)}}}),a.register("list.js/src/templater.js",function(a,b,c){var d=b("get-by-class"),e=function(a){function b(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d];return null}if(-1!==b.indexOf("<")){var f=document.createElement("div");return f.innerHTML=b,f.firstChild}return document.getElementById(a.item)}var c=b(a.item),e=this;this.get=function(a,b){e.create(a);for(var c={},f=0,g=b.length;g>f;f++){var h=d(a.elm,b[f],!0);c[b[f]]=h?h.innerHTML:""}return c},this.set=function(a,b){if(!e.create(a))for(var c in b)if(b.hasOwnProperty(c)){var f=d(a.elm,c,!0);f&&("IMG"===f.tagName&&""!==b[c]?f.src=b[c]:f.innerHTML=b[c])}},this.create=function(a){if(void 0!==a.elm)return!1;var b=c.cloneNode(!0);return b.removeAttribute("id"),a.elm=b,e.set(a,a.values()),!0},this.remove=function(b){a.list.removeChild(b.elm)},this.show=function(b){e.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)}};c.exports=function(a){return new e(a)}}),a.register("list.js/src/filter.js",function(a,b,c){c.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];f.filtered=b(f)?!0:!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}}),a.register("list.js/src/add-async.js",function(a,b,c){c.exports=function(a){return function(b,c,d){var e=b.splice(0,100);d=d||[],d=d.concat(a.add(e)),b.length>0?setTimeout(function(){addAsync(b,c,d)},10):(a.update(),c(d))}}}),a.register("list.js/src/parse.js",function(a,b,c){c.exports=function(a){var c=b("./item")(a),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(b,d){for(var e=0,f=b.length;f>e;e++)a.items.push(new c(d,b[e]))},f=function(b,c){var d=b.splice(0,100);e(d,c),b.length>0?setTimeout(function(){init.items.indexAsync(b,c)},10):a.update()};return function(){var b=d(a.list),c=a.valueNames;a.indexAsync?f(b,c):e(b,c)}}}),a.alias("component-classes/index.js","list.js/deps/classes/index.js"),a.alias("component-classes/index.js","classes/index.js"),a.alias("component-indexof/index.js","component-classes/deps/indexof/index.js"),a.alias("segmentio-extend/index.js","list.js/deps/extend/index.js"),a.alias("segmentio-extend/index.js","extend/index.js"),a.alias("component-indexof/index.js","list.js/deps/indexof/index.js"),a.alias("component-indexof/index.js","indexof/index.js"),a.alias("javve-events/index.js","list.js/deps/events/index.js"),a.alias("javve-events/index.js","events/index.js"),a.alias("component-event/index.js","javve-events/deps/event/index.js"),a.alias("timoxley-to-array/index.js","javve-events/deps/to-array/index.js"),a.alias("javve-get-by-class/index.js","list.js/deps/get-by-class/index.js"),a.alias("javve-get-by-class/index.js","get-by-class/index.js"),a.alias("javve-get-attribute/index.js","list.js/deps/get-attribute/index.js"),a.alias("javve-get-attribute/index.js","get-attribute/index.js"),a.alias("javve-natural-sort/index.js","list.js/deps/natural-sort/index.js"),a.alias("javve-natural-sort/index.js","natural-sort/index.js"),a.alias("javve-to-string/index.js","list.js/deps/to-string/index.js"),a.alias("javve-to-string/index.js","list.js/deps/to-string/index.js"),a.alias("javve-to-string/index.js","to-string/index.js"),a.alias("javve-to-string/index.js","javve-to-string/index.js"),a.alias("component-type/index.js","list.js/deps/type/index.js"),a.alias("component-type/index.js","type/index.js"),"object"==typeof exports?module.exports=a("list.js"):"function"==typeof define&&define.amd?define(function(){return a("list.js")}):this.List=a("list.js")}(); \ No newline at end of file