Add style for button:disabled instead of switching classes.
This commit is contained in:
parent
a0164205a2
commit
26bcafcbb5
2 changed files with 5 additions and 5 deletions
|
@ -166,6 +166,10 @@ button *
|
||||||
{
|
{
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
button:disabled
|
||||||
|
{
|
||||||
|
background-color: #cccccc !important;
|
||||||
|
}
|
||||||
.gray_button
|
.gray_button
|
||||||
{
|
{
|
||||||
background-color: #cccccc;
|
background-color: #cccccc;
|
||||||
|
|
|
@ -307,15 +307,13 @@ function download_zip_form()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
var refresh_metadata_button = document.getElementById("refresh_metadata_button");
|
var refresh_metadata_button = document.getElementById("refresh_metadata_button");
|
||||||
var refresh_metadata_spinner = document.getElementById("refresh_metadata_spinner")
|
var refresh_metadata_spinner = document.getElementById("refresh_metadata_spinner");
|
||||||
refresh_metadata_spinner = new spinner.Spinner(refresh_metadata_spinner);
|
refresh_metadata_spinner = new spinner.Spinner(refresh_metadata_spinner);
|
||||||
|
|
||||||
function refresh_metadata_callback(response)
|
function refresh_metadata_callback(response)
|
||||||
{
|
{
|
||||||
response = response["data"];
|
response = response["data"];
|
||||||
refresh_metadata_button.disabled = false;
|
refresh_metadata_button.disabled = false;
|
||||||
refresh_metadata_button.classList.remove("gray_button");
|
|
||||||
refresh_metadata_button.classList.add("green_button");
|
|
||||||
refresh_metadata_spinner.hide();
|
refresh_metadata_spinner.hide();
|
||||||
if ("error_type" in response)
|
if ("error_type" in response)
|
||||||
{
|
{
|
||||||
|
@ -341,8 +339,6 @@ function refresh_metadata_form()
|
||||||
data.append("photo_ids", photo_ids);
|
data.append("photo_ids", photo_ids);
|
||||||
refresh_metadata_spinner.show();
|
refresh_metadata_spinner.show();
|
||||||
refresh_metadata_button.disabled = true;
|
refresh_metadata_button.disabled = true;
|
||||||
refresh_metadata_button.classList.add("gray_button");
|
|
||||||
refresh_metadata_button.classList.remove("green_button");
|
|
||||||
common.post(url, data, refresh_metadata_callback);
|
common.post(url, data, refresh_metadata_callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue