Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita8f4cfc

Browse files
author
minjk-bl
committed
Frame - update
1 parent549ed44 commita8f4cfc

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

‎css/common/frameEditor.css‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
grid-row-gap:5px;
5454
/* grid-template-rows: 35px 30px 60% calc(40% - 80px); */
5555
/* grid-template-rows: 35px 30px calc(100% - 80px); */
56-
grid-template-rows:35px65pxcalc(100%-110px);
56+
/* grid-template-rows: 35px 65px calc(100% - 110px); */
57+
grid-template-rows:35px65px35pxcalc(100%-145px);
5758
grid-template-columns:100%;
5859
}
5960

@@ -93,6 +94,13 @@
9394
cursor: pointer;
9495
margin-left:5px;
9596
}
97+
.vp-fe-toolbar {
98+
border-top:1px solidvar(--border-gray-color);
99+
padding-top:5px;
100+
}
101+
.vp-fe-toolbar-item {
102+
width: fit-content;
103+
}
96104
.vp-fe-menu-box {
97105
position: absolute;
98106
top:0;

‎src/common/vpFrameEditor.js‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,12 @@ define([
320320
page.appendFormatLine('<input type="text" class="{0}" id="{1}" placeholder="{2}"/>','vp-input','vp_feReturn','Variable name');
321321
page.appendLine('</div>');
322322
page.appendLine('</div>');
323-
323+
page.appendFormatLine('<div class="{0}">','vp-fe-toolbar');
324+
page.appendFormatLine('<button type="button" class="{0}" data-type="{1}">{2}</button>'
325+
,'vp-button vp-fe-toolbar-item',FRAME_EDIT_TYPE.ADD_COL,'Add Column');
326+
page.appendFormatLine('<button type="button" class="{0}" data-type="{1}">{2}</button>'
327+
,'vp-button vp-fe-toolbar-item',FRAME_EDIT_TYPE.ADD_ROW,'Add Row');
328+
page.appendLine('</div>');
324329
// Table
325330
page.appendFormatLine('<div class="{0} {1}">',VP_FE_TABLE,'no-selection');
326331

@@ -677,7 +682,8 @@ define([
677682
varcontent=newsb.StringBuilder();
678683
content.appendFormatLine('<table class="{0}">','vp-popup-astype-table');
679684
content.appendLine('<colgroup><col width="140px"><col width="80px"><col width="*"></colgroup>');
680-
content.appendFormatLine('<thead><th>{0}</th><th>{1}</th><th class="{2}">{3}</th></thead>','Column','Data type','vp-orange-text','New data type');
685+
content.appendFormatLine('<thead style="height: 30px"><th>{0}</th><th>{1}</th><th class="{2}">{3}</th></thead>'
686+
,'Column','Data type','vp-orange-text','New data type');
681687
content.appendLine('<tbody>');
682688
this.state.selected.forEach((col,idx)=>{
683689
content.appendLine('<tr>');
@@ -1327,6 +1333,7 @@ define([
13271333
$(document).off('click',this.wrapSelector('.'+VP_FE_ADD_COLUMN));
13281334
$(document).off('click',this.wrapSelector('.'+VP_FE_ADD_ROW));
13291335
$(document).off('click',this.wrapSelector('.'+VP_FE_TABLE_MORE));
1336+
$(document).off('click',this.wrapSelector('.vp-fe-toolbar-item'));
13301337
$(document).off('click',this.wrapSelector('.'+VP_FE_MENU_ITEM));
13311338
$(document).off('click',this.wrapSelector('.vp-popup-replace-add'));
13321339
$(document).off('click',this.wrapSelector('.vp-popup-delete'));
@@ -1585,6 +1592,17 @@ define([
15851592
that.loadCode(that.getTypeCode(FRAME_EDIT_TYPE.SHOW));
15861593
});
15871594

1595+
// click toolbar item
1596+
$(document).on('click',this.wrapSelector('.vp-fe-toolbar-item'),function(){
1597+
varitemType=$(this).data('type');
1598+
switch(parseInt(itemType)){
1599+
caseFRAME_EDIT_TYPE.ADD_COL:
1600+
caseFRAME_EDIT_TYPE.ADD_ROW:
1601+
that.openInputPopup(itemType);
1602+
break;
1603+
}
1604+
});
1605+
15881606
// click menu item
15891607
$(document).on('click',this.wrapSelector('.'+VP_FE_MENU_ITEM),function(event){
15901608
event.stopPropagation();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp