mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
Fix loading 'freeipa/text' at production mode
As for now 'ssbrowser.html' and 'unauthorized.html' pages are loaded without JS error at development mode only. There is no standalone 'freeipa/text' module as source at production mode. Thus 'core' one have to be loaded first and then 'text'. Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
This commit is contained in:
parent
4460cc5e9f
commit
f658a3d107
@ -25,20 +25,26 @@
|
||||
]
|
||||
};
|
||||
(function() {
|
||||
var icons = [
|
||||
'../ui/favicon.ico',
|
||||
];
|
||||
var styles = [
|
||||
'../ui/css/patternfly.css',
|
||||
'../ui/css/ipa.css'
|
||||
];
|
||||
var scripts = [
|
||||
'../ui/js/libs/jquery.js',
|
||||
'../ui/js/dojo/dojo.js'
|
||||
'../ui/js/libs/jquery.ordered-map.js',
|
||||
'../ui/js/dojo/dojo.js',
|
||||
];
|
||||
ipa_loader.scripts(scripts, function() {
|
||||
require([
|
||||
'dojo/dom',
|
||||
'freeipa/text',
|
||||
'dojo/domReady!'],
|
||||
function(dom, text) {
|
||||
'freeipa/core',
|
||||
'dojo/domReady!',
|
||||
],
|
||||
function(dom) {
|
||||
var text = require('freeipa/text');
|
||||
msg = "".concat(
|
||||
text.get('@i18n:ssbrowser-page.header'),
|
||||
text.get('@i18n:ssbrowser-page.firefox-header'),
|
||||
@ -53,6 +59,7 @@
|
||||
});
|
||||
});
|
||||
ipa_loader.styles(styles);
|
||||
ipa_loader.icons(icons);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
@ -25,27 +25,34 @@
|
||||
]
|
||||
};
|
||||
(function() {
|
||||
var icons = [
|
||||
'../ui/favicon.ico',
|
||||
];
|
||||
var styles = [
|
||||
'../ui/css/patternfly.css',
|
||||
'../ui/css/ipa.css'
|
||||
];
|
||||
var scripts = [
|
||||
'../ui/js/libs/jquery.js',
|
||||
'../ui/js/dojo/dojo.js'
|
||||
'../ui/js/libs/jquery.ordered-map.js',
|
||||
'../ui/js/dojo/dojo.js',
|
||||
];
|
||||
|
||||
ipa_loader.scripts(scripts, function() {
|
||||
require([
|
||||
'dojo/dom',
|
||||
'freeipa/text',
|
||||
'dojo/domReady!'],
|
||||
function(dom, text) {
|
||||
'freeipa/core',
|
||||
'dojo/domReady!',
|
||||
],
|
||||
function(dom) {
|
||||
var text = require('freeipa/text');
|
||||
if (msg = text.get('@i18n:unauthorized-page')) {
|
||||
dom.byId('unauthorized-msg').innerHTML=msg;
|
||||
}
|
||||
});
|
||||
});
|
||||
ipa_loader.styles(styles);
|
||||
ipa_loader.icons(icons);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
Loading…
Reference in New Issue
Block a user