summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.base.php6
-rw-r--r--core/templates/layout.guest.php11
-rw-r--r--core/templates/layout.user.php25
-rw-r--r--core/templates/login.php7
-rw-r--r--core/templates/update.php26
5 files changed, 10 insertions, 65 deletions
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index cb2f9773839..47fb75612cf 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -7,11 +7,7 @@
<?php foreach ($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
- <script type="text/javascript">
- var oc_debug = <?php echo (defined('DEBUG') && DEBUG) ? 'true' : 'false'; ?>;
- var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
- var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- </script>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
<?php foreach ($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 5b39503474d..9aabc08acec 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -3,19 +3,12 @@
<head>
<title>ownCloud</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="apple-itunes-app" content="app-id=543672169">
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
<?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
- <script type="text/javascript">
- var oc_debug = <?php echo (defined('DEBUG') && DEBUG) ? 'true' : 'false'; ?>;
- var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
- var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- var datepickerFormatDate = <?php echo json_encode($l->l('jsdate', 'jsdate')) ?>;
- var dayNames = <?php echo json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))) ?>;
- var monthNames = <?php echo json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))) ?>;
- var firstDay = <?php echo json_encode($l->l('firstday', 'firstday')) ?>;
- </script>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 3337449a6c0..2886c3c5a2e 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -3,31 +3,15 @@
<head>
<title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getDisplayName()?' ('.OC_Util::sanitizeHTML(OC_User::getDisplayName()).') ':'' ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="apple-itunes-app" content="app-id=543672169">
<link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" />
<?php foreach($_['cssfiles'] as $cssfile): ?>
<link rel="stylesheet" href="<?php echo $cssfile; ?>" type="text/css" media="screen" />
<?php endforeach; ?>
- <script type="text/javascript">
- var oc_debug = <?php echo (defined('DEBUG') && DEBUG) ? 'true' : 'false'; ?>;
- var oc_webroot = '<?php echo OC::$WEBROOT; ?>';
- var oc_appswebroots = <?php echo $_['apps_paths'] ?>;
- var oc_current_user = '<?php echo OC_User::getUser() ?>';
- var oc_requesttoken = '<?php echo $_['requesttoken']; ?>';
- var datepickerFormatDate = <?php echo json_encode($l->l('jsdate', 'jsdate')) ?>;
- var dayNames = <?php echo json_encode(array((string)$l->t('Sunday'), (string)$l->t('Monday'), (string)$l->t('Tuesday'), (string)$l->t('Wednesday'), (string)$l->t('Thursday'), (string)$l->t('Friday'), (string)$l->t('Saturday'))) ?>;
- var monthNames = <?php echo json_encode(array((string)$l->t('January'), (string)$l->t('February'), (string)$l->t('March'), (string)$l->t('April'), (string)$l->t('May'), (string)$l->t('June'), (string)$l->t('July'), (string)$l->t('August'), (string)$l->t('September'), (string)$l->t('October'), (string)$l->t('November'), (string)$l->t('December'))) ?>;
- var firstDay = <?php echo json_encode($l->l('firstday', 'firstday')) ?>;
- </script>
+ <script type="text/javascript" src="<?php echo OC_Helper::linkToRoute('js_config');?>"></script>
<?php foreach($_['jsfiles'] as $jsfile): ?>
<script type="text/javascript" src="<?php echo $jsfile; ?>"></script>
<?php endforeach; ?>
- <script type="text/javascript">
- requesttoken = '<?php echo $_['requesttoken']; ?>';
- OC.EventSource.requesttoken=requesttoken;
- $(document).bind('ajaxSend', function(elm, xhr, s) {
- xhr.setRequestHeader('requesttoken', requesttoken);
- });
- </script>
<?php foreach($_['headers'] as $header): ?>
<?php
echo '<'.$header['tag'].' ';
@@ -40,7 +24,10 @@
</head>
<body id="<?php echo $_['bodyid'];?>">
- <header><div id="header">
+ <div id="notification-container">
+ <div id="notification"></div>
+ </div>
+ <header><div id="header">
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a>
<a class="header-right header-action" id="logout" href="<?php echo link_to('', 'index.php'); ?>?logout=true"><img class="svg" alt="<?php echo $l->t('Log out');?>" title="<?php echo $l->t('Log out'); echo OC_User::getUser()?' ('.OC_User::getUser().') ':'' ?>" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></a>
<form class="searchbox header-right" action="#" method="post">
diff --git a/core/templates/login.php b/core/templates/login.php
index 43e45997803..c82d2cafa2e 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -41,10 +41,5 @@
<input type="submit" id="submit" class="login primary" value="<?php echo $l->t('Log in'); ?>"/>
</fieldset>
</form>
-<script>
- $(document).ready(function () {
- var visitortimezone = (-new Date().getTimezoneOffset() / 60);
- $('#timezone-offset').val(visitortimezone);
- });
+<?php OCP\Util::addscript('core', 'visitortimezone'); ?>
-</script>
diff --git a/core/templates/update.php b/core/templates/update.php
index c9f3144f257..ae714dcfb92 100644
--- a/core/templates/update.php
+++ b/core/templates/update.php
@@ -3,29 +3,3 @@
<?php echo $l->t('Updating ownCloud to version %s, this may take a while.', array($_['version'])); ?><br /><br />
</li>
</ul>
-<script>
- $(document).ready(function () {
- OC.EventSource.requesttoken = oc_requesttoken;
- var updateEventSource = new OC.EventSource(OC.webroot+'/core/ajax/update.php');
- updateEventSource.listen('success', function(message) {
- $('<span>').append(message).append('<br />').appendTo($('.update'));
- });
- updateEventSource.listen('error', function(message) {
- $('<span>').addClass('error').append(message).append('<br />').appendTo($('.update'));
- });
- updateEventSource.listen('failure', function(message) {
- $('<span>').addClass('error').append(message).append('<br />').appendTo($('.update'));
- $('<span>')
- .addClass('error bold')
- .append('<br />')
- .append(t('core', 'The update was unsuccessful. Please report this issue to the <a href="https://github.com/owncloud/core/issues" target="_blank">ownCloud community</a>.'))
- .appendTo($('.update'));
- });
- updateEventSource.listen('done', function(message) {
- $('<span>').addClass('bold').append('<br />').append(t('core', 'The update was successful. Redirecting you to ownCloud now.')).appendTo($('.update'));
- setTimeout(function () {
- window.location.href = OC.webroot;
- }, 3000);
- });
- });
-</script> \ No newline at end of file