diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-02-09 13:06:48 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-02-09 18:05:51 +0100 |
commit | abc675d87e6ffc49fad608d5b2e8d280e385cc61 (patch) | |
tree | 558a752af5c3d9936cbd597ea76607f57e22c32c /core | |
parent | 29820176825c41acef30fa6942922aeb36cfcec3 (diff) | |
download | nextcloud-server-abc675d87e6ffc49fad608d5b2e8d280e385cc61.tar.gz nextcloud-server-abc675d87e6ffc49fad608d5b2e8d280e385cc61.zip |
Move update notification code into app
Moves the update notification code in a single app. This is required since we want to use SSO for the new updater and for this have some code running in ownCloud as well (and we don't want that in core neccessarily). This app can provide that in the future, right now it's only the update notification itself. Will continue working on the SSO right away but wanted to keep the PR small.
Furthermore also makes some more code unit-testable...
Diffstat (limited to 'core')
-rw-r--r-- | core/js/update-notification.js | 30 | ||||
-rw-r--r-- | core/shipped.json | 2 | ||||
-rw-r--r-- | core/templates/layout.user.php | 6 |
3 files changed, 2 insertions, 36 deletions
diff --git a/core/js/update-notification.js b/core/js/update-notification.js deleted file mode 100644 index 42baa7f4c28..00000000000 --- a/core/js/update-notification.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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 = head.data('update-version'), - docLink = head.data('update-link'), - 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 - } - ); -}); - diff --git a/core/shipped.json b/core/shipped.json index b74f2f28c47..d15f3ba3ca3 100644 --- a/core/shipped.json +++ b/core/shipped.json @@ -31,7 +31,7 @@ "sharepoint", "systemtags", "templateeditor", - "updater", + "updatenotification", "user_external", "user_ldap", "user_shibboleth", diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 7905f5b7f3a..f79defe100e 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -2,11 +2,7 @@ <!--[if lte IE 8]><html class="ng-csp ie ie8 lte9 lte8" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]--> <!--[if IE 9]><html class="ng-csp ie ie9 lte9" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><![endif]--> <!--[if (gt IE 9)|!(IE)]><!--><html class="ng-csp" data-placeholder-focus="false" lang="<?php p($_['language']); ?>" ><!--<![endif]--> - <head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>" - <?php if ($_['updateAvailable']): ?> - data-update-version="<?php p($_['updateVersion']); ?>" data-update-link="<?php p($_['updateLink']); ?>" - <?php endif; ?> - > + <head data-user="<?php p($_['user_uid']); ?>" data-user-displayname="<?php p($_['user_displayname']); ?>" data-requesttoken="<?php p($_['requesttoken']); ?>"> <meta charset="utf-8"> <title> <?php |