forked from IntelliHome/Google-at-Home
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WebUI IntelliHome#7] Modified js script and update js libs
- Loading branch information
skullbocks
committed
Jul 21, 2014
1 parent
47c0bec
commit 7f79f75
Showing
9 changed files
with
117 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(function (window, $, undefined) { | ||
|
||
$(document).ready(function() { | ||
var $container = $('.iso,#iso'); | ||
|
||
// Fire Isotope only when images are loaded | ||
$container.imagesLoaded(function(){ | ||
$container.isotope({ | ||
itemSelector : '.post', | ||
masonry: { | ||
isFitWidth: true, | ||
} | ||
}); | ||
}); | ||
$("[rel='tooltip']").tooltip(); | ||
$('.tile_detail').hammer({}).on("tap", function(event) { | ||
if ( $(this).find('.caption').is( ":hidden" ) ) { | ||
$(this).find('.caption').slideDown( 250 ); | ||
} else { | ||
$(this).find('.caption').slideUp( 250 ); | ||
} | ||
}); | ||
$('.tile_detail').hover(function(){ | ||
$(this).find('.caption').slideDown(250); | ||
}, | ||
function(){ | ||
$(this).find('.caption').slideUp(250); | ||
} | ||
); | ||
}); | ||
})(window, jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/*! | ||
* fitColumns layout mode for Isotope | ||
* http://isotope.metafizzy.co | ||
*/ | ||
|
||
( function( window ) { | ||
|
||
'use strict'; | ||
|
||
function fitColumnsDefinition( LayoutMode ) { | ||
|
||
var FitColumns = LayoutMode.create('fitColumns'); | ||
|
||
FitColumns.prototype._resetLayout = function() { | ||
this.x = 0; | ||
this.y = 0; | ||
this.maxX = 0; | ||
}; | ||
|
||
FitColumns.prototype._getItemLayoutPosition = function( item ) { | ||
item.getSize(); | ||
|
||
// if this element cannot fit in the current row | ||
if ( this.y !== 0 && item.size.outerHeight + this.y > this.isotope.size.innerHeight ) { | ||
this.y = 0; | ||
this.x = this.maxX; | ||
} | ||
|
||
var position = { | ||
x: this.x, | ||
y: this.y | ||
}; | ||
|
||
this.maxX = Math.max( this.maxX, this.x + item.size.outerWidth ); | ||
this.y += item.size.outerHeight; | ||
|
||
return position; | ||
}; | ||
|
||
FitColumns.prototype._getContainerSize = function() { | ||
return { width: this.maxX }; | ||
}; | ||
|
||
FitColumns.prototype.needsResizeLayout = function() { | ||
return this.needsVerticalResizeLayout(); | ||
}; | ||
|
||
return FitColumns; | ||
|
||
} | ||
|
||
if ( typeof define === 'function' && define.amd ) { | ||
// AMD | ||
define( [ | ||
'isotope/js/layout-mode' | ||
], | ||
fitColumnsDefinition ); | ||
} else { | ||
// browser global | ||
fitColumnsDefinition( | ||
window.Isotope.LayoutMode | ||
); | ||
} | ||
|
||
})( window ); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.