mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
Global: Add a CSS style for disabled and loading profile buttons
Groups: Add a loading animation
This commit is contained in:
parent
a1691a1485
commit
5d47549442
3 changed files with 20 additions and 0 deletions
|
@ -334,6 +334,20 @@ a {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile_link.disable > a, .profile_link.disable {
|
||||||
|
cursor: not-allowed;
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile_link.loading > a::after, .profile_link.loading::after {
|
||||||
|
content: "";
|
||||||
|
display: inline-block;
|
||||||
|
background-image: url('/assets/packages/static/openvk/img/loading_mini.gif');
|
||||||
|
width: 30px;
|
||||||
|
height: 7px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.page_footer {
|
.page_footer {
|
||||||
margin-left: 95px;
|
margin-left: 95px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
|
BIN
Web/static/img/loading_mini.gif
Executable file
BIN
Web/static/img/loading_mini.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 246 B |
|
@ -94,6 +94,9 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
|
||||||
let groupUrl = u(this).attr("data-group-url");
|
let groupUrl = u(this).attr("data-group-url");
|
||||||
let list = u('#_groupListPinnedGroups');
|
let list = u('#_groupListPinnedGroups');
|
||||||
|
|
||||||
|
thisButton.nodes[0].classList.add('loading');
|
||||||
|
thisButton.nodes[0].classList.add('disable');
|
||||||
|
|
||||||
let req = await ky(link);
|
let req = await ky(link);
|
||||||
if(req.ok == false) {
|
if(req.ok == false) {
|
||||||
NewNotification(tr('error'), tr('error_1'), null);
|
NewNotification(tr('error'), tr('error_1'), null);
|
||||||
|
@ -123,6 +126,9 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
|
||||||
list.nodes[0].children[0].remove();
|
list.nodes[0].children[0].remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thisButton.nodes[0].classList.remove('loading');
|
||||||
|
thisButton.nodes[0].classList.remove('disable');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue