events.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. App.Events = (function(lng, undefined) {
  2. /*
  3. lng.ready(function() {
  4. });
  5. */
  6. lng.dom('#test header a.blue').tap(function(event) {
  7. App.Services.mockProfiles();
  8. });
  9. lng.dom('#test header a.red').tap(function(event) {
  10. var lista = '<li class="selectable">\
  11. <img src="assets/images/avatars/1.jpg">\
  12. <div class="onright">Profile nº1</div>\
  13. Profile nº1<small>Description nº1</small>\
  14. </li>';
  15. lng.dom('#list-added_list').append(lista);
  16. lng.View.Scroll.refresh('list-added');
  17. });
  18. lng.dom('article#list-added li').tap(function(event) {
  19. $$(this).remove();
  20. lng.View.Scroll.refresh('list-added');
  21. });
  22. //SPECIAL
  23. $$('section#next').on('load', function(event) {
  24. console.error('Load #navigation', event);
  25. lng.Router.article('#next', '#files');
  26. });
  27. $$('section#next').on('unload', function(event) {
  28. console.error('Unload', event);
  29. });
  30. })(LUNGO);