1
0

legacy-notification.js 696 B

123456789101112131415161718192021
  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 only gets loaded if an update is available and the notifications app is not enabled for the user.
  14. */
  15. window.addEventListener('DOMContentLoaded', function(){
  16. var text = t('core', '{version} is available. Get more information on how to update.', {version: oc_updateState.updateVersion}),
  17. element = $('<a>').attr('href', oc_updateState.updateLink).attr('target','_blank').text(text);
  18. OC.Notification.showHtml(element.prop('outerHTML'), { type: 'error' });
  19. });