You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

update-notification.js 697B

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 = 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. });