mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 08:03:50 +02:00
Cleanup style in DS js files
This commit is contained in:
parent
203a419f2a
commit
75e98dcef9
4 changed files with 42 additions and 58 deletions
|
@ -23,7 +23,6 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<!--<a class="navbar-brand" href="/">domain-server</a>-->
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Settings = {
|
||||
var Settings = {
|
||||
showAdvanced: false,
|
||||
ADVANCED_CLASS: 'advanced-setting',
|
||||
DEPRECATED_CLASS: 'deprecated-setting',
|
||||
|
@ -48,7 +48,7 @@ var URLs = {
|
|||
PLACE_URL: 'https://hifi.place',
|
||||
};
|
||||
|
||||
Strings = {
|
||||
var Strings = {
|
||||
LOADING_SETTINGS_ERROR: "There was a problem loading the domain settings.\nPlease refresh the page to try again.",
|
||||
|
||||
CHOOSE_DOMAIN_BUTTON: "Choose from my domains",
|
||||
|
@ -206,7 +206,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
|
|||
label: Strings.ADD_PLACE_CONFIRM_BUTTON,
|
||||
className: 'add-place-confirm-button btn btn-primary',
|
||||
callback: function() {
|
||||
var placeID = $('#place-name-select').val()
|
||||
var placeID = $('#place-name-select').val();
|
||||
// set the place ID on the form
|
||||
$(Settings.place_ID_SELECTOR).val(placeID).change();
|
||||
|
||||
|
@ -233,7 +233,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
|
|||
type: 'POST'
|
||||
}).done(function(data) {
|
||||
if (data.status == "success") {
|
||||
waitForDomainServerBackUp(function() {
|
||||
waitForDomainServerRestart(function() {
|
||||
dialog.modal('hide');
|
||||
if (onSuccessfullyAdded) {
|
||||
onSuccessfullyAdded(places_by_id[placeID].name, domainID);
|
||||
|
@ -334,26 +334,20 @@ function sendCreateDomainRequest(onSuccess, onError) {
|
|||
type: 'POST',
|
||||
data: { label: "" },
|
||||
success: function(data) {
|
||||
//if (data.status === 'success') {
|
||||
onSuccess(data.domain_id);
|
||||
//} else {
|
||||
//onError();
|
||||
//}
|
||||
},
|
||||
error: onError
|
||||
});
|
||||
}
|
||||
|
||||
function waitForDomainServerBackUp(callback) {
|
||||
function waitForDomainServerRestart(callback) {
|
||||
function checkForDomainUp() {
|
||||
$.ajax('', {
|
||||
success: function() {
|
||||
console.log("Domain is back up");
|
||||
callback();
|
||||
},
|
||||
error: function() {
|
||||
setTimeout(checkForDomainUp, 50);
|
||||
console.log("Fail");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -372,7 +366,9 @@ function prepareAccessTokenPrompt(callback) {
|
|||
closeOnConfirm: false,
|
||||
html: true
|
||||
}, function(inputValue){
|
||||
if (inputValue === false) return false;
|
||||
if (inputValue === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (inputValue === "") {
|
||||
swal.showInputError("Please paste your access token in the input field.")
|
||||
|
|
|
@ -469,7 +469,6 @@ function setupHFAccountButton() {
|
|||
|
||||
// add the button group to the top of the metaverse panel
|
||||
$('#metaverse .panel-body').prepend(el);
|
||||
|
||||
}
|
||||
|
||||
function disonnectHighFidelityAccount() {
|
||||
|
@ -832,9 +831,9 @@ function setupDomainNetworkingSettings() {
|
|||
|
||||
var errorMessage = ''
|
||||
if (includePort) {
|
||||
errorMessage = "We were unable to load the Network address and port.";
|
||||
errorMessage = "We were unable to load the network address and port.";
|
||||
} else {
|
||||
errorMessage = "We were unable to load the Network address."
|
||||
errorMessage = "We were unable to load the network address."
|
||||
}
|
||||
var errorEl = createDomainLoadingError(errorMessage);
|
||||
|
||||
|
@ -1041,14 +1040,6 @@ function appendDomainIDButtons() {
|
|||
domainIDInput.after(createButton);
|
||||
}
|
||||
|
||||
function showDomainSettingsModal(clickedButton) {
|
||||
bootbox.dialog({
|
||||
title: "Choose matching place",
|
||||
message: modal_body,
|
||||
buttons: modal_buttons
|
||||
})
|
||||
}
|
||||
|
||||
function editHighFidelityPlace(placeID, name, path) {
|
||||
var dialog;
|
||||
|
||||
|
@ -1091,8 +1082,6 @@ function editHighFidelityPlace(placeID, name, path) {
|
|||
$('.edit-place-cancel-button').removeAttr('disabled');
|
||||
$('.edit-place-save-button').removeAttr('disabled');
|
||||
$('.edit-place-save-button').html(Strings.EDIT_PLACE_CONFIRM_BUTTON);
|
||||
|
||||
//bootbox.alert(Strings.EDIT_PLACE_ERROR);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue