Skip to content

Commit

Permalink
Move "data-js-lang" attribute to HTML "lang" attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Slade authored and fguillot committed Nov 20, 2019
1 parent aba2887 commit e65045f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/Template/layout.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="<?= $this->app->jsLang() ?>">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
Expand Down Expand Up @@ -48,7 +48,6 @@
data-login-url="<?= $this->url->href('AuthController', 'login') ?>"
data-keyboard-shortcut-url="<?= $this->url->href('DocumentationController', 'shortcuts') ?>"
data-timezone="<?= $this->app->getTimezone() ?>"
data-js-lang="<?= $this->app->jsLang() ?>"
data-js-date-format="<?= $this->app->getJsDateFormat() ?>"
data-js-time-format="<?= $this->app->getJsTimeFormat() ?>"
>
Expand Down
2 changes: 1 addition & 1 deletion assets/js/app.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Kanboard.App.prototype.datePicker = function() {
var bodyElement = $("body");
var dateFormat = bodyElement.data("js-date-format");
var timeFormat = bodyElement.data("js-time-format");
var lang = bodyElement.data("js-lang");
var lang = $("html").attr("lang");

$.datepicker.setDefaults($.datepicker.regional[lang]);
$.timepicker.setDefaults($.timepicker.regional[lang]);
Expand Down

0 comments on commit e65045f

Please sign in to comment.