From e7e945533e60b083628930acdaec1516b10d5a1d Mon Sep 17 00:00:00 2001 From: ralder Date: Thu, 2 Apr 2015 15:48:59 +0300 Subject: [PATCH 1/2] Add language select menu in webgui (fixes #981) --- gui/assets/css/overrides.css | 39 ++++++++++++++++ gui/index.html | 4 +- .../directives/languageSelectDirective.js | 45 +++++++++++++++++++ .../syncthing/core/services/localeService.js | 26 ++++++++--- internal/auto/gui.files.go | 13 ++++-- 5 files changed, 116 insertions(+), 11 deletions(-) create mode 100644 gui/scripts/syncthing/core/directives/languageSelectDirective.js diff --git a/gui/assets/css/overrides.css b/gui/assets/css/overrides.css index 9aec15526..4ddc3116d 100644 --- a/gui/assets/css/overrides.css +++ b/gui/assets/css/overrides.css @@ -153,6 +153,45 @@ table.table-condensed td { padding-right: 15px; } + +/** + * Menu for select language + */ + +@media (min-width:480px) { + *[language-select] > .dropdown-menu > li { + width: 50%; + float: left; + } + *[language-select] > .dropdown-menu { + width: 400px; + } +} + +@media (max-width:479px) { + .dropdown-menu { + padding-top: 55px; + } + + *[language-select] > .dropdown-toggle { + font-size: 14px; + } + + .dropdown-toggle { + float: left; + } + + .navbar-brand { + padding-left: 0; + padding-top: 16px; + } + + .navbar-nav .open .dropdown-menu > li > a { + padding: 12px 15px 12px 25px; + } +} + + .panel-body .table-condensed { margin-bottom: 0; } diff --git a/gui/index.html b/gui/index.html index b696c3228..349f32fb7 100644 --- a/gui/index.html +++ b/gui/index.html @@ -30,7 +30,7 @@