2015-05-03 13:28:29 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015 ownCloud Inc
|
|
|
|
*
|
|
|
|
* @author Morris Jobke <hey@morrisjobke.de>
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3
|
|
|
|
* or later.
|
|
|
|
*
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-01-17 16:55:48 +03:00
|
|
|
* This only gets loaded if an update is available and the notifications app is not enabled for the user.
|
2015-05-03 13:28:29 +03:00
|
|
|
*/
|
2020-07-20 13:30:35 +03:00
|
|
|
window.addEventListener('DOMContentLoaded', function(){
|
2016-10-10 14:55:27 +03:00
|
|
|
var text = t('core', '{version} is available. Get more information on how to update.', {version: oc_updateState.updateVersion}),
|
|
|
|
element = $('<a>').attr('href', oc_updateState.updateLink).attr('target','_blank').text(text);
|
2015-05-03 13:28:29 +03:00
|
|
|
|
2020-10-04 16:51:44 +03:00
|
|
|
OC.Notification.showHtml(element.prop('outerHTML'), { type: 'error' });
|
2015-05-03 13:28:29 +03:00
|
|
|
});
|