cockpit/js/ui.js in cpee-1.3.224 vs cockpit/js/ui.js in cpee-1.3.225
- old
+ new
@@ -13,8 +13,22 @@
$("#icontinue").click(function(){
$.cookie('cpee_iagree','yes');
location.reload();
});
} else {
- cockpit();
+ $.ajax({
+ url: "config.json",
+ success: function(res){
+ $("input[name=base-url]").val(res['base-url']);
+ cockpit();
+ },
+ error: function(){
+ if (location.protocol.match(/^file/)) {
+ $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
+ } else {
+ $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport'));
+ }
+ cockpit();
+ }
+ });
}
});