Cleanup style in DS js files

This commit is contained in:
Ryan Huffman 2017-10-27 14:55:50 -07:00
parent 203a419f2a
commit 75e98dcef9
4 changed files with 42 additions and 58 deletions

View file

@ -254,8 +254,8 @@ table .headers + .headers td {
} }
.centered-hack { .centered-hack {
text-align: left; text-align: left;
display: inline-block; display: inline-block;
} }
@-webkit-keyframes bouncedelay { @-webkit-keyframes bouncedelay {
@ -282,18 +282,18 @@ table .headers + .headers td {
} }
@keyframes spin { @keyframes spin {
from { transform: scale(1) rotate(0deg);} from { transform: scale(1) rotate(0deg); }
to { transform: scale(1) rotate(360deg);} to { transform: scale(1) rotate(360deg); }
} }
@-webkit-keyframes spinw { @-webkit-keyframes spinw {
from { -webkit-transform: rotate(0deg);} from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg);} to { -webkit-transform: rotate(360deg); }
} }
@-moz-keyframes spinm { @-moz-keyframes spinm {
from { -moz-transform: rotate(0deg);} from { -moz-transform: rotate(0deg); }
to { -moz-transform: rotate(360deg);} to { -moz-transform: rotate(360deg); }
} }
.warning-text { .warning-text {
@ -302,9 +302,9 @@ table .headers + .headers td {
} }
.account-connected-header { .account-connected-header {
color: #6FCF97; color: #6FCF97;
font-size: 30px; font-size: 30px;
margin-right: 20px; margin-right: 20px;
} }
#visit-domain-link, #visit-domain-link,

View file

@ -23,7 +23,6 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<!--<a class="navbar-brand" href="/">domain-server</a>-->
</div> </div>
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->

View file

@ -1,4 +1,4 @@
Settings = { var Settings = {
showAdvanced: false, showAdvanced: false,
ADVANCED_CLASS: 'advanced-setting', ADVANCED_CLASS: 'advanced-setting',
DEPRECATED_CLASS: 'deprecated-setting', DEPRECATED_CLASS: 'deprecated-setting',
@ -48,7 +48,7 @@ var URLs = {
PLACE_URL: 'https://hifi.place', 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.", 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", CHOOSE_DOMAIN_BUTTON: "Choose from my domains",
@ -206,7 +206,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
label: Strings.ADD_PLACE_CONFIRM_BUTTON, label: Strings.ADD_PLACE_CONFIRM_BUTTON,
className: 'add-place-confirm-button btn btn-primary', className: 'add-place-confirm-button btn btn-primary',
callback: function() { callback: function() {
var placeID = $('#place-name-select').val() var placeID = $('#place-name-select').val();
// set the place ID on the form // set the place ID on the form
$(Settings.place_ID_SELECTOR).val(placeID).change(); $(Settings.place_ID_SELECTOR).val(placeID).change();
@ -233,7 +233,7 @@ function chooseFromHighFidelityPlaces(accessToken, forcePathTo, onSuccessfullyAd
type: 'POST' type: 'POST'
}).done(function(data) { }).done(function(data) {
if (data.status == "success") { if (data.status == "success") {
waitForDomainServerBackUp(function() { waitForDomainServerRestart(function() {
dialog.modal('hide'); dialog.modal('hide');
if (onSuccessfullyAdded) { if (onSuccessfullyAdded) {
onSuccessfullyAdded(places_by_id[placeID].name, domainID); onSuccessfullyAdded(places_by_id[placeID].name, domainID);
@ -334,26 +334,20 @@ function sendCreateDomainRequest(onSuccess, onError) {
type: 'POST', type: 'POST',
data: { label: "" }, data: { label: "" },
success: function(data) { success: function(data) {
//if (data.status === 'success') { onSuccess(data.domain_id);
onSuccess(data.domain_id);
//} else {
//onError();
//}
}, },
error: onError error: onError
}); });
} }
function waitForDomainServerBackUp(callback) { function waitForDomainServerRestart(callback) {
function checkForDomainUp() { function checkForDomainUp() {
$.ajax('', { $.ajax('', {
success: function() { success: function() {
console.log("Domain is back up");
callback(); callback();
}, },
error: function() { error: function() {
setTimeout(checkForDomainUp, 50); setTimeout(checkForDomainUp, 50);
console.log("Fail");
} }
}); });
} }
@ -372,7 +366,9 @@ function prepareAccessTokenPrompt(callback) {
closeOnConfirm: false, closeOnConfirm: false,
html: true html: true
}, function(inputValue){ }, function(inputValue){
if (inputValue === false) return false; if (inputValue === false) {
return false;
}
if (inputValue === "") { if (inputValue === "") {
swal.showInputError("Please paste your access token in the input field.") swal.showInputError("Please paste your access token in the input field.")

View file

@ -117,7 +117,7 @@ $(document).ready(function(){
*/ */
$.ajaxSetup({ $.ajaxSetup({
timeout: 20000, timeout: 20000,
}); });
$('[data-clampedwidth]').each(function () { $('[data-clampedwidth]').each(function () {
@ -437,21 +437,21 @@ function accessTokenIsSet() {
function setupHFAccountButton() { function setupHFAccountButton() {
var hasAccessToken = accessTokenIsSet(); var hasAccessToken = accessTokenIsSet();
var el; var el;
if (hasAccessToken) { if (hasAccessToken) {
el = "<p>"; el = "<p>";
el += "<span class='account-connected-header'>High Fidelity Account Connected</span>"; el += "<span class='account-connected-header'>High Fidelity Account Connected</span>";
el += "<button id='" + Settings.DISCONNECT_ACCOUNT_BTN_ID + "' class='btn'>Disconnect</button>"; el += "<button id='" + Settings.DISCONNECT_ACCOUNT_BTN_ID + "' class='btn'>Disconnect</button>";
el += "</p>"; el += "</p>";
el = $(el); el = $(el);
} else { } else {
// setup an object for the settings we want our button to have // setup an object for the settings we want our button to have
var buttonSetting = { var buttonSetting = {
type: 'button', type: 'button',
name: 'connected_account', name: 'connected_account',
label: 'Connected Account', label: 'Connected Account',
} }
buttonSetting.help = ""; buttonSetting.help = "";
buttonSetting.classes = "btn-primary"; buttonSetting.classes = "btn-primary";
buttonSetting.button_label = "Connect High Fidelity Account"; buttonSetting.button_label = "Connect High Fidelity Account";
@ -467,9 +467,8 @@ function setupHFAccountButton() {
el = viewHelpers.getFormGroup('', buttonSetting, Settings.data.values); el = viewHelpers.getFormGroup('', buttonSetting, Settings.data.values);
} }
// add the button group to the top of the metaverse panel // add the button group to the top of the metaverse panel
$('#metaverse .panel-body').prepend(el); $('#metaverse .panel-body').prepend(el);
} }
function disonnectHighFidelityAccount() { function disonnectHighFidelityAccount() {
@ -832,9 +831,9 @@ function setupDomainNetworkingSettings() {
var errorMessage = '' var errorMessage = ''
if (includePort) { 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 { } else {
errorMessage = "We were unable to load the Network address." errorMessage = "We were unable to load the network address."
} }
var errorEl = createDomainLoadingError(errorMessage); var errorEl = createDomainLoadingError(errorMessage);
@ -1041,14 +1040,6 @@ function appendDomainIDButtons() {
domainIDInput.after(createButton); domainIDInput.after(createButton);
} }
function showDomainSettingsModal(clickedButton) {
bootbox.dialog({
title: "Choose matching place",
message: modal_body,
buttons: modal_buttons
})
}
function editHighFidelityPlace(placeID, name, path) { function editHighFidelityPlace(placeID, name, path) {
var dialog; var dialog;
@ -1091,8 +1082,6 @@ function editHighFidelityPlace(placeID, name, path) {
$('.edit-place-cancel-button').removeAttr('disabled'); $('.edit-place-cancel-button').removeAttr('disabled');
$('.edit-place-save-button').removeAttr('disabled'); $('.edit-place-save-button').removeAttr('disabled');
$('.edit-place-save-button').html(Strings.EDIT_PLACE_CONFIRM_BUTTON); $('.edit-place-save-button').html(Strings.EDIT_PLACE_CONFIRM_BUTTON);
//bootbox.alert(Strings.EDIT_PLACE_ERROR);
} }
); );
@ -1818,12 +1807,12 @@ function badgeSidebarForDifferences(changedElement) {
var hasChanges = badgeValue > 0; var hasChanges = badgeValue > 0;
if (!hasChanges) { if (!hasChanges) {
for (var key in numChangesBySection) { for (var key in numChangesBySection) {
if (numChangesBySection[key] > 0) { if (numChangesBySection[key] > 0) {
hasChanges = true; hasChanges = true;
break; break;
}
} }
}
} }
$(".save-button").prop("disabled", !hasChanges); $(".save-button").prop("disabled", !hasChanges);