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
require 'execjs' | |
class HandlebarsFilter < Filter | |
class << self | |
def contents | |
@@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n") | |
end | |
def context | |
@@context ||= ExecJS.compile(contents) |
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
App.CarouselView = Em.CollectionView.extend(Luh.Ui.ScrollMixin, { | |
scrollOptions: { | |
hScroll: true, | |
vScroll: false, | |
duration: 500, | |
velocity: 0.1, | |
simultaneously: true, | |
initThreshold: 10*ScreenFactor | |
}, |
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
ScrollMixin = Em.Mixin.create({ | |
didInsertElementEnd: function() { | |
this._setup_dimensions(); | |
this._super(); | |
} | |
.......... | |
}); |
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
.swipe_item { | |
position: absolute; | |
-webkit-transform: translateZ(0); | |
top: 0px; | |
height: 100%; | |
width: 100%; | |
} | |
.swipe_slider { | |
position: relative; |
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
UI.Kit.ScrollableView = SC.CollectionView.extend({ | |
// options | |
animationDuration: 1000, | |
easing: "easeOutExpo", | |
// must be set ( pixels available) to provide elastic scroll | |
scrollableHeight: 0, | |
// options elastic |
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
<!DOCTYPE html> | |
<html> | |
<!-- NOTES | |
Demo - uses IOS native scroll available in IOS5, but sidestep the document-bounce behavior. Tested on iPad 1, using IOS 5.1. | |
This approach uses a set of 3 nested divs. | |
OuterDiv -- fixed height, width, overflow-scrolling: touch; | |
MiddleDiv -- fixed height width, overflow-scrolling: touch; fits inside OuterDiv | |
InnerDiv -- fixed height width, bigger than MiddleDiv, so it kicks in the overflow behavior |
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
/*! LAB.js v1.0.3 (c) Kyle Simpson MIT License */ | |
/* INCLUDE THE MINIFIED LAB.js CODE HERE */ | |
$LAB | |
.script('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js') | |
.wait(function(){ | |
var scripts = document.getElementsByTagName("script"), | |
src, i, len, | |
acct = "UA-XXXXX-X", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>LABjs Demo</title> | |
</head> | |
<body> | |
<!-- some stuff --> | |
<script src="/js/LAB.js"></script> |
NewerOlder