From 35d3b573ad87968be83f1fad1961af0ea707849b Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Sep 26 2018 14:04:24 +0000 Subject: 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 --- diff --git a/install/html/ssbrowser.html b/install/html/ssbrowser.html index 9e38861..6201d88 100644 --- a/install/html/ssbrowser.html +++ b/install/html/ssbrowser.html @@ -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); })(); diff --git a/install/html/unauthorized.html b/install/html/unauthorized.html index c8386f1..b5c22ae 100644 --- a/install/html/unauthorized.html +++ b/install/html/unauthorized.html @@ -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); })();