Skip to content

Commit 2bc3063

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

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

html/m_apps/bind.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
<div class="vp-bd-type-box concat">
1212
<div>
1313
<label for="vp_bdVariable" class="vp-orange-text w100">Variable</label>
14-
<input type="text" id="vp_bdVariable" placeholder="Variable" disabled="">
15-
<button id="vp_bdVariableSelect" class="vp-button w50">Edit</button>
14+
<input type="text" id="vp_bdVariable" placeholder="Variable" readonly="">
1615
</div>
1716
<div>
1817
<label for="vp_bdJoin" class="w100">Join</label>
@@ -62,19 +61,16 @@
6261
</div>
6362
<div>
6463
<label for="vp_bdOn" class="w100">On</label>
65-
<input type="text" id="vp_bdOn" placeholder="Merge key" disabled="">
66-
<button id="vp_bdOnSelect" class="vp-button w50">Edit</button>
64+
<input type="text" id="vp_bdOn" placeholder="Merge key" readonly="">
6765
</div>
6866
<div>
6967
<label for="vp_bdLeftOn" class="w100">Left on</label>
70-
<input type="text" id="vp_bdLeftOn" placeholder="Left key" disabled="">
71-
<button id="vp_bdLeftOnSelect" class="vp-button w50">Edit</button>
68+
<input type="text" id="vp_bdLeftOn" placeholder="Left key" readonly="">
7269
<label><input type="checkbox" id="vp_bdLeftIndex"><span>use index</span></label>
7370
</div>
7471
<div>
7572
<label for="vp_bdRightOn" class="w100">Right on</label>
76-
<input type="text" id="vp_bdRightOn" placeholder="Right key" disabled="">
77-
<button id="vp_bdRightOnSelect" class="vp-button w50">Edit</button>
73+
<input type="text" id="vp_bdRightOn" placeholder="Right key" readonly="">
7874
<label><input type="checkbox" id="vp_bdRightIndex"><span>use index</span></label>
7975
</div>
8076
<div>

