refactoring code for hide modal before removing or not calculation
refactoring code for hide modal before removing or not calculation


Former-commit-id: 71a16afdc2209355d0e6e3d942c94a83391bc934 [formerly 71a16afdc2209355d0e6e3d942c94a83391bc934 [formerly 882e4c6047355a96fbc79456f4757566fc36b334]]
Former-commit-id: 79b83acc4516a077a678952b6441b963b6ad37c7
Former-commit-id: 20a4b4c9c5972321a427a64fb12ff249cf7e37d4
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine