handle style of button while domains are loading

This commit is contained in:
Stephen Birarda 2014-09-30 11:02:47 -07:00
parent 5b03a445a8
commit 541c3c6da8
2 changed files with 7 additions and 1 deletions

View file

@ -73,4 +73,4 @@ span.port {
#small-save-button {
width: 100%;
margin-bottom: 15px;
}
}

View file

@ -236,6 +236,8 @@ function chooseFromHighFidelityDomains(clickedButton) {
if (Settings.initialValues.metaverse.access_token) {
// add a spinner to the choose button
clickedButton.html("Loading domains...")
clickedButton.attr('disabled', 'disabled')
// get a list of user domains from data-web
data_web_domains_url = "https://data.highfidelity.io/api/v1/domains?access_token="
@ -281,6 +283,10 @@ function chooseFromHighFidelityDomains(clickedButton) {
message: modal_body,
buttons: modal_buttons
})
// remove the spinner from the choose button
clickedButton.html("Choose from my domains")
clickedButton.removeAttr('disabled')
})
} else {