summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/escapeActions.js4
-rw-r--r--client/lib/i18n.js14
-rw-r--r--client/lib/utils.js2
3 files changed, 15 insertions, 5 deletions
diff --git a/client/lib/escapeActions.js b/client/lib/escapeActions.js
index dc6b05b7..666e33e0 100644
--- a/client/lib/escapeActions.js
+++ b/client/lib/escapeActions.js
@@ -134,3 +134,7 @@ $(document).on('click', (evt) => {
EscapeActions.clickExecute(evt.target, 'multiselection');
}
});
+
+$(document).on('click', 'a[href=#]', (evt) => {
+ evt.preventDefault();
+});
diff --git a/client/lib/i18n.js b/client/lib/i18n.js
index 34a789e1..4c02211a 100644
--- a/client/lib/i18n.js
+++ b/client/lib/i18n.js
@@ -6,10 +6,16 @@ Meteor.startup(() => {
Tracker.autorun(() => {
const currentUser = Meteor.user();
let language;
- if (currentUser && currentUser.profile && currentUser.profile.language) {
- language = currentUser.profile.language;
- } else {
- language = navigator.language || navigator.userLanguage;
+ if (currentUser) {
+ language = currentUser.profile && currentUser.profile.language;
+ }
+
+ if (!language) {
+ if(navigator.languages) {
+ language = navigator.languages[0];
+ } else {
+ language = navigator.language || navigator.userLanguage;
+ }
}
if (language) {
diff --git a/client/lib/utils.js b/client/lib/utils.js
index 4f772a60..9a9ff654 100644
--- a/client/lib/utils.js
+++ b/client/lib/utils.js
@@ -27,7 +27,7 @@ Utils = {
// in fact, what we really care is screen size
// large mobile device like iPad or android Pad has a big screen, it should also behave like a desktop
// in a small window (even on desktop), Wekan run in compact mode.
- // we can easily debug with a small window of desktop broswer. :-)
+ // we can easily debug with a small window of desktop browser. :-)
isMiniScreen() {
this.windowResizeDep.depend();
return $(window).width() <= 800;