js/m_apps/Bind.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ define([
7878
$(document).off('change', this.wrapSelector('#vp_bdType'));
7979

8080
$(document).off('change', this.wrapSelector('#vp_bdVariable'));
81-
$(document).off('click', this.wrapSelector('#vp_bdVariableSelect'));
81+
$(document).off('click', this.wrapSelector('#vp_bdVariable'));
8282
$(document).off('change', this.wrapSelector('#vp_bdJoin'));
8383
$(document).off('change', this.wrapSelector('#vp_bdAxis'));
8484
$(document).off('change', this.wrapSelector('#vp_bdSort'));
@@ -88,12 +88,12 @@ define([
8888
$(document).off('click', this.wrapSelector('.vp-bd-df-refresh'));
8989
$(document).off('change', this.wrapSelector('#vp_bdHow'));
9090
$(document).off('change', this.wrapSelector('#vp_bdOn'));
91-
$(document).off('click', this.wrapSelector('#vp_bdOnSelect'));
91+
$(document).off('click', this.wrapSelector('#vp_bdOn'));
9292
$(document).off('change', this.wrapSelector('#vp_bdLeftOn'));
93-
$(document).off('click', this.wrapSelector('#vp_bdLeftOnSelect'));
93+
$(document).off('click', this.wrapSelector('#vp_bdLeftOn'));
9494
$(document).off('change', this.wrapSelector('#vp_gbLeftIndex'));
9595
$(document).off('change', this.wrapSelector('#vp_bdRightOn'));
96-
$(document).off('click', this.wrapSelector('#vp_bdRightOnSelect'));
96+
$(document).off('click', this.wrapSelector('#vp_bdRightOn'));
9797
$(document).off('change', this.wrapSelector('#vp_gbRightIndex'));
9898
$(document).off('change', this.wrapSelector('#vp_bdLeftSuffix'));
9999
$(document).off('change', this.wrapSelector('#vp_bdRightSuffix'));
@@ -133,7 +133,7 @@ define([
133133
});
134134

135135
// variable select button event
136-
$(document).on('click', this.wrapSelector('#vp_bdVariableSelect'), function() {
136+
$(document).on('click', this.wrapSelector('#vp_bdVariable'), function() {
137137
that.openVariablePopup($(that.wrapSelector('#vp_bdVariable')));
138138
});
139139

@@ -196,20 +196,20 @@ define([
196196
that.state.merge.on = colList;
197197

198198
if (colList && colList.length > 0) {
199-
$(that.wrapSelector('#vp_bdLeftOnSelect')).attr('disabled', true);
200-
$(that.wrapSelector('#vp_bdRightOnSelect')).attr('disabled', true);
199+
$(that.wrapSelector('#vp_bdLeftOn')).attr('disabled', true);
200+
$(that.wrapSelector('#vp_bdRightOn')).attr('disabled', true);
201201
$(that.wrapSelector('#vp_bdLeftIndex')).attr('disabled', true);
202202
$(that.wrapSelector('#vp_bdRightIndex')).attr('disabled', true);
203203
} else {
204-
$(that.wrapSelector('#vp_bdLeftOnSelect')).attr('disabled', false);
205-
$(that.wrapSelector('#vp_bdRightOnSelect')).attr('disabled', false);
204+
$(that.wrapSelector('#vp_bdLeftOn')).attr('disabled', false);
205+
$(that.wrapSelector('#vp_bdRightOn')).attr('disabled', false);
206206
$(that.wrapSelector('#vp_bdLeftIndex')).attr('disabled', false);
207207
$(that.wrapSelector('#vp_bdRightIndex')).attr('disabled', false);
208208
}
209209
});
210210

211211
// on select button event
212-
$(document).on('click', this.wrapSelector('#vp_bdOnSelect'), function() {
212+
$(document).on('click', this.wrapSelector('#vp_bdOn'), function() {
213213
var targetVariable = [ that.state.merge.left.variable, that.state.merge.right.variable ];
214214
that.openColumnPopup(targetVariable, $(that.wrapSelector('#vp_bdOn')), 'Select columns from both dataframe');
215215
});
@@ -221,14 +221,14 @@ define([
221221

222222
if ((colList && colList.length > 0)
223223
|| that.state.merge.right.on && that.state.merge.right.on.length > 0) {
224-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', true);
224+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', true);
225225
} else {
226-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', false);
226+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', false);
227227
}
228228
});
229229

230230
// Left on select button event
231-
$(document).on('click', this.wrapSelector('#vp_bdLeftOnSelect'), function() {
231+
$(document).on('click', this.wrapSelector('#vp_bdLeftOn'), function() {
232232
var targetVariable = [ that.state.merge.left.variable ];
233233
that.openColumnPopup(targetVariable, $(that.wrapSelector('#vp_bdLeftOn')), 'Select columns from left dataframe');
234234
});
@@ -239,9 +239,9 @@ define([
239239
that.state.merge.left.useIndex = useIndex;
240240

241241
if (useIndex || that.state.merge.right.useIndex) {
242-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', true);
242+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', true);
243243
} else {
244-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', false);
244+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', false);
245245
}
246246
});
247247

@@ -252,14 +252,14 @@ define([
252252

253253
if ((colList && colList.length > 0)
254254
|| that.state.merge.left.on && that.state.merge.left.on.length > 0) {
255-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', true);
255+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', true);
256256
} else {
257-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', false);
257+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', false);
258258
}
259259
});
260260

261261
// Right on select button event
262-
$(document).on('click', this.wrapSelector('#vp_bdRightOnSelect'), function() {
262+
$(document).on('click', this.wrapSelector('#vp_bdRightOn'), function() {
263263
var targetVariable = [ that.state.merge.right.variable ];
264264
that.openColumnPopup(targetVariable, $(that.wrapSelector('#vp_bdRightOn')), 'Select columns from right dataframe');
265265
});
@@ -270,9 +270,9 @@ define([
270270
that.state.merge.right.useIndex = useIndex;
271271

272272
if (useIndex || that.state.merge.left.useIndex) {
273-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', true);
273+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', true);
274274
} else {
275-
$(that.wrapSelector('#vp_bdOnSelect')).attr('disabled', false);
275+
$(that.wrapSelector('#vp_bdOn')).attr('disabled', false);
276276
}
277277
});
278278

@@ -574,16 +574,16 @@ define([
574574
$(this.wrapSelector('#vp_bdHow')).val(merge.how);
575575
this._loadSelectorInput(this.wrapSelector('#vp_bdOn'), merge.on);
576576
if (merge.on && merge.on.length > 0) {
577-
$(this.wrapSelector('#vp_bdLeftOnSelect')).attr('disabled', true);
578-
$(this.wrapSelector('#vp_bdRightOnSelect')).attr('disabled', true);
577+
$(this.wrapSelector('#vp_bdLeftOn')).attr('disabled', true);
578+
$(this.wrapSelector('#vp_bdRightOn')).attr('disabled', true);
579579
$(this.wrapSelector('#vp_bdLeftIndex')).attr('disabled', true);
580580
$(this.wrapSelector('#vp_bdRightIndex')).attr('disabled', true);
581581
}
582582
this._loadSelectorInput(this.wrapSelector('#vp_bdLeftOn'), merge.left.on);
583583
this._loadSelectorInput(this.wrapSelector('#vp_bdRightOn'), merge.right.on);
584584
if (merge.left.on.length > 0 || merge.right.on.length > 0
585585
|| merge.left.useIndex || merge.right.useIndex) {
586-
$(this.wrapSelector('#vp_bdOnSelect')).attr('disabled', true);
586+
$(this.wrapSelector('#vp_bdOn')).attr('disabled', true);
587587
}
588588

589589
$(this.wrapSelector('#vp_bdLeftIndex')).prop('checked', merge.left.useIndex);

0 commit comments

Comments
 (0)