notification.js 699 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * Copyright (c) 2015 ownCloud Inc
  3. *
  4. * @author Morris Jobke <hey@morrisjobke.de>
  5. *
  6. * This file is licensed under the Affero General Public License version 3
  7. * or later.
  8. *
  9. * See the COPYING-README file.
  10. *
  11. */
  12. /**
  13. * this gets only loaded if an update is available and then shows a temporary notification
  14. */
  15. $(document).ready(function(){
  16. var head = $('html > head'),
  17. version = oc_updateState.updateVersion,
  18. docLink = oc_updateState.updateLink,
  19. text = t('core', '{version} is available. Get more information on how to update.', {version: version}),
  20. element = $('<a>').attr('href', docLink).text(text);
  21. OC.Notification.showTemporary(
  22. element,
  23. {
  24. isHTML: true
  25. }
  26. );
  27. });