diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-02-09 18:22:20 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-09 18:22:20 +0100 |
commit | a39c7591d6b0bfcb323cd14a5c1164576eaf7559 (patch) | |
tree | 558a752af5c3d9936cbd597ea76607f57e22c32c /apps/updatenotification/js | |
parent | 29820176825c41acef30fa6942922aeb36cfcec3 (diff) | |
parent | abc675d87e6ffc49fad608d5b2e8d280e385cc61 (diff) | |
download | nextcloud-server-a39c7591d6b0bfcb323cd14a5c1164576eaf7559.tar.gz nextcloud-server-a39c7591d6b0bfcb323cd14a5c1164576eaf7559.zip |
Merge pull request #22238 from owncloud/add-link-to-updater
Move update notification code into app
Diffstat (limited to 'apps/updatenotification/js')
-rw-r--r-- | apps/updatenotification/js/notification.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/apps/updatenotification/js/notification.js b/apps/updatenotification/js/notification.js new file mode 100644 index 00000000000..9d22bcb2309 --- /dev/null +++ b/apps/updatenotification/js/notification.js @@ -0,0 +1,30 @@ +/** + * 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'), + version = oc_updateState.updateVersion, + docLink = oc_updateState.updateLink, + text = t('core', '{version} is available. Get more information on how to update.', {version: version}), + element = $('<a>').attr('href', docLink).text(text); + + OC.Notification.showTemporary( + element, + { + isHTML: true + } + ); +}); + |