Skip to content

Commit b6ee99e

Browse files
author
minjk-bl
committed
Fix Reshape edit operation -> clicking on input tag
1 parent 2bc3063 commit b6ee99e

File tree

2 files changed

+15
-20
lines changed

2 files changed

+15
-20
lines changed

html/m_apps/reshape.html

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,25 @@
1717
<div class="vp-rs-type-box pivot">
1818
<div>
1919
<label for="vp_rsIndex" class="w100">Index</label>
20-
<input type="text" id="vp_rsIndex" placeholder="Index key" disabled="">
21-
<button id="vp_rsIndexSelect" class="vp-button w50">Edit</button>
20+
<input type="text" id="vp_rsIndex" placeholder="Index key" readonly="">
2221
</div>
2322
<div>
2423
<label for="vp_rsColumns" class="vp-orange-text w100">Columns</label>
25-
<input type="text" id="vp_rsColumns" placeholder="Columns key" disabled="">
26-
<button id="vp_rsColumnsSelect" class="vp-button w50">Edit</button>
24+
<input type="text" id="vp_rsColumns" placeholder="Columns key" readonly="">
2725
</div>
2826
<div>
2927
<label for="vp_rsValues" class="w100">Values</label>
30-
<input type="text" id="vp_rsValues" placeholder="Values key" disabled="">
31-
<button id="vp_rsValuesSelect" class="vp-button w50">Edit</button>
28+
<input type="text" id="vp_rsValues" placeholder="Values key" readonly="">
3229
</div>
3330
</div>
3431
<div class="vp-rs-type-box melt" style="display:none;">
3532
<div>
3633
<label for="vp_rsIdVars" class="w100">Id</label>
37-
<input type="text" id="vp_rsIdVars" placeholder="Id vars" disabled="">
38-
<button id="vp_rsIdVarsSelect" class="vp-button w50">Edit</button>
34+
<input type="text" id="vp_rsIdVars" placeholder="Id vars" readonly="">
3935
</div>
4036
<div>
4137
<label for="vp_rsValueVars" class="w100">Value</label>
42-
<input type="text" id="vp_rsValueVars" placeholder="Value vars" disabled="">
43-
<button id="vp_rsValueVarsSelect" class="vp-button w50">Edit</button>
38+
<input type="text" id="vp_rsValueVars" placeholder="Value vars" readonly="">
4439
</div>
4540
<div>
4641
<label for="vp_rsVarName" class="w100">Var name</label>

js/m_apps/Reshape.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ define([
6262
$(document).off('click', this.wrapSelector('.vp-rs-df-refresh'));
6363
$(document).off('change', this.wrapSelector('#vp_rsType'));
6464
$(document).off('change', this.wrapSelector('#vp_rsIndex'));
65-
$(document).off('click', this.wrapSelector('#vp_rsIndexSelect'));
65+
$(document).off('click', this.wrapSelector('#vp_rsIndex'));
6666
$(document).off('change', this.wrapSelector('#vp_rsColumns'));
67-
$(document).off('click', this.wrapSelector('#vp_rsColumnsSelect'));
67+
$(document).off('click', this.wrapSelector('#vp_rsColumns'));
6868
$(document).off('change', this.wrapSelector('#vp_rsValues'));
69-
$(document).off('click', this.wrapSelector('#vp_rsValuesSelect'));
69+
$(document).off('click', this.wrapSelector('#vp_rsValues'));
7070
$(document).off('change', this.wrapSelector('#vp_rsIdVars'));
71-
$(document).off('click', this.wrapSelector('#vp_rsIdVarsSelect'));
71+
$(document).off('click', this.wrapSelector('#vp_rsIdVars'));
7272
$(document).off('change', this.wrapSelector('#vp_rsValueVars'));
73-
$(document).off('click', this.wrapSelector('#vp_rsValueVarsSelect'));
73+
$(document).off('click', this.wrapSelector('#vp_rsValueVars'));
7474
$(document).off('change', this.wrapSelector('#vp_rsUserOption'));
7575
$(document).off('change', this.wrapSelector('#vp_rsAllocateTo'));
7676
$(document).off('change', this.wrapSelector('#vp_rsResetIndex'));
@@ -135,7 +135,7 @@ define([
135135
});
136136

137137
// index select button event
138-
$(document).on('click', this.wrapSelector('#vp_rsIndexSelect'), function() {
138+
$(document).on('click', this.wrapSelector('#vp_rsIndex'), function() {
139139
var targetVariable = [ that.state.variable ];
140140
var excludeList = [ ...that.state.pivot.columns, ...that.state.pivot.values ].map(obj => obj.code);
141141
that.openColumnSelector(targetVariable, $(that.wrapSelector('#vp_rsIndex')), 'Select columns', excludeList);
@@ -148,7 +148,7 @@ define([
148148
});
149149

150150
// columns select button event
151-
$(document).on('click', this.wrapSelector('#vp_rsColumnsSelect'), function() {
151+
$(document).on('click', this.wrapSelector('#vp_rsColumns'), function() {
152152
var targetVariable = [ that.state.variable ];
153153
var excludeList = [ ...that.state.pivot.index, ...that.state.pivot.values ].map(obj => obj.code);
154154
that.openColumnSelector(targetVariable, $(that.wrapSelector('#vp_rsColumns')), 'Select columns', excludeList);
@@ -161,7 +161,7 @@ define([
161161
});
162162

163163
// values select button event
164-
$(document).on('click', this.wrapSelector('#vp_rsValuesSelect'), function() {
164+
$(document).on('click', this.wrapSelector('#vp_rsValues'), function() {
165165
var targetVariable = [ that.state.variable ];
166166
var excludeList = [ ...that.state.pivot.index, ...that.state.pivot.columns ].map(obj => obj.code);
167167
that.openColumnSelector(targetVariable, $(that.wrapSelector('#vp_rsValues')), 'Select columns', excludeList);
@@ -174,7 +174,7 @@ define([
174174
});
175175

176176
// id vars select button event
177-
$(document).on('click', this.wrapSelector('#vp_rsIdVarsSelect'), function() {
177+
$(document).on('click', this.wrapSelector('#vp_rsIdVars'), function() {
178178
var targetVariable = [ that.state.variable ];
179179
var excludeList = that.state.melt.valueVars.map(obj => obj.code);
180180
that.openColumnSelector(targetVariable, $(that.wrapSelector('#vp_rsIdVars')), 'Select columns', excludeList);
@@ -187,7 +187,7 @@ define([
187187
});
188188

189189
// value vars select button event
190-
$(document).on('click', this.wrapSelector('#vp_rsValueVarsSelect'), function() {
190+
$(document).on('click', this.wrapSelector('#vp_rsValueVars'), function() {
191191
var targetVariable = [ that.state.variable ];
192192
var excludeList = that.state.melt.idVars.map(obj => obj.code);
193193
that.openColumnSelector(targetVariable, $(that.wrapSelector('#vp_rsValueVars')), 'Select columns', excludeList);

0 commit comments

Comments
 (0)