fix #24: add different cursors

This commit is contained in:
koksnuss 2020-05-13 13:11:58 +02:00
parent 7aa9c126a5
commit 2db0b203f7

View File

@ -235,6 +235,7 @@ $(document).ready(function() {
// add coin // add coin
$('td.coin').each(function() { $('td.coin').each(function() {
$(this).css('cursor', 'copy');
$(this).click(function() { $(this).click(function() {
save_settings(); save_settings();
@ -283,6 +284,7 @@ $(document).ready(function() {
if (response) { if (response) {
data['name'] = response['name'].trim().substring(0, 79); data['name'] = response['name'].trim().substring(0, 79);
} }
$(td).css('cursor', 'progress');
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: 'add/coin', url: 'add/coin',
@ -290,6 +292,7 @@ $(document).ready(function() {
dataType: 'json', dataType: 'json',
td: td, td: td,
success: function(response) { success: function(response) {
$(td).css('cursor', 'copy');
if (response.status === 0) { if (response.status === 0) {
render_response(data, this.td, settings); render_response(data, this.td, settings);
detach('add_coin_name'); detach('add_coin_name');
@ -308,6 +311,10 @@ $(document).ready(function() {
$('#finish_edit').click(function() { $('#finish_edit').click(function() {
$('nav.navbar').fadeOut('fast'); $('nav.navbar').fadeOut('fast');
$('#begin_edit').fadeIn('fast'); $('#begin_edit').fadeIn('fast');
$('td.coin').each(function() {
$(this).css('cursor', 'default');
$(this).off('click');
});
}); });
// button #advanced_options // button #advanced_options