1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Disabled create/update/delete floor plan buttons when they are clicked

This commit is contained in:
Jon Ziebell 2022-08-26 14:31:46 -04:00
parent 1828852f48
commit 4fa7651189
3 changed files with 15 additions and 0 deletions

View File

@ -188,6 +188,11 @@ beestat.component.modal.create_floor_plan.prototype.get_buttons_ = function() {
.set_text_color('#fff')
.set_text('Create Floor Plan')
.addEventListener('click', function() {
this
.set_background_color(beestat.style.color.gray.base)
.set_background_hover_color()
.removeEventListener('click');
// Fail if there are errors.
if (
self.state_.error.floor_count === true ||

View File

@ -59,6 +59,11 @@ beestat.component.modal.delete_floor_plan.prototype.get_buttons_ = function() {
.set_text_color('#fff')
.set_text('Delete Floor Plan')
.addEventListener('click', function() {
this
.set_background_color(beestat.style.color.gray.base)
.set_background_hover_color()
.removeEventListener('click');
new beestat.api()
.add_call(
'floor_plan',

View File

@ -148,6 +148,11 @@ beestat.component.modal.update_floor_plan.prototype.get_buttons_ = function() {
.set_text_color('#fff')
.set_text('Update Floor Plan')
.addEventListener('click', function() {
this
.set_background_color(beestat.style.color.gray.base)
.set_background_hover_color()
.removeEventListener('click');
// Fail if there are errors.
if (
self.state_.error.name === true