Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit efde6abc64fd639e8997645c8f331778f84dc34c

  • avatar
  • Sebastian Silva <sebastian @somos…car.org>
  • Mon Apr 22 06:13:46 EDT 2013
Disabled SSE to prevent Sugar shell crash
  • Diff rendering mode:
  • inline
  • side by side

sugar_network_webui/templates/base.html

399399
400 $(document).ready( function() {400 $(document).ready( function() {
401 sse = new EventSource('/my_event_source');401 sse = new EventSource('/my_event_source');
402
402 /*
403 sse.onmessage = function(message) {403 sse.onmessage = function(message) {
404 data = $.parseJSON(message.data);404 data = $.parseJSON(message.data);
405 if (data.event=="inline" && data.state=="offline") {405 if (data.event=="inline" && data.state=="offline") {
414 // location.reload();414 // location.reload();
415 // TODO: proper ajaxy reload415 // TODO: proper ajaxy reload
416 }416 }
417 /* TODO: Handle these
417 // TODO: Handle these
418 if (data.event=="push") {418 if (data.event=="push") {
419 toastr.info('Sugar Network is synchronized.');419 toastr.info('Sugar Network is synchronized.');
420 }420 }
421 if (data.event=="create") {421 if (data.event=="create") {
422 toastr.warning('New ' + data.props.type[0]);422 toastr.warning('New ' + data.props.type[0]);
423 }423 }
424 console.log('A message has arrived!');*/
424 console.log('A message has arrived!');
425 }425 }
426 */
426427
427 $( "#sn-button" ).tooltip({position:"bottom right", offset:[-3,-60], predelay:500});428 $( "#sn-button" ).tooltip({position:"bottom right", offset:[-3,-60], predelay:500});
428 $( "#browser-button" ).tooltip({position:"bottom right", offset:[-3,-60], predelay:500});429 $( "#browser-button" ).tooltip({position:"bottom right", offset:[-3,-60], predelay:500});