/src/main/webapp/public/js/users/activate.js

http://thoughtsite.googlecode.com/ · JavaScript · 32 lines · 11 code · 2 blank · 19 comment · 2 complexity · a65a032b895c0bea73dcee86b0a1ba0a MD5 · raw file

  1. /* Copyright 2010 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS.
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License
  14. */
  15. /**
  16. * file is responsible to handle all javascript tasks on home page
  17. * require jquery 1.3.2
  18. */
  19. // onload set form focus validations
  20. google.setOnLoadCallback(function() {
  21. ie.Login.setLoggedinUserCallback('activate');
  22. });
  23. function activate (isUserLoggedIn) {
  24. if(isUserLoggedIn) {
  25. location.href = ie.buildUrl(ie.config.REQUEST_IDEA_EXCHANGE, 'projects/show/' + PROJECT_KEY);
  26. }
  27. else {
  28. $('#activateLogin').show();
  29. }
  30. }