Permalink
Browse files

[FIX] fix a bug due to a wrong refactoring

  • Loading branch information...
1 parent 6d281d2 commit dee36263809a58bfb093108ec54e1d8a29bd4a91 Claude Bossy committed May 11, 2012
Showing with 13 additions and 3 deletions.
  1. +10 −3 indicomobile/static/js/routes.js
  2. +3 −0 indicomobile/static/js/view/TimetableView.js
View
13 indicomobile/static/js/routes.js
@@ -155,7 +155,7 @@ var Router = Backbone.Router.extend({
var sessionId = infoSplitted[1];
var day = infoSplitted[2];
- var container = $('#sessionDay_list_' + info);
+ var container;
if ($('#sessionDay_' + info).length === 0){
var create = true;
@@ -180,6 +180,8 @@ var Router = Backbone.Router.extend({
agenda: agenda
});
sessionDayView.render();
+
+ container = $('#sessionDay_list_' + info);
container.data('contributions', contributions);
container.data('part', 0);
container.data('lastTime', '');
@@ -205,6 +207,7 @@ var Router = Backbone.Router.extend({
}
else{
$.mobile.changePage('#sessionDay_' + info);
+ container = $('#sessionDay_list_' + info);
$(window).on('scroll', function() {
if(container.data('part') != -1 &&
$(window).scrollTop() + $(window).height() >= $('#sessionDay_' + info).height()-150) {
@@ -273,7 +276,7 @@ var Router = Backbone.Router.extend({
}
var eventId = infoSplitted[0];
var dayDate = infoSplitted[1];
- var container = $('#day_list_' + info);
+ var container;
if ($('#timetableDay_' + info).length === 0){
var create = true;
@@ -296,6 +299,7 @@ var Router = Backbone.Router.extend({
else{
contributions = getDayContributions(eventId, dayDate);
}
+ container = $('#day_list_' + info);
container.data('part', 0);
container.data('lastTime', '');
container.data('lastPosterTime', '');
@@ -323,6 +327,7 @@ var Router = Backbone.Router.extend({
}
else {
$.mobile.changePage('#timetableDay_' + info);
+ container = $('#day_list_' + info);
$(window).on('scroll', function() {
if($('#day_list_' + info).data('part') != -1 &&
$(window).scrollTop() + $(window).height() >= $('#timetableDay_' + info).height()-150) {
@@ -344,7 +349,7 @@ var Router = Backbone.Router.extend({
}
var create = true;
- var container = $('#speakers_list_' + info);
+ var container;
if ($('#speakers_' + info).length === 0){
var eventId = infoSplitted[0];
var speakers;
@@ -380,6 +385,7 @@ var Router = Backbone.Router.extend({
});
speakersPageView.render();
+ container = $('#speakers_list_' + info);
container.data('part', 0);
container.data('firstLetter', '');
container.data('speakers', speakers);
@@ -406,6 +412,7 @@ var Router = Backbone.Router.extend({
}
else{
$.mobile.changePage('#speakers_' + info);
+ container = $('#speakers_list_' + info);
$(window).on('scroll', function() {
if(container.data('part') != -1 &&
$(window).scrollTop() + $(window).height() >= $('#speakers_' + info).height()-150) {
View
3 indicomobile/static/js/view/TimetableView.js
@@ -126,6 +126,9 @@ var TimetableDayContributionsView = Backbone.View.extend({
listView = $(this.el),
part = container.data('part');
+
+ console.log(contributions)
+
contributions.comparator = function(contribution){
return contribution.get('startDate').time;
};

0 comments on commit dee3626

Please sign in to comment.