Permalink
Browse files

Fixes #17, addEventListner didn't have the final parameter

  • Loading branch information...
1 parent e1d9050 commit 5da6d6b7e97a76ad582a5e2e7b19e6887de8c542 @PaulKinlan committed May 26, 2011
@@ -40,7 +40,7 @@ var DesktopController = function() {
var categoryH2 = $("h2", category);
categories.css("marginLeft", (categories.offset().left - category.offset().left) + categoryH2.height() + 160);
- });
+ }, false);
window.addEventListener('load', function(e) {
// Switch out low-res thumbnails for hi-res with fade in effect.
@@ -68,7 +68,7 @@ var DesktopController = function() {
img.src = srcHi;
}
});
- });
+ }, false);
window.addEventListener("keyup", function(e) {
var newControl;
@@ -100,13 +100,13 @@ var DesktopController = function() {
controller.activate(newControl);
return false;
- });
+ }, false);
window.addEventListener("categorychanged", function(e) {
// Scroll to the category into views
var top = $("#" + e.data.category).offset().top;
$(".categories").scrollTop(top);
- });
+ }, false);
};
DesktopController.prototype = new BaseController();
@@ -135,9 +135,9 @@ var PhoneController = function() {
return Math.min(max,Math.max(val,min));
}
- window.addEventListener("rootchanged", onRootChanged)
- window.addEventListener("articlechanged", onArticleChanged);
- window.addEventListener("categorychanged", onCategoryChanged);
+ window.addEventListener("rootchanged", onRootChanged, false)
+ window.addEventListener("articlechanged", onArticleChanged, false);
+ window.addEventListener("categorychanged", onCategoryChanged, false);
controller.processRoutes();
$(document).ready(function() {
@@ -108,7 +108,7 @@ var TabletController = function() {
}
};
Controller_.onArticleChanged(request);*/
- });
+ }, false);
window.addEventListener('articlechanged', function(e) {
var $articles = $('.category.active .articles');
@@ -36,7 +36,7 @@ var TvController = function() {
}
};
Controller.onArticleChanged(request);
- });
+ }, false);
// Ensure article in the list of articles is visible
window.addEventListener('articlechanged', function() {
@@ -59,7 +59,7 @@ var TvController = function() {
var newScrollLeft = Math.min(0, -(scrollLeft + screenLeft));
$('.articles').css('margin-left', newScrollLeft + 'px');
}
- });
+ }, false);
var isFull = function(value) {
var body = $(document.body);
@@ -163,7 +163,7 @@ var TvController = function() {
if (!!newControl && newControl.length > 0) {
Controller.activate(newControl);
}
- });
+ }, false);
// Show placeholders for all thumbnails that didn't load
$('article > header > img.thumbnail').each(function(i, el) {

0 comments on commit 5da6d6b

Please sign in to comment.