Skip to content

Commit 369444d

Browse files
author
minjk-bl
committed
Add Text checkbox on Reshape - melt page
1 parent 0e7b602 commit 369444d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

html/m_apps/reshape.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@
5959
<div>
6060
<label for="vp_rsVarName" class="w100">Var name</label>
6161
<input type="text" id="vp_rsVarName" class="vp-state" data-key="melt.varName" placeholder="Var name">
62+
<label><input type="checkbox" id="varNameText" class="vp-state" data-key="melt.varNameText" checked/><span>Text</span></label>
6263
</div>
6364
<div>
6465
<label for="vp_rsValueName" class="w100">Value name</label>
6566
<input type="text" id="vp_rsValueName" class="vp-state" data-key="melt.valueName" placeholder="Value name">
67+
<label><input type="checkbox" id="valueNameText" class="vp-state" data-key="melt.valueNameText" checked/><span>Text</span></label>
6668
</div>
6769
</div>
6870
<hr style="margin: 5px 0;">

js/m_apps/Reshape.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ define([
4545
idVars: [],
4646
ValueVars: [],
4747
varName: '',
48-
valueName: ''
48+
varNameText: true,
49+
valueName: '',
50+
valueNameText: true
4951
},
5052
userOption: '',
5153
allocateTo: '',
@@ -304,7 +306,9 @@ define([
304306
this._loadColumnSelectorInput(this.wrapSelector('#vp_rsIdVars'), melt.idVars);
305307
this._loadColumnSelectorInput(this.wrapSelector('#vp_rsValueVars'), melt.valueVars);
306308
$(this.wrapSelector('#vp_rsVarName')).val(melt.varName);
309+
$(this.wrapSelector('#varNameText')).prop('checked', melt.varNameText);
307310
$(this.wrapSelector('#vp_rsValueName')).val(melt.valueName);
311+
$(this.wrapSelector('#valueNameText')).prop('checked', melt.valueNameText);
308312

309313
// userOption
310314
$(this.wrapSelector('#vp_rsUserOption')).val(userOption);
@@ -520,12 +524,12 @@ define([
520524

521525
// var name (optional)
522526
if (melt.varName) {
523-
options.push(com_util.formatString("var_name='{0}'", melt.varName));
527+
options.push(com_util.formatString("var_name={0}", com_util.convertToStr(melt.varName, melt.varNameText)));
524528
}
525529

526530
// value name (optional)
527-
if (melt.varName) {
528-
options.push(com_util.formatString("value_name='{0}'", melt.valueName));
531+
if (melt.valueName) {
532+
options.push(com_util.formatString("value_name={0}", com_util.convertToStr(melt.valueName, melt.valueNameText)));
529533
}
530534
}
531535

0 commit comments

Comments
 (0)