mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-22 21:06:27 +02:00
Fix some weird context.
This commit is contained in:
parent
2c1a51e7c4
commit
a965ac8591
3 changed files with 11 additions and 11 deletions
|
@ -228,7 +228,7 @@ function getDomainFromAPI(callback) {
|
||||||
return pendingDomainRequest;
|
return pendingDomainRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAdded) {
|
function chooseFromMetaversePlaces(accessToken, forcePathTo, onSuccessfullyAdded) {
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
getMetaverseUrl(function(metaverse_url) {
|
getMetaverseUrl(function(metaverse_url) {
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
|
||||||
loadingDialog.modal('hide');
|
loadingDialog.modal('hide');
|
||||||
bootbox.confirm("We were not able to load your domain information from the Metaverse. Would you like to retry?", function(response) {
|
bootbox.confirm("We were not able to load your domain information from the Metaverse. Would you like to retry?", function(response) {
|
||||||
if (response) {
|
if (response) {
|
||||||
chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAdded);
|
chooseFromMetaversePlaces(accessToken, forcePathTo, onSuccessfullyAdded);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,7 +387,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
$.post("/api/domains", domainJSON, function(data){
|
$.post("/api/domains", domainJSON, function(data){
|
||||||
// we successfully created a domain ID, set it on that field
|
// we successfully created a domain ID, set it on that field
|
||||||
var domainID = data.domain.id;
|
var domainID = data.domain.domainId;
|
||||||
console.log("Setting domain id to ", data, domainID);
|
console.log("Setting domain id to ", data, domainID);
|
||||||
$(Settings.DOMAIN_ID_SELECTOR).val(domainID).change();
|
$(Settings.DOMAIN_ID_SELECTOR).val(domainID).change();
|
||||||
|
|
||||||
|
@ -853,7 +853,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
// Update label
|
// Update label
|
||||||
if (showOrHideLabel()) {
|
if (showOrHideLabel()) {
|
||||||
var label = data.domain.label;
|
var label = data.domain.name;
|
||||||
label = label === null ? '' : label;
|
label = label === null ? '' : label;
|
||||||
$('#network-label').val(label);
|
$('#network-label').val(label);
|
||||||
}
|
}
|
||||||
|
@ -959,7 +959,7 @@ $(document).ready(function(){
|
||||||
var addRow = $("<tr> <td></td> <td></td> <td class='buttons'><a href='#' class='place-add glyphicon glyphicon-plus'></a></td> </tr>");
|
var addRow = $("<tr> <td></td> <td></td> <td class='buttons'><a href='#' class='place-add glyphicon glyphicon-plus'></a></td> </tr>");
|
||||||
addRow.find(".place-add").click(function(ev) {
|
addRow.find(".place-add").click(function(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
chooseFromHighFidelityPlaces(Settings.initialValues.metaverse.access_token, null, function(placeName, newDomainID) {
|
chooseFromMetaversePlaces(Settings.initialValues.metaverse.access_token, null, function(placeName, newDomainID) {
|
||||||
if (newDomainID) {
|
if (newDomainID) {
|
||||||
Settings.data.values.metaverse.id = newDomainID;
|
Settings.data.values.metaverse.id = newDomainID;
|
||||||
var domainIDEl = $("[data-keypath='metaverse.id']");
|
var domainIDEl = $("[data-keypath='metaverse.id']");
|
||||||
|
@ -1002,13 +1002,13 @@ $(document).ready(function(){
|
||||||
_.each(data.data.domains, function(domain){
|
_.each(data.data.domains, function(domain){
|
||||||
var domainString = "";
|
var domainString = "";
|
||||||
|
|
||||||
if (domain.label) {
|
if (domain.name) {
|
||||||
domainString += '"' + domain.label+ '" - ';
|
domainString += '"' + domain.name+ '" - ';
|
||||||
}
|
}
|
||||||
|
|
||||||
domainString += domain.id;
|
domainString += domain.domainId;
|
||||||
|
|
||||||
domain_select.append("<option value='" + domain.id + "'>" + domainString + "</option>");
|
domain_select.append("<option value='" + domain.domainId + "'>" + domainString + "</option>");
|
||||||
})
|
})
|
||||||
modal_body += "<label for='domain-name-select'>Domains</label>" + domain_select[0].outerHTML
|
modal_body += "<label for='domain-name-select'>Domains</label>" + domain_select[0].outerHTML
|
||||||
modal_buttons["success"] = {
|
modal_buttons["success"] = {
|
||||||
|
@ -1076,7 +1076,7 @@ $(document).ready(function(){
|
||||||
var domain = data.data.domain;
|
var domain = data.data.domain;
|
||||||
|
|
||||||
// we should have a new domain ID - set it on the domain ID value
|
// we should have a new domain ID - set it on the domain ID value
|
||||||
$(Settings.DOMAIN_ID_SELECTOR).val(domain.id).change();
|
$(Settings.DOMAIN_ID_SELECTOR).val(domain.domainId).change();
|
||||||
|
|
||||||
// we also need to make sure auto networking is set to full
|
// we also need to make sure auto networking is set to full
|
||||||
$('[data-hidden-input="metaverse.automatic_networking"]').val("full").change();
|
$('[data-hidden-input="metaverse.automatic_networking"]').val("full").change();
|
||||||
|
|
|
@ -70,7 +70,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').on('click', '#change-place-name', function() {
|
$('body').on('click', '#change-place-name', function() {
|
||||||
chooseFromHighFidelityPlaces(Settings.data.values.metaverse.access_token, "/0,-10,0", function(placeName) {
|
chooseFromMetaversePlaces(Settings.data.values.metaverse.access_token, "/0,-10,0", function(placeName) {
|
||||||
updatePlaceNameLink(placeName);
|
updatePlaceNameLink(placeName);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue