diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-28 19:36:21 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-28 19:36:21 +0100 |
commit | 3bafa87a1223d18e7f772c9551f17aaf7bcc7abb (patch) | |
tree | 30c0b4ee3ba330ebed4effa332b946c61e6d418e /core/templates | |
parent | feb65c89f2780220bb560a8f63c7dc6ac94602b0 (diff) | |
parent | 06c1c35ac90f7920afa637ab0b628529b4135d40 (diff) | |
download | nextcloud-server-3bafa87a1223d18e7f772c9551f17aaf7bcc7abb.tar.gz nextcloud-server-3bafa87a1223d18e7f772c9551f17aaf7bcc7abb.zip |
merge styles
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/layout.base.php | 7 | ||||
-rw-r--r-- | core/templates/layout.guest.php | 12 | ||||
-rw-r--r-- | core/templates/layout.user.php | 25 | ||||
-rw-r--r-- | core/templates/login.php | 7 | ||||
-rw-r--r-- | core/templates/update.php | 26 |
5 files changed, 10 insertions, 67 deletions
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php index 47f4b423b3e..47fb75612cf 100644 --- a/core/templates/layout.base.php +++ b/core/templates/layout.base.php @@ -7,12 +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_appswebroots = <?php echo $_['apps_paths'] ?>; - 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 8395426e4e4..9aabc08acec 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -3,20 +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_appswebroots = <?php echo $_['apps_paths'] ?>; - 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 93cf494163b..93c8fa77245 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::getUser()?' ('.OC_User::getUser().') ':'' ?></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> <ul id="settings" class="svg"> 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 |