diff --git a/Gruntfile.js b/Gruntfile.js index e10e268..b3df8d2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,7 +29,7 @@ module.exports = function( grunt ) { options: { baseUrl: 'bower_components', include: [ - 'jquery-bridget/jquery.bridget', + 'jquery-bridget/jquery-bridget', 'isotope/js/isotope' ], out: 'dist/isotope.pkgd.js', diff --git a/bower.json b/bower.json index f4e9edb..9c78ebb 100644 --- a/bower.json +++ b/bower.json @@ -1,24 +1,17 @@ { "name": "isotope", - "version": "2.2.2", "description": "Filter and sort magical layouts", "main": "js/isotope.js", "dependencies": { - "get-size": "~1.2.2", - "matches-selector": "~1.0.2", - "outlayer": "~1.4.1", - "masonry": "~3.3.0", - "fizzy-ui-utils": "~1.0.1" + "get-size": "~2.0.0", + "desandro-matches-selector": "~2.0.0", + "outlayer": "~2.0.0", + "masonry": "~4.0.0", + "fizzy-ui-utils": "~2.0.0" }, "devDependencies": { - "doc-ready": "1.x", - "isotope-cells-by-column": "1.x", - "isotope-cells-by-row": "1.x", - "isotope-fit-columns": "1.x", - "isotope-horizontal": "1.x", - "isotope-masonry-horizontal": "1.x", - "jquery": ">=1.4.3 <2", - "jquery-bridget": "1.1.x", + "jquery": "2 < 4", + "jquery-bridget": "^2", "qunit": "^1.15" }, "ignore": [ diff --git a/js/isotope.js b/js/isotope.js index c8b9a0b..64b4d65 100644 --- a/js/isotope.js +++ b/js/isotope.js @@ -1,11 +1,11 @@ /*! - * Isotope v2.2.2 + * Isotope v3.0.0-beta1 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * * http://isotope.metafizzy.co - * Copyright 2015 Metafizzy + * Copyright 2016 Metafizzy */ ( function( window, factory ) { @@ -17,7 +17,7 @@ define( [ 'outlayer/outlayer', 'get-size/get-size', - 'matches-selector/matches-selector', + 'desandro-matches-selector/matches-selector', 'fizzy-ui-utils/utils', './item', './layout-mode', diff --git a/package.json b/package.json index 2c408d5..8520395 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "isotope-layout", - "version": "2.2.2", + "version": "3.0.0-beta1", "description": "Filter and sort magical layouts", "main": "js/isotope.js", "dependencies": { diff --git a/sandbox/basic.html b/sandbox/basic.html index 8c7efbd..34046f6 100644 --- a/sandbox/basic.html +++ b/sandbox/basic.html @@ -36,13 +36,9 @@
- - - - + - - + @@ -53,11 +49,9 @@ diff --git a/sandbox/bottom-up.html b/sandbox/bottom-up.html index b03ce8a..16c7f56 100644 --- a/sandbox/bottom-up.html +++ b/sandbox/bottom-up.html @@ -78,14 +78,9 @@
- - - - - + - - + @@ -98,31 +93,28 @@ diff --git a/sandbox/cells-by-row.html b/sandbox/cells-by-row.html index 7810e25..9a22ff7 100644 --- a/sandbox/cells-by-row.html +++ b/sandbox/cells-by-row.html @@ -144,13 +144,10 @@ - - - - + - - + + diff --git a/sandbox/combination-filters-inclusive.html b/sandbox/combination-filters-inclusive.html index 8bf55ed..dc13e74 100644 --- a/sandbox/combination-filters-inclusive.html +++ b/sandbox/combination-filters-inclusive.html @@ -198,13 +198,10 @@ - - - - + - - + + diff --git a/sandbox/combination-filters.html b/sandbox/combination-filters.html index 7b77210..632f6f5 100644 --- a/sandbox/combination-filters.html +++ b/sandbox/combination-filters.html @@ -198,13 +198,10 @@ - - - - + - - + + @@ -233,6 +230,7 @@ $( function() { var filterGroup = $buttonGroup.attr('data-filter-group'); // set filter for group filters[ filterGroup ] = $this.attr('data-filter'); + // combine filters var filterValue = ''; for ( var prop in filters ) { @@ -245,9 +243,9 @@ $( function() { // change is-checked class on buttons $('.button-group').each( function( i, buttonGroup ) { var $buttonGroup = $( buttonGroup ); - $buttonGroup.on( 'click', 'button', function() { + $buttonGroup.on( 'click', 'button', function( event ) { $buttonGroup.find('.is-checked').removeClass('is-checked'); - $( this ).addClass('is-checked'); + $( event.currentTarget ).addClass('is-checked'); }); }); diff --git a/sandbox/filter-sort.html b/sandbox/filter-sort.html index 5479527..d50f9ab 100644 --- a/sandbox/filter-sort.html +++ b/sandbox/filter-sort.html @@ -141,13 +141,9 @@ - - - - + - - + @@ -161,66 +157,60 @@ diff --git a/sandbox/fitrows.html b/sandbox/fitrows.html index dd8d756..99a07c8 100644 --- a/sandbox/fitrows.html +++ b/sandbox/fitrows.html @@ -89,13 +89,9 @@
- - - - + - - + @@ -106,30 +102,29 @@ diff --git a/sandbox/fluid.html b/sandbox/fluid.html index ec384ce..8be3346 100644 --- a/sandbox/fluid.html +++ b/sandbox/fluid.html @@ -54,13 +54,9 @@
- - - - + - - + @@ -73,14 +69,12 @@ diff --git a/sandbox/horizontal-layout-modes.html b/sandbox/horizontal-layout-modes.html index 26020c7..a14c902 100644 --- a/sandbox/horizontal-layout-modes.html +++ b/sandbox/horizontal-layout-modes.html @@ -147,13 +147,10 @@ - - - - + - - + + diff --git a/sandbox/insert.html b/sandbox/insert.html index 13bfaf9..9a28385 100644 --- a/sandbox/insert.html +++ b/sandbox/insert.html @@ -30,13 +30,9 @@
55
- - - - + - - + @@ -50,68 +46,54 @@ diff --git a/sandbox/jquery.html b/sandbox/jquery.html index 7f4eed9..6865f95 100644 --- a/sandbox/jquery.html +++ b/sandbox/jquery.html @@ -143,15 +143,12 @@ - + - - - - + - - + + diff --git a/sandbox/js/require-js.js b/sandbox/js/require-js.js index 68d2918..7236371 100644 --- a/sandbox/js/require-js.js +++ b/sandbox/js/require-js.js @@ -43,7 +43,7 @@ requirejs.config({ requirejs( [ 'jquery', 'isotope/js/isotope', - 'jquery-bridget/jquery.bridget' + 'jquery-bridget/jquery-bridget' ], function( $, Isotope ) { $.bridget( 'isotope', Isotope ); @@ -68,7 +68,7 @@ requirejs.config({ requirejs( [ 'require', 'jquery', '../dist/isotope.pkgd.js' ], function( require, $, Isotope ) { require( [ - 'jquery-bridget/jquery.bridget' + 'jquery-bridget/jquery-bridget' ], function() { $.bridget( 'isotope', Isotope ); diff --git a/sandbox/masonry-horizontal.html b/sandbox/masonry-horizontal.html index ffa0052..4880a51 100644 --- a/sandbox/masonry-horizontal.html +++ b/sandbox/masonry-horizontal.html @@ -176,13 +176,10 @@ - - - - + - - + + diff --git a/sandbox/masonry.html b/sandbox/masonry.html index 6ba856e..350a767 100644 --- a/sandbox/masonry.html +++ b/sandbox/masonry.html @@ -145,13 +145,9 @@ - - - - + - - + @@ -164,47 +160,40 @@ diff --git a/sandbox/right-to-left.html b/sandbox/right-to-left.html index 6dcb679..160cc7e 100644 --- a/sandbox/right-to-left.html +++ b/sandbox/right-to-left.html @@ -79,13 +79,9 @@
- - - - + - - + @@ -97,31 +93,29 @@ diff --git a/sandbox/sorting.html b/sandbox/sorting.html index af7490e..6db02d1 100644 --- a/sandbox/sorting.html +++ b/sandbox/sorting.html @@ -132,13 +132,10 @@ - - - - + - - + + @@ -149,63 +146,53 @@ - - - diff --git a/sandbox/stamps.html b/sandbox/stamps.html index a7d19d0..5d571e5 100644 --- a/sandbox/stamps.html +++ b/sandbox/stamps.html @@ -83,12 +83,9 @@
- - - - + - + @@ -100,33 +97,24 @@ diff --git a/sandbox/transition-bug.html b/sandbox/transition-bug.html index d8eb37a..2571596 100644 --- a/sandbox/transition-bug.html +++ b/sandbox/transition-bug.html @@ -35,13 +35,10 @@ - - - - + - - + + @@ -53,7 +50,7 @@ diff --git a/test/filtering.js b/test/filtering.js index 9f97d4d..4fb8fb3 100644 --- a/test/filtering.js +++ b/test/filtering.js @@ -47,7 +47,7 @@ test( 'filtering', function() { iso.arrange({ filter: function( elem ) { - var num = parseInt( getText( elem ), 10 ); + var num = parseInt( elem.textContent, 10 ); return num > 5; } }); diff --git a/test/helpers.js b/test/helpers.js index 6e2294c..19d2c9f 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -5,15 +5,4 @@ // ----- default layout mode ----- // Isotope.defaults.layoutMode = 'fitRows'; -// ----- getText ----- // -var docElem = document.documentElement; - -window.getText = docElem.textContent ? - function( elem ) { - return elem.textContent; - } : - function( elem ) { - return elem.innerText; - }; - })(); diff --git a/test/index.html b/test/index.html index 40ac1ba..5b56997 100644 --- a/test/index.html +++ b/test/index.html @@ -12,13 +12,10 @@ - - - - + - - + + diff --git a/test/sorting.js b/test/sorting.js index 6c0dacf..d4d1a18 100644 --- a/test/sorting.js +++ b/test/sorting.js @@ -3,11 +3,9 @@ 'use strict'; function getItemsText( iso ) { - var texts = []; - for ( var i=0, len = iso.filteredItems.length; i < len; i++ ) { - var item = iso.filteredItems[i]; - texts.push( getText( item.element ) ); - } + var texts = iso.filteredItems.map( function( item ) { + return item.element.textContent; + }) return texts.join(','); }