update-notification.js 697 B

12345678910111213141516171819202122232425262728293031
  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 = head.data('update-version'),
  18. docLink = head.data('update-link'),
  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. });