app.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. var App = (function(lng, undefined) {
  2. eventConsole = function(event) {
  3. $$('#touchevents-console').html($$(event.target).data('event'));
  4. };
  5. triggerCapture = function(event) {
  6. event.stopPropagation();
  7. lng.Notification.success("Event: " + event.type, "Layout events manager", "info", 2);
  8. };
  9. environment = function(event) {
  10. var environment = lng.Core.environment();
  11. var el = lng.dom("section > article#environment");
  12. if (environment.os) {
  13. el.find("#os > strong").html(environment.os.name);
  14. el.find("#os > small").html(environment.os.version);
  15. }
  16. el.find("#resolution > strong").html(environment.screen.height + "p x " + environment.screen.width + "p");
  17. el.find("#navigator > strong").html(environment.browser);
  18. el.find("#navigator > small").html("Mobile: " + environment.isMobile);
  19. };
  20. return {
  21. eventConsole: eventConsole,
  22. triggerCapture: triggerCapture,
  23. environment: environment
  24. };
  25. })(Lungo);