From 569ea217059a2e1897bf173c8fcb3f65165f2771 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 11 Jan 2017 10:46:22 +0100 Subject: [PATCH] Replace the language selector by our custom dropdown menu --- customize.dist/DecorateToolbar.js | 39 -------------- customize.dist/about.html | 9 +++- customize.dist/index.html | 9 +++- customize.dist/languageSelector.js | 13 ++--- customize.dist/main.css | 43 +++++++++++++++ customize.dist/main.js | 25 ++++++--- customize.dist/privacy.html | 9 +++- customize.dist/src/less/cryptpad.less | 1 + customize.dist/src/less/dropdown.less | 62 ++++++++++++++++++++++ customize.dist/src/less/toolbar.less | 2 + customize.dist/src/template.html | 9 +++- customize.dist/terms.html | 9 +++- customize.dist/toolbar.css | 43 +++++++++++++++ customize.dist/translations/messages.fr.js | 2 + customize.dist/translations/messages.js | 2 + www/common/toolbar.js | 39 ++++++++++---- www/drive/file.css | 60 +++------------------ www/drive/inner.html | 1 + www/pad/main.js | 8 ++- 19 files changed, 262 insertions(+), 123 deletions(-) delete mode 100644 customize.dist/DecorateToolbar.js create mode 100644 customize.dist/src/less/dropdown.less diff --git a/customize.dist/DecorateToolbar.js b/customize.dist/DecorateToolbar.js deleted file mode 100644 index 023c929e1..000000000 --- a/customize.dist/DecorateToolbar.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - globals define -*/ -define([ - '/customize/languageSelector.js', - '/customize/messages.js', - '/bower_components/jquery/dist/jquery.min.js' -], function (LS, Messages) { - var $ = window.jQuery; - var main = function () { - var url = window.location.pathname; - var isHtml = /\.html/.test(url) || url === '/' || url === ''; - if (!isHtml) { - Messages._applyTranslation(); - return; - } - $.ajax({ - url: isHtml ? '/customize/BottomBar.html' : '/customize/Header.html', - success: function (ret) { - var $bar = $(ret); - $('body').append($bar); - - var $sel = $bar.find('#language-selector'); - - Object.keys(Messages._languages).forEach(function (code) { - $sel.append($('