summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification/js/legacy-notification.js
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-02-26 18:55:08 +0100
committerGitHub <noreply@github.com>2018-02-26 18:55:08 +0100
commitabb0a08ed5a7a272c4e064bf110d6aa8485bfe69 (patch)
tree6dfd53898c99aa66c39f54bae7900819695fd91c /apps/updatenotification/js/legacy-notification.js
parent8867629cf1b195b6c0e4616d8943f4fd31c42b7b (diff)
parent955e136fd9de07138a0b83a62466db86af2f48ea (diff)
downloadnextcloud-server-abb0a08ed5a7a272c4e064bf110d6aa8485bfe69.tar.gz
nextcloud-server-abb0a08ed5a7a272c4e064bf110d6aa8485bfe69.zip
Merge pull request #7933 from nextcloud/update-notification-vuejs
Migrate Update notifications to Vue.js
Diffstat (limited to 'apps/updatenotification/js/legacy-notification.js')
-rw-r--r--apps/updatenotification/js/legacy-notification.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/updatenotification/js/legacy-notification.js b/apps/updatenotification/js/legacy-notification.js
new file mode 100644
index 00000000000..d45ba8793c4
--- /dev/null
+++ b/apps/updatenotification/js/legacy-notification.js
@@ -0,0 +1,21 @@
+/**
+ * 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 only gets loaded if an update is available and the notifications app is not enabled for the user.
+ */
+$(document).ready(function(){
+ 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);
+
+ OC.Notification.showHtml(element, { type: 'error' });
+});