From 791b7570a17ee1743b5551b11e43616f4582ced8 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Mon, 21 Sep 2020 22:40:42 +0300 Subject: [PATCH] * Bugfix: month was not translated in datepicker --- src/content/themes/default/style.css | 4 ++-- src/includes/class.lang.php | 1 + src/includes/mytinytodo.js | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/content/themes/default/style.css b/src/content/themes/default/style.css index a5ceddf..a8f743b 100644 --- a/src/content/themes/default/style.css +++ b/src/content/themes/default/style.css @@ -301,12 +301,12 @@ a.mtt-back-button { font-size:0.8rem; } #tagcloudcancel { float:right; } #tagcloudcancel span { background:url(images/close.svg) no-repeat; } -.ui-datepicker { width:190px; z-index:202; border: 1px solid #cccccc; background: #ffffff; display:none; padding:2px; box-shadow:1px 2px 5px rgba(0,0,0,0.5); border-radius:5px; } +.ui-datepicker { width:220px; z-index:202; border: 1px solid #cccccc; background: #ffffff; display:none; padding:2px; box-shadow:1px 2px 5px rgba(0,0,0,0.5); border-radius:5px; } .ui-datepicker-trigger { cursor:pointer; vertical-align:text-bottom; margin-left:2px; margin-right:2px; width:16px; height:16px; } .ui-datepicker-calendar { width:100%; border-collapse:collapse; } .ui-datepicker-calendar thead th { text-align:center; padding:0px; font-size:0.9rem; } .ui-datepicker-calendar tbody td { text-align:right; padding:1px; } -.ui-datepicker-calendar td a { display:block; text-decoration:none; color:#444444; border:1px solid #cccccc; background-color:#f9f9f9; color:#111; padding:1px; } +.ui-datepicker-calendar td a { display:block; text-decoration:none; color:#444444; border:1px solid #cccccc; background-color:#f9f9f9; color:#111; padding:2px; } .ui-datepicker-calendar td.ui-datepicker-current-day a { background-color:#EAF5FF; color:#222222; border-color:#5980FF; } .ui-datepicker-calendar td.ui-datepicker-today a { color:#fff; background-color:#ccc; } .ui-datepicker-calendar td a:hover { border-color:#5980FF; } diff --git a/src/includes/class.lang.php b/src/includes/class.lang.php index d665043..2b766c4 100644 --- a/src/includes/class.lang.php +++ b/src/includes/class.lang.php @@ -72,6 +72,7 @@ class Lang $a = array(); $a['daysMin'] = $this->get('days_min'); $a['daysLong'] = $this->get('days_long'); + $a['monthsShort'] = $this->get('months_short'); $a['monthsLong'] = $this->get('months_long'); $this->fillWithValues($a, [ diff --git a/src/includes/mytinytodo.js b/src/includes/mytinytodo.js index 073fb67..f1d80ad 100644 --- a/src/includes/mytinytodo.js +++ b/src/includes/mytinytodo.js @@ -85,7 +85,7 @@ var mytinytodo = window.mytinytodo = _mtt = { this.__lang = lang; this.daysMin = this.__lang.daysMin; this.daysLong = this.__lang.daysLong; - this.monthsShort = this.__lang.monthsMin; + this.monthsShort = this.__lang.monthsShort; this.monthsLong = this.__lang.monthsLong; }, @@ -352,7 +352,8 @@ var mytinytodo = window.mytinytodo = _mtt = { duration:'', dayNamesMin:_mtt.lang.daysMin, dayNames:_mtt.lang.daysLong, - monthNamesShort:_mtt.lang.monthsLong, + monthNamesShort:_mtt.lang.monthsShort, + monthNames:_mtt.lang.monthsLong, isRTL: _mtt.lang.isRTL() });