Skip to content

Commit 5ca771d

Browse files
author
minjk-bl
committed
Apps > Profiling - disabled button event bug fixed
1 parent d4dc308 commit 5ca771d

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/common/vpProfiling.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,11 @@ define([
253253
if (!checking) {
254254
return;
255255
}
256-
if (msg.content['name'] == 'stderr') {
257-
if (msg.content['text'].includes('not found')) {
258-
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
259-
// set enabled
260-
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
261-
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
262-
}
256+
if (msg.content['name'] == 'stderr' || msg.content['text'].includes('not found')) {
257+
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Install');
258+
// set enabled
259+
if ($(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).hasClass('disabled')) {
260+
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).removeClass('disabled');
263261
}
264262
} else {
265263
$(that.wrapSelector('.' + VP_PF_INSTALL_BTN)).text('Installed');
@@ -351,7 +349,7 @@ define([
351349
});
352350

353351
// click install
354-
$(document).on('click', this.wrapSelector('.' + VP_PF_INSTALL_BTN), function(event) {
352+
$(document).on('click', this.wrapSelector('.' + VP_PF_INSTALL_BTN + ':not(.disabled)'), function(event) {
355353
vpCommon.cellExecute([{command: '!pip install pandas-profiling', exec:true, type:'code'}]);
356354
});
357355

0 commit comments

Comments
 (0)