1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 11:37:40 +00:00

Prevent to move userfs twice

This commit is contained in:
Jan Schneider 2018-02-28 01:28:42 +01:00
parent d0186f7a8f
commit 5e3f3fa729

View File

@ -375,8 +375,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
return true; return true;
}, },
onApprove: function() { onApprove: function() {
moving_userfs_to_device = true;
display_message('warning', i18next.t('moving_userfs'), 300000); display_message('warning', i18next.t('moving_userfs'), 300000);
if (!moving_userfs_to_device) {
rest('POST', '/move_userfs_to_device', JSON.stringify({"target_device":target_device}), rest('POST', '/move_userfs_to_device', JSON.stringify({"target_device":target_device}),
function(data) { function(data) {
moving_userfs_to_device = false; moving_userfs_to_device = false;
@ -389,6 +389,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
} }
); );
} }
moving_userfs_to_device = true;
}
}) })
.modal('show'); .modal('show');
})); }));