Changeset 194
- Timestamp:
- 08/31/08 22:06:04 (4 months ago)
- Files:
-
- trunk/microfacts/public/behaviour/app/controllers/geochronopage_controller.js (modified) (1 diff)
- trunk/microfacts/public/behaviour/app/controllers/threadpage_controller.js (modified) (1 diff)
- trunk/microfacts/public/behaviour/app/views/timelineview.js (modified) (3 diffs)
- trunk/microfacts/public/behaviour/lib/moovc.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/microfacts/public/behaviour/app/controllers/geochronopage_controller.js
r193 r194 41 41 } 42 42 43 // setupPageController(GeochronoPageController); 43 // for some reason just does not work ... 44 // BaseController.createPageController('GeochronoPageController'); trunk/microfacts/public/behaviour/app/controllers/threadpage_controller.js
r186 r194 93 93 94 94 if (Environment != "test") { 95 // stub a console if it does not exist (so work if firebug is not available) 96 if (!console) { 97 var console = { 98 'log': function() { 99 }, 100 'error': function() { 101 } 102 }; 103 } 95 104 window.addEvent('domready', function () { 96 105 // using document as argument causes problems trunk/microfacts/public/behaviour/app/views/timelineview.js
r179 r194 37 37 // Substitute native 'show bubble' behaviour. 38 38 eventPainter = this.band.getEventPainter(); 39 this._oldShowBubble = eventPainter._showBubble.bind(eventPainter); 39 40 eventPainter._showBubble = this.onEventSelect.bind(this); 40 41 }, … … 63 64 }, 64 65 66 // underlying simile timeline handler 65 67 onEventSelect: function(x, y, timelineEvent) { 66 68 var factletObject = this.findFactletFromEvent(timelineEvent); … … 68 70 this.log("factlet object:"); 69 71 this.log(factletObject); 70 this.fireEvent('factletSelect', factletObject, x, y );72 this.fireEvent('factletSelect', factletObject, x, y, timelineEvent); 71 73 }, 72 74 73 onFactletSelect: function(factletObject, x, y ) {75 onFactletSelect: function(factletObject, x, y, timelineEvent) { 74 76 this.log("TimelineView: saw factletSelect event"); 75 77 this.log("factlet object:"); trunk/microfacts/public/behaviour/lib/moovc.js
r193 r194 3 3 4 4 log: function(message) { 5 //console.log(message);5 console.log(message); 6 6 }, 7 7 8 8 error: function(message) { 9 //console.error(message);9 console.error(message); 10 10 } 11 11 … … 139 139 }); 140 140 141 var setupPageController = function(controllerClass) { 142 if (Environment != "test") { 143 // define a non-functional console function for when firebug is not available 144 if (!console) { 145 var console = { 146 'log': function() { 147 }, 148 'error': function() { 149 } 150 }; 141 142 // for some reason just does not work ... 143 BaseController.createPageController = function(controllerClassName) { 144 if (Environment != "test") { 145 // define a non-functional console function for when firebug is not available 146 if (!console) { 147 var console = { 148 'log': function() { 149 }, 150 'error': function() { 151 } 152 }; 153 } 154 window.addEvent('domready', function () { 155 eval("var constructor = " + controllerClassName); 156 new constructor(document) 157 }); 151 158 } 152 window.addEvent('domready', function () {153 new controllerClass(document);154 });155 }156 159 };
