aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Blüm <marius@lineone.io>2017-07-23 22:06:18 +0200
committerGitHub <noreply@github.com>2017-07-23 22:06:18 +0200
commit05d979c6655a830f5626debe0e9e98171e6326a3 (patch)
treedf27eb762721d22a26af093cb1f4b634e96f3ac0
parent2e7e03b2f7f29ac29edc6b7dde4736b198d4cef2 (diff)
parent25d29f06bc5eee77470bb4a17638a65d26413e3f (diff)
downloadnextcloud-server-05d979c6655a830f5626debe0e9e98171e6326a3.tar.gz
nextcloud-server-05d979c6655a830f5626debe0e9e98171e6326a3.zip
Merge pull request #5713 from nextcloud/datepicker-redesign
Redesign jQuery UI datepicker
-rw-r--r--core/css/header.scss3
-rw-r--r--core/css/inputs.scss5
-rw-r--r--core/css/styles.scss77
-rw-r--r--core/img/actions/arrow-left.svg1
-rw-r--r--core/img/actions/arrow-right.svg1
-rw-r--r--lib/private/legacy/template.php2
6 files changed, 85 insertions, 4 deletions
diff --git a/core/css/header.scss b/core/css/header.scss
index 2e06c13d223..41bb5783090 100644
--- a/core/css/header.scss
+++ b/core/css/header.scss
@@ -211,7 +211,8 @@ nav {
margin-left: -54px;
}
-#navigation {
+#navigation,
+.ui-datepicker {
position: relative;
left: -100%;
width: 160px;
diff --git a/core/css/inputs.scss b/core/css/inputs.scss
index 13a164e13f2..3ea90d322bb 100644
--- a/core/css/inputs.scss
+++ b/core/css/inputs.scss
@@ -492,8 +492,9 @@ input {
}
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {
- border: none;
- background: nc-darken($color-main-background, 3%);
+ border: 1px solid transparent;
+ background: inherit;
+ color: $color-primary;
}
/* Animation */
diff --git a/core/css/styles.scss b/core/css/styles.scss
index 35fc300eafe..f2acca38e1e 100644
--- a/core/css/styles.scss
+++ b/core/css/styles.scss
@@ -964,6 +964,83 @@ code {
background-image: url('../img/actions/play-previous.svg?v=1');
}
+/* ---- jQuery UI datepicker ---- */
+.ui-widget.ui-datepicker {
+ margin-top: 10px;
+ padding: 4px 8px;
+ width: auto;
+
+ .ui-state-default,
+ .ui-widget-content .ui-state-default,
+ .ui-widget-header .ui-state-default {
+ border: 1px solid transparent;
+ background: inherit;
+ }
+ .ui-widget-header {
+ padding: 7px;
+ font-size: 13px;
+ border: none;
+ background-color: $color-main-background;
+ color: $color-main-text;
+
+ .ui-datepicker-title {
+ line-height: 1;
+ font-weight: 300;
+ }
+ .ui-icon {
+ opacity: .5;
+
+ &.ui-icon-circle-triangle-e {
+ background: url("../img/actions/arrow-right.svg") center center no-repeat;
+ }
+ &.ui-icon-circle-triangle-w {
+ background: url("../img/actions/arrow-left.svg") center center no-repeat;
+ }
+ }
+ .ui-state-hover .ui-icon {
+ opacity: 1;
+ }
+ }
+ .ui-datepicker-calendar {
+ th {
+ font-weight: normal;
+ color: nc-lighten($color-main-text, 33%);
+ opacity: .8;
+ }
+ tr:hover {
+ background-color: inherit;
+ }
+ td {
+ > * {
+ border-radius: 50%;
+ text-align: center;
+ font-weight: normal;
+ color: $color-main-text;
+ padding: 6px;
+ line-height: 12px;
+ }
+
+ &.ui-datepicker-today a:not(.ui-state-hover) {
+ background-color: nc-lighten($color-main-text, 86%);
+ }
+
+ &.ui-datepicker-current-day a.ui-state-active,
+ .ui-state-hover,
+ .ui-state-focus {
+ background-color: $color-primary;
+ color: $color-primary-text;
+ font-weight: bold;
+ }
+
+ &.ui-datepicker-week-end :not(.ui-state-hover),
+ .ui-priority-secondary:not(.ui-state-hover) {
+ color: nc-lighten($color-main-text, 33%);
+ opacity: .8;
+ }
+ }
+ }
+}
+
.ui-datepicker-prev, .ui-datepicker-next {
border: nc-lighten($color-main-text, 86%);
background: $color-main-background;
diff --git a/core/img/actions/arrow-left.svg b/core/img/actions/arrow-left.svg
new file mode 100644
index 00000000000..34b2fda2426
--- /dev/null
+++ b/core/img/actions/arrow-left.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewbox="0 0 16 16"><path d="m5.5 8 6 6v1l-7-7 7-7v1z"/></svg>
diff --git a/core/img/actions/arrow-right.svg b/core/img/actions/arrow-right.svg
new file mode 100644
index 00000000000..102b9cf6b5b
--- /dev/null
+++ b/core/img/actions/arrow-right.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1.1" viewbox="0 0 16 16"><path d="m10.5 8-6-6v-1l7 7-7 7v-1z"/></svg>
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 4f7c11d0b64..f5ee2336831 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -108,9 +108,9 @@ class OC_Template extends \OC\Template\Base {
}
}
+ OC_Util::addStyle('server', null, true);
OC_Util::addStyle('jquery-ui-fixes',null,true);
OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true);
- OC_Util::addStyle('server', null, true);
OC_Util::addVendorStyle('select2/select2', null, true);
OC_Util::addStyle('jquery.ocdialog');
OC_Util::addTranslations("core", null, true);