2015-05-03 10:28:29 +00: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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* this gets only loaded if an update is available and then shows a temporary notification
|
|
|
|
*/
|
|
|
|
$(document).ready(function(){
|
|
|
|
var head = $('html > head'),
|
2016-02-09 12:06:48 +00:00
|
|
|
version = oc_updateState.updateVersion,
|
|
|
|
docLink = oc_updateState.updateLink,
|
2015-05-03 10:28:29 +00:00
|
|
|
text = t('core', '{version} is available. Get more information on how to update.', {version: version}),
|
2016-07-05 04:59:11 +00:00
|
|
|
element = $('<a href="'+escapeHTML(docLink)+'" target="_blank">'+escapeHTML(text)+'</a>');
|
2015-05-03 10:28:29 +00:00
|
|
|
|
|
|
|
OC.Notification.showTemporary(
|
|
|
|
element,
|
|
|
|
{
|
|
|
|
isHTML: true
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|