summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorJulius Haertl <jus@bitgrid.net>2016-08-10 22:06:36 +0200
committerJulius Haertl <jus@bitgrid.net>2016-08-26 12:07:52 +0200
commit218e2f78501f58d2e716c1059c5f9e2685ba5832 (patch)
treec3a817735185474f6118196d4e846960b3fdb489 /apps/theming
parent2b0ed6c27a96a921bd94ec7183244df5621bf557 (diff)
downloadnextcloud-server-218e2f78501f58d2e716c1059c5f9e2685ba5832.tar.gz
nextcloud-server-218e2f78501f58d2e716c1059c5f9e2685ba5832.zip
Theming: Adjust jquery ui elements
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/lib/Controller/ThemingController.php9
-rw-r--r--apps/theming/tests/Controller/ThemingControllerTest.php39
2 files changed, 46 insertions, 2 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php
index 82a8dbf0950..8a7aaec6b5e 100644
--- a/apps/theming/lib/Controller/ThemingController.php
+++ b/apps/theming/lib/Controller/ThemingController.php
@@ -301,6 +301,14 @@ class ThemingController extends Controller {
'background-color: '.$elementColor.';'.
'opacity: 1.0;' .
"}\n";
+ $responseCss .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n";
+ $responseCss .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' .
+ 'border: 1px solid ' . $color . ';' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
+ $responseCss .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
$responseCss .= '
#firstrunwizard .firstrunwizard-header {
background-color: ' . $color . ';
@@ -343,6 +351,7 @@ class ThemingController extends Controller {
$responseCss .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n";
$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";
$responseCss .= '.nc-theming-contrast {color: #000000}' . "\n";
+ $responseCss .= '.ui-widget-header { color: #000000; }' . "\n";
} else {
$responseCss .= '.nc-theming-contrast {color: #ffffff}' . "\n";
}
diff --git a/apps/theming/tests/Controller/ThemingControllerTest.php b/apps/theming/tests/Controller/ThemingControllerTest.php
index 7af2afe7b82..da2137e9da0 100644
--- a/apps/theming/tests/Controller/ThemingControllerTest.php
+++ b/apps/theming/tests/Controller/ThemingControllerTest.php
@@ -398,6 +398,14 @@ class ThemingControllerTest extends TestCase {
'background-color: '.$color.';'.
'opacity: 1.0;' .
"}\n";
+ $expectedData .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n";
+ $expectedData .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' .
+ 'border: 1px solid ' . $color . ';' .
+ 'color: ' . $color . ';' .
+ "}\n";
+ $expectedData .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' .
+ 'color: ' . $color . ';' .
+ "}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
background-color: ' . $color . ';
@@ -420,6 +428,7 @@ class ThemingControllerTest extends TestCase {
public function testGetStylesheetWithOnlyColorInvert() {
$color = '#fff';
+ $elementColor = '#555555';
$this->config
->expects($this->at(0))
@@ -471,6 +480,14 @@ class ThemingControllerTest extends TestCase {
'background-color: #555555;'.
'opacity: 1.0;' .
"}\n";
+ $expectedData .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n";
+ $expectedData .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' .
+ 'border: 1px solid ' . $color . ';' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
+ $expectedData .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
background-color: ' . $color . ';
@@ -486,6 +503,7 @@ class ThemingControllerTest extends TestCase {
$expectedData .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n";
$expectedData .= '.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";
$expectedData .= '.nc-theming-contrast {color: #000000}' . "\n";
+ $expectedData .= '.ui-widget-header { color: #000000; }' . "\n";
$expected = new Http\DataDownloadResponse($expectedData, 'style', 'text/css');
@@ -628,6 +646,14 @@ class ThemingControllerTest extends TestCase {
'background-color: '.$color.';'.
'opacity: 1.0;' .
"}\n";
+ $expectedData .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n";
+ $expectedData .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' .
+ 'border: 1px solid ' . $color . ';' .
+ 'color: ' . $color . ';' .
+ "}\n";
+ $expectedData .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' .
+ 'color: ' . $color . ';' .
+ "}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
background-color: ' . $color . ';
@@ -667,6 +693,7 @@ class ThemingControllerTest extends TestCase {
public function testGetStylesheetWithAllCombinedInverted() {
$color = '#fff';
+ $elementColor = '#555555';
$this->config
->expects($this->at(0))
@@ -689,7 +716,6 @@ class ThemingControllerTest extends TestCase {
->with('theming', 'backgroundMime', '')
->willReturn('image/png');
-
$expectedData = sprintf(
'#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",
$color);
@@ -719,6 +745,14 @@ class ThemingControllerTest extends TestCase {
'background-color: #555555;'.
'opacity: 1.0;' .
"}\n";
+ $expectedData .= '.ui-widget-header { border: 1px solid ' . $color . '; background: '. $color . '; color: #ffffff;' . "}\n";
+ $expectedData .= '.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active {' .
+ 'border: 1px solid ' . $color . ';' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
+ $expectedData .= '.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {' .
+ 'color: ' . $elementColor . ';' .
+ "}\n";
$expectedData .= '
#firstrunwizard .firstrunwizard-header {
background-color: ' . $color . ';
@@ -752,8 +786,9 @@ class ThemingControllerTest extends TestCase {
$expectedData .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n";
$expectedData .= '.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";
$expectedData .= '.nc-theming-contrast {color: #000000}' . "\n";
- $expected = new Http\DataDownloadResponse($expectedData, 'style', 'text/css');
+ $expectedData .= '.ui-widget-header { color: #000000; }' . "\n";
+ $expected = new Http\DataDownloadResponse($expectedData, 'style', 'text/css');
$expected->cacheFor(3600);
$expected->addHeader('Expires', date(\DateTime::RFC2822, 123));
@$this->assertEquals($expected, $this->themingController->getStylesheet());