init.js 640 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //for closure compiler to ensure it gets exported
  2. window['loadApp'] = loadApp;
  3. var router = window['router'];
  4. function loadApp()
  5. {
  6. initializeRoutes();
  7. router.reload();
  8. //login and logout
  9. $('form.form-signin').submit(login);
  10. //$('#logout').click(logout);
  11. $('table.editable').editableTableWidget();
  12. $('table.editable td').on('change', function(evt, newValue)
  13. {
  14. // do something with the new cell value
  15. /* if (....) {
  16. return false; // reject change
  17. }
  18. */
  19. });
  20. loadData();
  21. }
  22. function login(e)
  23. {
  24. e.preventDefault();
  25. router('/sd');
  26. return false;
  27. }
  28. function loadData()
  29. {
  30. }
  31. function addCompany(company)
  32. {
  33. }