Univention Bugzilla – Attachment 9044 Details for
Bug 44718
UMCLang cookie wont get updated when changing language in URL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
44718.patch (text/plain), 3.74 KB, created by
Johannes Keiser
on 2017-07-19 15:01:19 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Johannes Keiser
Created:
2017-07-19 15:01:19 CEST
Size:
3.74 KB
patch
obsolete
>Index: univention-management-console/www/login/LoginDialog.js >=================================================================== >diff --git a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/www/login/LoginDialog.js b/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/www/login/LoginDialog.js >--- a/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/www/login/LoginDialog.js (Revision 81242) >+++ b/branches/ucs-4.2/ucs-4.2-1/management/univention-management-console/www/login/LoginDialog.js (Arbeitskopie) >@@ -42,14 +42,14 @@ > "dojo/query", > "dojo/dom-attr", > "dojo/dom-class", >+ "dojo/fx", >+ "dojo/Deferred", > "dojox/html/styles", >- "dojo/fx", >+ "dojox/html/entities", > "dojox/encoding/base64", >- "dojo/Deferred", > "dijit/Dialog", > "dijit/_WidgetBase", > "dijit/DialogUnderlay", >- "dojox/html/entities", > "umc/tools", > "umc/widgets/Text", > "umc/widgets/StandbyMixin", >@@ -56,7 +56,7 @@ > "umc/i18n!login", > "dojo/domReady!", > "dojo/NodeList-dom" >-], function(declare, lang, array, win, aspect, when, has, on, dom, domConstruct, query, attr, domClass, styles, fx, base64, Deferred, Dialog, _WidgetBase, DialogUnderlay, entities, tools, Text, StandbyMixin, _) { >+], function(declare, lang, array, win, aspect, when, has, on, dom, domConstruct, query, attr, domClass, fx, Deferred, styles, entities, base64, Dialog, _WidgetBase, DialogUnderlay, tools, Text, StandbyMixin, _) { > > _('Username'); > _('Password'); >Index: univention-web/config.js >=================================================================== >diff --git a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/config.js b/branches/ucs-4.2/ucs-4.2-1/management/univention-web/config.js >--- a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/config.js (Revision 81242) >+++ b/branches/ucs-4.2/ucs-4.2-1/management/univention-web/config.js (Arbeitskopie) >@@ -105,7 +105,7 @@ > }, _customUmcConfig); > > // prepare all needed dependencies and evaluate umcConfig settings >-var _deps = ["dojo/parser", "login", "umc/tools", "umc/json!/univention/get/meta", "umc/menu/Button", "umc/widgets/LoginButton"]; >+var _deps = ["dojo/parser", "login", "umc/tools", "umc/json!/univention/get/meta", "umc/i18n/tools", "umc/menu/Button", "umc/widgets/LoginButton"]; > _deps.push("dojo/domReady!"); > var _ndeps = _deps.length; // save current number of dependencies > >@@ -136,8 +136,9 @@ > }], > map: {}, > deps: _deps, >- callback: function(parser, login, tools, meta) { >+ callback: function(parser, login, tools, meta, i18nTools) { > mixin(tools._status, meta.result); >+ i18nTools.saveLangCookie(i18nTools.defaultLang()); > if (umcConfig.loadHooks) { > require(["umc/hooks!", "umc/piwik"]); > } >Index: univention-web/js/i18n/tools.js >=================================================================== >diff --git a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/i18n/tools.js b/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/i18n/tools.js >--- a/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/i18n/tools.js (Revision 81242) >+++ b/branches/ucs-4.2/ucs-4.2-1/management/univention-web/js/i18n/tools.js (Arbeitskopie) >@@ -94,7 +94,7 @@ > // reload the page when a different language is selected > var query = ioQuery.queryToObject(window.location.search.substring(1)); > query.lang = locale; >- cookie('UMCLang', query.lang, { expires: 100, path: '/univention/' }); >+ i18nTools.saveLangCookie(query.lang); > if (window.location.pathname.indexOf('/univention/management/') === 0) { > require('umc/tools').renewSession(); > } >@@ -102,6 +102,10 @@ > } > }; > >+ i18nTools.saveLangCookie = function(lang) { >+ cookie('UMCLang', lang, { expires: 100, path: '/univention/' }); >+ }; >+ > i18nTools.defaultLang = function () { > // summary: > // Returns the default Language
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44718
: 9044