diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-08-21 02:02:40 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-08-27 18:29:51 +0300 |
commit | f56122ae787f433f94eaea60a5a8277c6b0089be (patch) | |
tree | 25bdd0b9326667db7bc12a10e5b2a6ce696d9bd1 /css | |
parent | 0c377377fa5b9110ea1e2cedb98cba333313980e (diff) |
Wait for the server response to set the room as public or private
Until now the model was updated as soon as the checkbox was modified,
which triggered a change event that in turn caused the UI to be updated.
However, if the room could not be successfully set as public or private
nothing was done and the model as well as the UI were kept with the
wrong state (at least, until the model is fetched again). To prevent
this now the model waits for a successful server response to update the
attributes; in case of failure only the checkbox needs to be restored,
as it is the only UI element that changed due to the direct interaction
of the user (in case of success the whole view will be rendered again
due to the room type change, so no need to do anything explicitly in
that case).
As the model is not changed until the successful server response is
received now the checkbox is replaced by a working icon while waiting
for the answer. In a similar way the checkbox is also disabled to
prevent further requests while the previous one is ongoing.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'css')
-rw-r--r-- | css/style.scss | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/css/style.scss b/css/style.scss index 70a16bd13..c816e1cf3 100644 --- a/css/style.scss +++ b/css/style.scss @@ -913,6 +913,18 @@ input[type="password"] { .link-checkbox-label { white-space: nowrap; padding: 12px; + + /* If ".icon-loading-small" is set hide the checkbox and show a + * loading icon instead */ + &.icon-loading-small:before { + background-image: none !important; + background-color: transparent !important; + border-color: transparent !important; + } + &.icon-loading-small:after { + top: 21px; + left: 23px; + } } .button { cursor: pointer; |