@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | <link rel="icon" href="<?php print_unescaped(image_path('', 'favicon.ico')); /* IE11+ supports png */ ?>"> |
14 | 14 | <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>"> |
15 | 15 | <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>"> |
16 | - <?php foreach($_['cssfiles'] as $cssfile): ?> |
|
16 | + <?php foreach ($_['cssfiles'] as $cssfile): ?> |
|
17 | 17 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>"> |
18 | 18 | <?php endforeach; ?> |
19 | - <?php foreach($_['printcssfiles'] as $cssfile): ?> |
|
19 | + <?php foreach ($_['printcssfiles'] as $cssfile): ?> |
|
20 | 20 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print"> |
21 | 21 | <?php endforeach; ?> |
22 | 22 | <?php if (isset($_['inline_ocjs'])): ?> |
@@ -24,16 +24,16 @@ discard block |
||
24 | 24 | <?php print_unescaped($_['inline_ocjs']); ?> |
25 | 25 | </script> |
26 | 26 | <?php endif; ?> |
27 | - <?php foreach($_['jsfiles'] as $jsfile): ?> |
|
27 | + <?php foreach ($_['jsfiles'] as $jsfile): ?> |
|
28 | 28 | <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script> |
29 | 29 | <?php endforeach; ?> |
30 | 30 | <?php print_unescaped($_['headers']); ?> |
31 | 31 | </head> |
32 | - <body id="<?php p($_['bodyid']);?>"> |
|
32 | + <body id="<?php p($_['bodyid']); ?>"> |
|
33 | 33 | <?php include('layout.noscript.warning.php'); ?> |
34 | 34 | <div class="wrapper"> |
35 | 35 | <div class="v-align"> |
36 | - <?php if ($_['bodyid'] === 'body-login' ): ?> |
|
36 | + <?php if ($_['bodyid'] === 'body-login'): ?> |
|
37 | 37 | <header role="banner"> |
38 | 38 | <div id="header"> |
39 | 39 | <div class="logo"> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <tr><td> |
3 | 3 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
4 | 4 | <tr> |
5 | -<td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
5 | +<td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
6 | 6 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
7 | 7 | </td> |
8 | 8 | </tr> |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;"> |
13 | 13 | <?php |
14 | 14 | print_unescaped($l->t('Hey there,<br><br>just letting you know that %s shared <strong>%s</strong> with you.<br><a href="%s">View it!</a><br><br>', array($_['user_displayname'], $_['filename'], $_['link']))); |
15 | -if ( isset($_['expiration']) ) { |
|
15 | +if (isset($_['expiration'])) { |
|
16 | 16 | p($l->t("The share will expire on %s.", array($_['expiration']))); |
17 | 17 | print_unescaped('<br><br>'); |
18 | 18 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
28 | 28 | <?php p($theme->getName()); ?> - |
29 | 29 | <?php p($theme->getSlogan()); ?> |
30 | -<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
30 | +<br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
31 | 31 | </td> |
32 | 32 | </tr> |
33 | 33 | <tr> |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <title> |
6 | 6 | <?php |
7 | - p(!empty($_['application'])?$_['application'].' - ':''); |
|
7 | + p(!empty($_['application']) ? $_['application'].' - ' : ''); |
|
8 | 8 | p($theme->getTitle()); |
9 | 9 | ?> |
10 | 10 | </title> |
@@ -14,16 +14,16 @@ discard block |
||
14 | 14 | <meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>"> |
15 | 15 | <meta name="apple-mobile-web-app-capable" content="yes"> |
16 | 16 | <meta name="apple-mobile-web-app-status-bar-style" content="black"> |
17 | - <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:$theme->getTitle()); ?>"> |
|
17 | + <meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid'] != 'files') ? $_['application'] : $theme->getTitle()); ?>"> |
|
18 | 18 | <meta name="mobile-web-app-capable" content="yes"> |
19 | 19 | <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> |
20 | 20 | <link rel="icon" href="<?php print_unescaped(image_path($_['appid'], 'favicon.ico')); /* IE11+ supports png */ ?>"> |
21 | 21 | <link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>"> |
22 | 22 | <link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path($_['appid'], 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>"> |
23 | - <?php foreach($_['cssfiles'] as $cssfile): ?> |
|
23 | + <?php foreach ($_['cssfiles'] as $cssfile): ?> |
|
24 | 24 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>"> |
25 | 25 | <?php endforeach; ?> |
26 | - <?php foreach($_['printcssfiles'] as $cssfile): ?> |
|
26 | + <?php foreach ($_['printcssfiles'] as $cssfile): ?> |
|
27 | 27 | <link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print"> |
28 | 28 | <?php endforeach; ?> |
29 | 29 | <?php if (isset($_['inline_ocjs'])): ?> |
@@ -31,12 +31,12 @@ discard block |
||
31 | 31 | <?php print_unescaped($_['inline_ocjs']); ?> |
32 | 32 | </script> |
33 | 33 | <?php endif; ?> |
34 | - <?php foreach($_['jsfiles'] as $jsfile): ?> |
|
34 | + <?php foreach ($_['jsfiles'] as $jsfile): ?> |
|
35 | 35 | <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script> |
36 | 36 | <?php endforeach; ?> |
37 | 37 | <?php print_unescaped($_['headers']); ?> |
38 | 38 | </head> |
39 | - <body id="<?php p($_['bodyid']);?>"> |
|
39 | + <body id="<?php p($_['bodyid']); ?>"> |
|
40 | 40 | <?php include('layout.noscript.warning.php'); ?> |
41 | 41 | <div id="notification-container"> |
42 | 42 | <div id="notification"></div> |
@@ -54,18 +54,18 @@ discard block |
||
54 | 54 | |
55 | 55 | <a href="#" class="header-appname-container menutoggle" tabindex="2"> |
56 | 56 | <h1 class="header-appname"> |
57 | - <?php p(!empty($_['application'])?$_['application']: $l->t('Apps')); ?> |
|
57 | + <?php p(!empty($_['application']) ? $_['application'] : $l->t('Apps')); ?> |
|
58 | 58 | </h1> |
59 | 59 | <div class="icon-caret"></div> |
60 | 60 | </a> |
61 | 61 | |
62 | 62 | <div id="appmenu"> |
63 | 63 | <ul> |
64 | - <?php foreach($_['headernavigation'] as $entry): ?> |
|
64 | + <?php foreach ($_['headernavigation'] as $entry): ?> |
|
65 | 65 | <li data-id="<?php p($entry['id']); ?>"> |
66 | 66 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
67 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
68 | - <img src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon" /> |
|
67 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
68 | + <img src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon" /> |
|
69 | 69 | <div class="icon-loading-dark" style="display:none;"></div> |
70 | 70 | <span> |
71 | 71 | <?php p($entry['name']); ?> |
@@ -85,17 +85,17 @@ discard block |
||
85 | 85 | <nav role="navigation"><div id="navigation"> |
86 | 86 | <div id="apps"> |
87 | 87 | <ul> |
88 | - <?php foreach($_['navigation'] as $entry): ?> |
|
89 | - <?php if($entry['showInHeader']): ?> |
|
88 | + <?php foreach ($_['navigation'] as $entry): ?> |
|
89 | + <?php if ($entry['showInHeader']): ?> |
|
90 | 90 | <li data-id="<?php p($entry['id']); ?>" class="in-header"> |
91 | 91 | <?php else: ?> |
92 | 92 | <li data-id="<?php p($entry['id']); ?>"> |
93 | 93 | <?php endif; ?> |
94 | 94 | <a href="<?php print_unescaped($entry['href']); ?>" tabindex="3" |
95 | - <?php if( $entry['active'] ): ?> class="active"<?php endif; ?>> |
|
95 | + <?php if ($entry['active']): ?> class="active"<?php endif; ?>> |
|
96 | 96 | <svg width="32" height="32" viewBox="0 0 32 32"> |
97 | 97 | <defs><filter id="invert-<?php p($entry['id']); ?>"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"></feColorMatrix></filter></defs> |
98 | - <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>" class="app-icon"></image> |
|
98 | + <image x="0" y="0" width="32" height="32" preserveAspectRatio="xMinYMin meet" filter="url(#invert-<?php p($entry['id']); ?>)" xlink:href="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>" class="app-icon"></image> |
|
99 | 99 | </svg> |
100 | 100 | <div class="icon-loading-dark" style="display:none;"></div> |
101 | 101 | <span> |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | <div id="header-right"> |
114 | 114 | <form class="searchbox" action="#" method="post" role="search" novalidate> |
115 | 115 | <label for="searchbox" class="hidden-visually"> |
116 | - <?php p($l->t('Search'));?> |
|
116 | + <?php p($l->t('Search')); ?> |
|
117 | 117 | </label> |
118 | 118 | <input id="searchbox" type="search" name="query" |
119 | 119 | value="" required |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | <div class="avatardiv<?php if ($_['userAvatarSet']) { print_unescaped(' avatardiv-shown'); } else { print_unescaped('" style="display: none'); } ?>"> |
126 | 126 | <?php if ($_['userAvatarSet']): ?> |
127 | 127 | <img alt="" width="32" height="32" |
128 | - src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']]));?>" |
|
129 | - srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']]));?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']]));?> 4x" |
|
128 | + src="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 32, 'v' => $_['userAvatarVersion']])); ?>" |
|
129 | + srcset="<?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 64, 'v' => $_['userAvatarVersion']])); ?> 2x, <?php p(\OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', ['userId' => $_['user_uid'], 'size' => 128, 'v' => $_['userAvatarVersion']])); ?> 4x" |
|
130 | 130 | > |
131 | 131 | <?php endif; ?> |
132 | 132 | </div> |
@@ -134,11 +134,11 @@ discard block |
||
134 | 134 | </div> |
135 | 135 | <div id="expanddiv"> |
136 | 136 | <ul> |
137 | - <?php foreach($_['settingsnavigation'] as $entry):?> |
|
137 | + <?php foreach ($_['settingsnavigation'] as $entry):?> |
|
138 | 138 | <li> |
139 | 139 | <a href="<?php print_unescaped($entry['href']); ?>" |
140 | - <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>> |
|
141 | - <img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>"> |
|
140 | + <?php if ($entry["active"]): ?> class="active"<?php endif; ?>> |
|
141 | + <img alt="" src="<?php print_unescaped($entry['icon'].'?v='.$_['versionHash']); ?>"> |
|
142 | 142 | <?php p($entry['name']) ?> |
143 | 143 | </a> |
144 | 144 | </li> |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | <tr><td> |
3 | 3 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
4 | 4 | <tr> |
5 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>" bordercolor="<?php p($theme->getColorPrimary());?>" border> |
|
5 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>" bordercolor="<?php p($theme->getColorPrimary()); ?>" border> |
|
6 | 6 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
7 | 7 | </td> |
8 | 8 | </tr> |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
25 | 25 | <?php p($theme->getName()); ?> - |
26 | 26 | <?php p($theme->getSlogan()); ?> |
27 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
27 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
28 | 28 | </td> |
29 | 29 | </tr> |
30 | 30 | <tr> |
@@ -39,16 +39,16 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId(); |
42 | -$url = 'https://nextcloud.com/federation#' . $cloudID; |
|
42 | +$url = 'https://nextcloud.com/federation#'.$cloudID; |
|
43 | 43 | $logoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg'); |
44 | 44 | $theme = \OC::$server->getThemingDefaults(); |
45 | 45 | $color = $theme->getColorPrimary(); |
46 | 46 | $textColor = "#ffffff"; |
47 | -if(\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
47 | +if (\OC::$server->getAppManager()->isEnabledForUser("theming")) { |
|
48 | 48 | $logoPath = $theme->getLogo(); |
49 | 49 | try { |
50 | 50 | $util = \OC::$server->query("\OCA\Theming\Util"); |
51 | - if($util->invertTextColor($color)) { |
|
51 | + if ($util->invertTextColor($color)) { |
|
52 | 52 | $textColor = "#000000"; |
53 | 53 | } |
54 | 54 | } catch (OCP\AppFramework\QueryException $e) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <tr><td> |
28 | 28 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
29 | 29 | <tr> |
30 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
30 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
31 | 31 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
32 | 32 | </td> |
33 | 33 | </tr> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
53 | 53 | <?php p($theme->getName()); ?> - |
54 | 54 | <?php p($theme->getSlogan()); ?> |
55 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
55 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
56 | 56 | </td> |
57 | 57 | </tr> |
58 | 58 | <tr> |
@@ -191,16 +191,16 @@ discard block |
||
191 | 191 | $folder = $this->appData->newFolder('images'); |
192 | 192 | } |
193 | 193 | |
194 | - if(!empty($newLogo)) { |
|
194 | + if (!empty($newLogo)) { |
|
195 | 195 | $target = $folder->newFile('logo'); |
196 | 196 | $target->putContent(file_get_contents($newLogo['tmp_name'], 'r')); |
197 | 197 | $this->template->set('logoMime', $newLogo['type']); |
198 | 198 | $name = $newLogo['name']; |
199 | 199 | } |
200 | - if(!empty($newBackgroundLogo)) { |
|
200 | + if (!empty($newBackgroundLogo)) { |
|
201 | 201 | $target = $folder->newFile('background'); |
202 | 202 | $image = @imagecreatefromstring(file_get_contents($newBackgroundLogo['tmp_name'], 'r')); |
203 | - if($image === false) { |
|
203 | + if ($image === false) { |
|
204 | 204 | return new DataResponse( |
205 | 205 | [ |
206 | 206 | 'data' => [ |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | // Optimize the image since some people may upload images that will be |
216 | 216 | // either to big or are not progressive rendering. |
217 | 217 | $tmpFile = $this->tempManager->getTemporaryFile(); |
218 | - if(function_exists('imagescale')) { |
|
218 | + if (function_exists('imagescale')) { |
|
219 | 219 | // FIXME: Once PHP 5.5.0 is a requirement the above check can be removed |
220 | 220 | // Workaround for https://bugs.php.net/bug.php?id=65171 |
221 | - $newHeight = imagesy($image)/(imagesx($image)/1920); |
|
221 | + $newHeight = imagesy($image) / (imagesx($image) / 1920); |
|
222 | 222 | $image = imagescale($image, 1920, $newHeight); |
223 | 223 | } |
224 | 224 | imageinterlace($image, 1); |
@@ -324,112 +324,112 @@ discard block |
||
324 | 324 | $color = $this->config->getAppValue($this->appName, 'color'); |
325 | 325 | $elementColor = $this->util->elementColor($color); |
326 | 326 | |
327 | - if($this->util->invertTextColor($color)) { |
|
327 | + if ($this->util->invertTextColor($color)) { |
|
328 | 328 | $textColor = '#000000'; |
329 | 329 | } else { |
330 | 330 | $textColor = '#ffffff'; |
331 | 331 | } |
332 | 332 | |
333 | - if($color !== '') { |
|
333 | + if ($color !== '') { |
|
334 | 334 | $responseCss .= sprintf( |
335 | - '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}' . "\n", |
|
335 | + '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}'."\n", |
|
336 | 336 | $color |
337 | 337 | ); |
338 | - $responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' . |
|
339 | - 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' . |
|
340 | - 'background-color: %s; background-position: center center; background-size:contain;' . |
|
341 | - 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' . |
|
338 | + $responseCss .= sprintf('input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {'. |
|
339 | + 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');'. |
|
340 | + 'background-color: %s; background-position: center center; background-size:contain;'. |
|
341 | + 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;'. |
|
342 | 342 | "}\n", |
343 | 343 | \OC::$WEBROOT, |
344 | 344 | $elementColor |
345 | 345 | ); |
346 | - $responseCss .= 'input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' . |
|
347 | - 'background-image: url(\'data:image/svg+xml;base64,'.$this->util->generateRadioButton($elementColor).'\');' . |
|
346 | + $responseCss .= 'input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {'. |
|
347 | + 'background-image: url(\'data:image/svg+xml;base64,'.$this->util->generateRadioButton($elementColor).'\');'. |
|
348 | 348 | "}\n"; |
349 | - $responseCss .= '.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary,' . |
|
350 | - '.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active {' . |
|
349 | + $responseCss .= '.primary, input[type="submit"].primary, input[type="button"].primary, button.primary, .button.primary,'. |
|
350 | + '.primary:active, input[type="submit"].primary:active, input[type="button"].primary:active, button.primary:active, .button.primary:active {'. |
|
351 | 351 | 'border: 1px solid '.$elementColor.';'. |
352 | 352 | 'background-color: '.$elementColor.';'. |
353 | - 'color: ' . $textColor . ';'. |
|
354 | - "}\n" . |
|
355 | - '.primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover,' . |
|
356 | - '.primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus {' . |
|
353 | + 'color: '.$textColor.';'. |
|
354 | + "}\n". |
|
355 | + '.primary:hover, input[type="submit"].primary:hover, input[type="button"].primary:hover, button.primary:hover, .button.primary:hover,'. |
|
356 | + '.primary:focus, input[type="submit"].primary:focus, input[type="button"].primary:focus, button.primary:focus, .button.primary:focus {'. |
|
357 | 357 | 'border: 1px solid '.$elementColor.';'. |
358 | 358 | 'background-color: '.$elementColor.';'. |
359 | - 'color: ' . $textColor . ';'. |
|
360 | - "}\n" . |
|
361 | - '.primary:disabled, input[type="submit"].primary:disabled, input[type="button"].primary:disabled, button.primary:disabled, .button.primary:disabled,' . |
|
362 | - '.primary:disabled:hover, input[type="submit"].primary:disabled:hover, input[type="button"].primary:disabled:hover, button.primary:disabled:hover, .button.primary:disabled:hover,' . |
|
363 | - '.primary:disabled:focus, input[type="submit"].primary:disabled:focus, input[type="button"].primary:disabled:focus, button.primary:disabled:focus, .button.primary:disabled:focus {' . |
|
359 | + 'color: '.$textColor.';'. |
|
360 | + "}\n". |
|
361 | + '.primary:disabled, input[type="submit"].primary:disabled, input[type="button"].primary:disabled, button.primary:disabled, .button.primary:disabled,'. |
|
362 | + '.primary:disabled:hover, input[type="submit"].primary:disabled:hover, input[type="button"].primary:disabled:hover, button.primary:disabled:hover, .button.primary:disabled:hover,'. |
|
363 | + '.primary:disabled:focus, input[type="submit"].primary:disabled:focus, input[type="button"].primary:disabled:focus, button.primary:disabled:focus, .button.primary:disabled:focus {'. |
|
364 | 364 | 'border: 1px solid '.$elementColor.';'. |
365 | 365 | 'background-color: '.$elementColor.';'. |
366 | - 'opacity: 0.4;' . |
|
366 | + 'opacity: 0.4;'. |
|
367 | 367 | 'color: '.$textColor.';'. |
368 | 368 | "}\n"; |
369 | - $responseCss .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n"; |
|
370 | - $responseCss .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' . |
|
371 | - 'border: 1px solid ' . $color . ';' . |
|
372 | - 'color: ' . $elementColor . ';' . |
|
369 | + $responseCss .= '.ui-widget-header { border: 1px solid '.$color.'; background: '.$color.'; color: #ffffff;'."}\n"; |
|
370 | + $responseCss .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {'. |
|
371 | + 'border: 1px solid '.$color.';'. |
|
372 | + 'color: '.$elementColor.';'. |
|
373 | 373 | "}\n"; |
374 | - $responseCss .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' . |
|
375 | - 'color: ' . $elementColor . ';' . |
|
374 | + $responseCss .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {'. |
|
375 | + 'color: '.$elementColor.';'. |
|
376 | 376 | "}\n"; |
377 | 377 | $responseCss .= ' |
378 | 378 | #firstrunwizard .firstrunwizard-header { |
379 | - background-color: ' . $color . '; |
|
379 | + background-color: ' . $color.'; |
|
380 | 380 | } |
381 | 381 | #firstrunwizard p a { |
382 | - color: ' . $color . '; |
|
382 | + color: ' . $color.'; |
|
383 | 383 | } |
384 | 384 | '; |
385 | - $responseCss .= sprintf('.nc-theming-main-background {background-color: %s}' . "\n", $color); |
|
386 | - $responseCss .= sprintf('.nc-theming-main-text {color: %s}' . "\n", $color); |
|
387 | - $responseCss .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}' . "\n", $color); |
|
385 | + $responseCss .= sprintf('.nc-theming-main-background {background-color: %s}'."\n", $color); |
|
386 | + $responseCss .= sprintf('.nc-theming-main-text {color: %s}'."\n", $color); |
|
387 | + $responseCss .= sprintf('#app-navigation li:hover > a, #app-navigation li:focus > a, #app-navigation a:focus, #app-navigation .selected, #app-navigation .selected a, #app-navigation .active, #app-navigation .active a {box-shadow: inset 2px 0 %s}'."\n", $color); |
|
388 | 388 | |
389 | 389 | } |
390 | 390 | $logo = $this->config->getAppValue($this->appName, 'logoMime'); |
391 | - if($logo !== '') { |
|
391 | + if ($logo !== '') { |
|
392 | 392 | $responseCss .= sprintf( |
393 | - '#header .logo {' . |
|
394 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
395 | - 'background-size: contain;' . |
|
396 | - '}' . "\n" . |
|
397 | - '#header .logo-icon {' . |
|
398 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
399 | - 'background-size: contain;' . |
|
400 | - '}' . "\n" . |
|
401 | - '#firstrunwizard .firstrunwizard-header .logo {' . |
|
402 | - 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' . |
|
403 | - 'background-size: contain;' . |
|
404 | - '}' . "\n" |
|
393 | + '#header .logo {'. |
|
394 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
395 | + 'background-size: contain;'. |
|
396 | + '}'."\n". |
|
397 | + '#header .logo-icon {'. |
|
398 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
399 | + 'background-size: contain;'. |
|
400 | + '}'."\n". |
|
401 | + '#firstrunwizard .firstrunwizard-header .logo {'. |
|
402 | + 'background-image: url(\'./logo?v='.$cacheBusterValue.'\');'. |
|
403 | + 'background-size: contain;'. |
|
404 | + '}'."\n" |
|
405 | 405 | ); |
406 | 406 | } |
407 | 407 | $backgroundLogo = $this->config->getAppValue($this->appName, 'backgroundMime'); |
408 | - if($backgroundLogo !== '') { |
|
409 | - $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}' . "\n"; |
|
410 | - $responseCss .= '#firstrunwizard .firstrunwizard-header {' . |
|
411 | - 'background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');' . |
|
412 | - '}' . "\n"; |
|
408 | + if ($backgroundLogo !== '') { |
|
409 | + $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}'."\n"; |
|
410 | + $responseCss .= '#firstrunwizard .firstrunwizard-header {'. |
|
411 | + 'background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');'. |
|
412 | + '}'."\n"; |
|
413 | 413 | } |
414 | - if($this->util->invertTextColor($color)) { |
|
415 | - $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n"; |
|
416 | - $responseCss .= '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . "\n"; |
|
417 | - $responseCss .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n"; |
|
418 | - $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . "\n"; |
|
419 | - $responseCss .= '#body-login input.login { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/confirm.svg?v=2\'); }' . "\n"; |
|
420 | - $responseCss .= '.nc-theming-contrast {color: #000000}' . "\n"; |
|
421 | - $responseCss .= '.ui-widget-header { color: #000000; }' . "\n"; |
|
414 | + if ($this->util->invertTextColor($color)) { |
|
415 | + $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }'."\n"; |
|
416 | + $responseCss .= '#header .icon-caret { background-image: url(\''.\OC::$WEBROOT.'/core/img/actions/caret-dark.svg\'); }'."\n"; |
|
417 | + $responseCss .= '.searchbox input[type="search"] { background: transparent url(\''.\OC::$WEBROOT.'/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }'."\n"; |
|
418 | + $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }'."\n"; |
|
419 | + $responseCss .= '#body-login input.login { background-image: url(\''.\OC::$WEBROOT.'/core/img/actions/confirm.svg?v=2\'); }'."\n"; |
|
420 | + $responseCss .= '.nc-theming-contrast {color: #000000}'."\n"; |
|
421 | + $responseCss .= '.ui-widget-header { color: #000000; }'."\n"; |
|
422 | 422 | } else { |
423 | - $responseCss .= '.nc-theming-contrast {color: #ffffff}' . "\n"; |
|
423 | + $responseCss .= '.nc-theming-contrast {color: #ffffff}'."\n"; |
|
424 | 424 | } |
425 | 425 | |
426 | - if($logo !== '' or $color !== '') { |
|
427 | - $responseCss .= '.icon-file,.icon-filetype-text {' . |
|
428 | - 'background-image: url(\'./img/core/filetypes/text.svg?v='.$cacheBusterValue.'\');' . "}\n" . |
|
429 | - '.icon-folder, .icon-filetype-folder {' . |
|
430 | - 'background-image: url(\'./img/core/filetypes/folder.svg?v='.$cacheBusterValue.'\');' . "}\n" . |
|
431 | - '.icon-filetype-folder-drag-accept {' . |
|
432 | - 'background-image: url(\'./img/core/filetypes/folder-drag-accept.svg?v='.$cacheBusterValue.'\')!important;' . "}\n"; |
|
426 | + if ($logo !== '' or $color !== '') { |
|
427 | + $responseCss .= '.icon-file,.icon-filetype-text {'. |
|
428 | + 'background-image: url(\'./img/core/filetypes/text.svg?v='.$cacheBusterValue.'\');'."}\n". |
|
429 | + '.icon-folder, .icon-filetype-folder {'. |
|
430 | + 'background-image: url(\'./img/core/filetypes/folder.svg?v='.$cacheBusterValue.'\');'."}\n". |
|
431 | + '.icon-filetype-folder-drag-accept {'. |
|
432 | + 'background-image: url(\'./img/core/filetypes/folder-drag-accept.svg?v='.$cacheBusterValue.'\')!important;'."}\n"; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | $response = new DataDownloadResponse($responseCss, 'style', 'text/css'); |
@@ -448,12 +448,12 @@ discard block |
||
448 | 448 | $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); |
449 | 449 | $responseJS = '(function() { |
450 | 450 | OCA.Theming = { |
451 | - name: ' . json_encode($this->template->getName()) . ', |
|
452 | - url: ' . json_encode($this->template->getBaseUrl()) . ', |
|
453 | - slogan: ' . json_encode($this->template->getSlogan()) . ', |
|
454 | - color: ' . json_encode($this->template->getColorPrimary()) . ', |
|
455 | - inverted: ' . json_encode($this->util->invertTextColor($this->template->getColorPrimary())) . ', |
|
456 | - cacheBuster: ' . json_encode($cacheBusterValue). ' |
|
451 | + name: ' . json_encode($this->template->getName()).', |
|
452 | + url: ' . json_encode($this->template->getBaseUrl()).', |
|
453 | + slogan: ' . json_encode($this->template->getSlogan()).', |
|
454 | + color: ' . json_encode($this->template->getColorPrimary()).', |
|
455 | + inverted: ' . json_encode($this->util->invertTextColor($this->template->getColorPrimary())).', |
|
456 | + cacheBuster: ' . json_encode($cacheBusterValue).' |
|
457 | 457 | }; |
458 | 458 | })();'; |
459 | 459 | $response = new DataDownloadResponse($responseJS, 'javascript', 'text/javascript'); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | <tr><td> |
7 | 7 | <table cellspacing="0" cellpadding="0" border="0" width="600px"> |
8 | 8 | <tr> |
9 | - <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> |
|
9 | + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary()); ?>"> |
|
10 | 10 | <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> |
11 | 11 | </td> |
12 | 12 | </tr> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> |
28 | 28 | <?php p($theme->getName()); ?> - |
29 | 29 | <?php p($theme->getSlogan()); ?> |
30 | - <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> |
|
30 | + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl()); ?></a> |
|
31 | 31 | </td> |
32 | 32 | </tr> |
33 | 33 | <tr> |