Skip to content

Commit 8191b74

Browse files
authored
Merge pull request #85 from visualpython/release
Release v1.1.8
2 parents f768dd2 + a8f1195 commit 8191b74

19 files changed

Lines changed: 729 additions & 560 deletions

bin/visualpy

Lines changed: 237 additions & 254 deletions
Large diffs are not rendered by default.

bin/visualpy.bat

Lines changed: 296 additions & 218 deletions
Large diffs are not rendered by default.

css/common/frameEditor.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@
7474
.vp-fe-preview .CodeMirror-code .cm-string {
7575
background-color: rgba(246, 173, 85, 0.2);
7676
}
77+
78+
7779
.vp-fe-df-box {
7880
display: grid;
7981
grid-template-rows: 30px;
8082
grid-row-gap: 5px;
8183
}
8284
.vp-fe-df-box label {
8385
width: 80px;
86+
font-weight: bold;
8487
}
8588
.vp-fe #vp_feVariable {
8689
width: 153px;
@@ -355,16 +358,19 @@
355358
.vp-popup-addpage .vp-popup-tab.replace {
356359
height: calc(100% - 50px);
357360
}
358-
.vp-popup-addtype{
361+
.vp-popup-addtype {
359362
width: 153px;
360363
margin-top: 5px;
361364
}
362-
.vp-popup-delete{
365+
.vp-popup-delete {
363366
padding-bottom: 20px;
364367
}
365-
.vp-popup-replace-add{
368+
.vp-popup-replace-add {
366369
margin-top: 30px
367370
}
368-
.vp_popup-apply{
369-
margin-left: 30px;
371+
.vp-popup-apply-column {
372+
width: 153px;
373+
}
374+
.vp-popup-apply-lambda{
375+
margin-top: 5px;
370376
}

css/common/subsetEditor.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
background-color: rgba(246, 173, 85, 0.2);
7676
}
7777
.vp-ds-label {
78-
color: #F37704;
7978
font-weight: bold;
8079
margin-left: 20px;
8180
}
@@ -319,7 +318,7 @@
319318
}
320319
.vp-ds-btn-apply {
321320
position: absolute;
322-
top: 4px;
321+
top: 9px;
323322
right: 15px;
324323
}
325324
.vp-ds-btn-run {

src/api/functions/pandasCommand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _vp_get_columns_list(df):
3333
# value
3434
if type(c).__name__ == 'str':
3535
cInfo['value'] = "'{}'".format(c)
36-
elif type(r).__name__ == 'Timestamp':
36+
elif type(c).__name__ == 'Timestamp':
3737
cInfo['value'] = str(c)
3838
# category - iopub data rate limit issue...
3939
if str(df[c].dtype) == 'object':

src/api_block/blockContainer.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,11 @@ define([
621621
*/
622622
BlockContainer.prototype.setFocusedPageType = function(focusedPageType) {
623623
// 추가: FOCUSED_PAGE_TYPE = NULL일 경우 주피터 단축키 활성화 / 아닐 경우 비활성화
624-
if (focusedPageType == FOCUSED_PAGE_TYPE.NULL) {
625-
// Jupyter.notebook.keyboard_manager.enable();
626-
} else {
627-
// Jupyter.notebook.keyboard_manager.disable();
628-
}
624+
// if (focusedPageType == FOCUSED_PAGE_TYPE.NULL) {
625+
// Jupyter.notebook.keyboard_manager.enable();
626+
// } else {
627+
// Jupyter.notebook.keyboard_manager.disable();
628+
// }
629629
this.focusedPageType = focusedPageType;
630630
}
631631
BlockContainer.prototype.getFocusedPageType = function() {
@@ -664,7 +664,7 @@ define([
664664

665665
this.resetOptionPage();
666666

667-
this.setFocusedPageType(FOCUSED_PAGE_TYPE.EDITOR);
667+
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
668668
this.reNewContainerDom();
669669
this.reRenderAllBlock_asc();
670670
}
@@ -1124,7 +1124,7 @@ define([
11241124
if (prevSelectedBlock && prevSelectedBlock.isModified) {
11251125
// Ask to save
11261126
var apiBlockPackage = this.getImportPackageThis();
1127-
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], [() => {
1127+
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], 2, [() => {
11281128
// cancel
11291129
// $(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_CANCEL_BUTTON).trigger(STR_CLICK);
11301130
blockContainerThis.cancelBlock();
@@ -2649,7 +2649,7 @@ define([
26492649
this.hideOptionPreviewBox();
26502650
$(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_PREVIEW_BUTTON).removeClass('enabled');
26512651

2652-
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.7');
2652+
this.setNavigator(BLOCK_CODELINE_TYPE.NONE, 'Visual Python 1.1.8');
26532653
this.setFocusedPageType(FOCUSED_PAGE_TYPE.BOARD);
26542654
$('.vp-apiblock-option-tab-none').css(STR_DISPLAY, STR_BLOCK);
26552655
}

src/api_block/component/boardMenuBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ define([
111111

112112
var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
113113
var apiBlockPackage = blockContainer.getImportPackageThis();
114-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
114+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
115115
saveNotePageAction_newVersion(vpCommon.formatString("{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION), saveFilePath);
116116

117117
blockContainer.deleteAllBlock();
@@ -161,7 +161,7 @@ define([
161161

162162
var saveFilePath = $(vpCommon.wrapSelector(vpCommon.formatString("#{0}", vpConst.VP_NOTE_REAL_FILE_PATH))).val();
163163
var apiBlockPackage = blockContainer.getImportPackageThis();
164-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
164+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
165165
if (saveFilePath == '') {
166166
saveAsNotePage();
167167
} else {

src/api_block/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
id='vp_apiblock_option_page'>
176176
<div class="vp-apiblock-option-navigator">
177177
<div class="vp-apiblock-option-navigator-label">
178-
<span class="vp-orange-text">Visual Python 1.1.7</span>
178+
<span class="vp-orange-text">Visual Python 1.1.8</span>
179179
</div>
180180
<div class="vp-apiblock-option-new-to-save" title="something modified...">
181181

src/api_block/init.js

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ define([
519519
// blockContainer.resetOptionPage();
520520
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
521521
});
522+
523+
$(vpCommon.wrapSelector(''))
522524

523525
/** Create block buttons page를 클릭했을 때 */
524526
$(vpCommon.wrapSelector(VP_CLASS_PREFIX + VP_CLASS_APIBLOCK_BUTTONS)).click(function(event) {
@@ -574,7 +576,8 @@ define([
574576
ctrlKey = 17,
575577
cmdKey = 91,
576578
vKey = 86,
577-
cKey = 67;
579+
cKey = 67,
580+
escKey = 27;
578581

579582
$(document).keydown(function(e) {
580583
if (e.keyCode == ctrlKey || e.keyCode == cmdKey) {
@@ -583,12 +586,43 @@ define([
583586
}).keyup(function(e) {
584587
if (e.keyCode == ctrlKey || e.keyCode == cmdKey) {
585588
ctrlDown = false;
589+
console.log(blockContainer.getFocusedPageType());
590+
}
591+
if (e.keyCode == escKey) {
592+
// close popup on esc
593+
if (blockContainer.getFocusedPageType() != FOCUSED_PAGE_TYPE.NULL) {
594+
blockContainer.appsMenu.close();
595+
}
586596
}
587597
}).click(function(e) {
598+
// click event on jupyter side
599+
if ($('#notebook').has(e.target).length > 0) {
600+
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
601+
}
602+
// click event on visual python menu tab & button box
603+
if ($(vpCommon.wrapSelector('.vp-apiblock-tab-header')).has(e.target).length > 0
604+
|| $(vpCommon.wrapSelector('.vp-apiblock-board-button-container')).has(e.target).length > 0) {
605+
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.BUTTONS);
606+
}
607+
// click event on popup menu
608+
if ($(vpCommon.wrapSelector('.vp-ds')).has(e.target).length > 0
609+
|| $(vpCommon.wrapSelector('.vp-fe')).has(e.target).length > 0
610+
|| $(vpCommon.wrapSelector('.vp-pp')).has(e.target).length > 0
611+
|| $(vpCommon.wrapSelector('.vp-ds-btn-box')).has(e.target).length > 0
612+
|| $(vpCommon.wrapSelector('.vp-fe-btn-box')).has(e.target).length > 0
613+
|| $(vpCommon.wrapSelector('.vp-pp-btn-box')).has(e.target).length > 0) {
614+
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.OPTION);
615+
}
616+
588617
// check modified
589618
blockContainer.checkModified();
590619
});
591620

621+
// focus event on codemirror of jupyter side
622+
$(document).on('focus', '#notebook .CodeMirror', function(e){
623+
blockContainer.setFocusedPageType(FOCUSED_PAGE_TYPE.NULL);
624+
});
625+
592626
$(document).change($(vpCommon.wrapSelector('.vp-apiblock-option input')), function() {
593627
// check modified
594628
blockContainer.checkModified();
@@ -778,7 +812,7 @@ define([
778812
/** File navigation을 open하지 않고 alert창 띄움*/
779813
} else {
780814
var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
781-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes','No', 'Cancel'], [() => {
815+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
782816
saveNotePageAction_newVersion(saveFileName, saveFilePath);
783817
openNotePage();
784818

src/common/constant.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define ([
4848
* toolbar btn properties
4949
*/
5050
const TOOLBAR_BTN_INFO = {
51-
HELP: "Visual Python 1.1.7"
51+
HELP: "Visual Python 1.1.8"
5252
// , ICON: "fa-angellist"
5353
, ICON: "vp-main-icon"
5454
, ID: "vpBtnToggle"
@@ -199,7 +199,7 @@ define ([
199199
/**
200200
* faq page link
201201
*/
202-
const VPNOTE_PAGE_LINK = 'https://visualpython.ai/vpnote';
202+
const VPNOTE_PAGE_LINK = 'https://visualpython.ai/vpnotes';
203203

204204
/**
205205
* header extra menu faq caption

0 commit comments

Comments
 (0)