From 88560096d401e4e5c9ac160a0d2d7afc738ed01e Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 19 Jul 2016 12:05:57 +0200 Subject: [PATCH 1/3] fix searchbox overlapping on mobile --- apps/theming/lib/controller/themingcontroller.php | 4 ++-- core/css/styles.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/theming/lib/controller/themingcontroller.php b/apps/theming/lib/controller/themingcontroller.php index 7e7791b46ce7f..5984c1856e298 100644 --- a/apps/theming/lib/controller/themingcontroller.php +++ b/apps/theming/lib/controller/themingcontroller.php @@ -73,7 +73,7 @@ public function __construct( IRootFolder $rootFolder ) { parent::__construct($appName, $request); - + $this->template = $template; $this->l = $l; $this->config = $config; @@ -216,7 +216,7 @@ public function getStylesheet() { $color = $this->config->getAppValue($this->appName, 'color'); if($color !== '') { $responseCss .= sprintf( - '#body-user #header,#body-settings #header,#body-public #header {background-color: %s}', + '#body-user #header,#body-settings #header,#body-public #header,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}', $color ); } diff --git a/core/css/styles.css b/core/css/styles.css index c1bd76acbcf71..a8e632c594460 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -118,7 +118,7 @@ a.two-factor-cancel { width: 155px; max-width: 50%; cursor: text; - background-color: transparent; + background-color: #0082c9; border: 1px solid rgba(255, 255, 255, .5); } From 12a35e46ce1e2d8d82b23481d50fb295a26696a3 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 19 Jul 2016 12:08:59 +0200 Subject: [PATCH 2/3] also adjust log in background color in theme --- apps/theming/lib/controller/themingcontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/theming/lib/controller/themingcontroller.php b/apps/theming/lib/controller/themingcontroller.php index 5984c1856e298..3e5d6f3e0d1c0 100644 --- a/apps/theming/lib/controller/themingcontroller.php +++ b/apps/theming/lib/controller/themingcontroller.php @@ -216,7 +216,7 @@ public function getStylesheet() { $color = $this->config->getAppValue($this->appName, 'color'); if($color !== '') { $responseCss .= sprintf( - '#body-user #header,#body-settings #header,#body-public #header,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}', + '#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}', $color ); } From c9b4a2b4cc03f4e1f1638084c16373725d085321 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 21 Jul 2016 23:44:50 +0200 Subject: [PATCH 3/3] Fix unit tests --- .../tests/lib/controller/ThemingControllerTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/theming/tests/lib/controller/ThemingControllerTest.php b/apps/theming/tests/lib/controller/ThemingControllerTest.php index 3a8405909b032..24eb0510f9939 100644 --- a/apps/theming/tests/lib/controller/ThemingControllerTest.php +++ b/apps/theming/tests/lib/controller/ThemingControllerTest.php @@ -327,7 +327,7 @@ public function testGetStylesheetWithOnlyColor() { ->with('theming', 'backgroundMime', '') ->willReturn(''); - $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #000}', 'style', 'text/css'); + $expected = new Http\DataDownloadResponse('#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: #000}', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } @@ -354,7 +354,7 @@ public function testGetStylesheetWithOnlyColorInvert() { ->with('theming', 'backgroundMime', '') ->willReturn(''); - $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}#header .header-appname, #expandDisplayName { color: #000000; } #header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); } .searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }.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); }', 'style', 'text/css'); + $expected = new Http\DataDownloadResponse('#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: #fff}#header .header-appname, #expandDisplayName { color: #000000; } #header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); } .searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }.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); }', 'style', 'text/css'); $expected->cacheFor(3600); @$this->assertEquals($expected, $this->themingController->getStylesheet()); } @@ -444,7 +444,7 @@ public function testGetStylesheetWithAllCombined() { ->with('theming', 'backgroundMime', '') ->willReturn('image/png'); - $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #000}#header .logo { + $expected = new Http\DataDownloadResponse('#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: #000}#header .logo { background-image: url(\'./logo?v=0\'); background-size: contain; } @@ -479,7 +479,7 @@ public function testGetStylesheetWithAllCombinedInverted() { ->with('theming', 'backgroundMime', '') ->willReturn('image/png'); - $expected = new Http\DataDownloadResponse('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff}#header .logo { + $expected = new Http\DataDownloadResponse('#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: #fff}#header .logo { background-image: url(\'./logo?v=0\'); background-size: contain; }