cockpit/js/ui.js in cpee-1.4.25 vs cockpit/js/ui.js in cpee-1.4.26
- old
+ new
@@ -18,21 +18,25 @@
$.ajax({
url: "config.json",
success: function(res){
$("input[name=repo-url]").val(res['repo-url']);
$("input[name=base-url]").val(res['base-url']);
+ $("body").attr('current-repo',res['repo-url']);
+ $("body").attr('current-base',res['base-url']);
$("body").attr('current-testsets',res['testsets-url']);
cockpit();
},
error: function(){
$("body").attr('current-testsets','testsets/');
if (location.protocol.match(/^file/)) {
- $("input[name=base-url]").val("http://localhost:" + $('body').data('base-port'));
- $("input[name=repo-url]").val("http://localhost:" + $('body').data('res-port'));
+ $("body").attr('current-repo',"http://localhost:" + $('body').data('res-port'));
+ $("body").attr('current-base',"http://localhost:" + $('body').data('base-port'));
} else {
- $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
- $("input[name=repo-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
+ $("body").attr('current-repo',location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
+ $("body").attr('current-base',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
}
+ $("input[name=repo-url]").val($("body").attr('current-repo'));
+ $("input[name=base-url]").val($("body").attr('current-base'));
cockpit();
}
});
}
});