From 5143692b433ddb2841f4cea82910ba483bc69f40 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Sun, 20 Sep 2020 18:47:37 +0300 Subject: [PATCH] add RTL to calendar --- src/includes/class.lang.php | 1 + src/includes/mytinytodo.js | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/includes/class.lang.php b/src/includes/class.lang.php index 950f8c8..d665043 100644 --- a/src/includes/class.lang.php +++ b/src/includes/class.lang.php @@ -95,6 +95,7 @@ class Lang 'f_soon', 'alltasks' ]); + $a['_rtl'] = $this->rtl() ? 1 : 0; $opts = JSON_UNESCAPED_UNICODE; if ($pretty) { diff --git a/src/includes/mytinytodo.js b/src/includes/mytinytodo.js index 7546268..bf6fee8 100644 --- a/src/includes/mytinytodo.js +++ b/src/includes/mytinytodo.js @@ -87,6 +87,10 @@ var mytinytodo = window.mytinytodo = _mtt = { this.daysLong = this.__lang.daysLong; this.monthsShort = this.__lang.monthsMin; this.monthsLong = this.__lang.monthsLong; + }, + + isRTL: function() { + return this.get('_rtl') > 0 ? true : false; } }, @@ -348,7 +352,8 @@ var mytinytodo = window.mytinytodo = _mtt = { duration:'', dayNamesMin:_mtt.lang.daysMin, dayNames:_mtt.lang.daysLong, - monthNamesShort:_mtt.lang.monthsLong + monthNamesShort:_mtt.lang.monthsLong, + isRTL: _mtt.lang.isRTL() }); function ac_split( val ) {