Skip to content

Commit 875db1d

Browse files
author
Nick Jansen
committed
Made sure only non capital characters are added when the enableCapitals switch is off.
1 parent 9f071fd commit 875db1d

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

dist/custom.LabelSelect.mpk

26 Bytes
Binary file not shown.

src/LabelSelect/LabelSelect.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
<category>Behavior</category>
6060
<description>Enable creating new labels.</description>
6161
</property>
62-
<property key="enableCaseSensitive" type="boolean" defaultValue='true'>
63-
<caption>Enable case sensitivity</caption>
62+
<property key="enableCapitals" type="boolean" defaultValue='true'>
63+
<caption>Enable capital characters</caption>
6464
<category>Behavior</category>
65-
<description>Enable case sensitive labels.</description>
65+
<description>Enable capital characters in labels.</description>
6666
</property>
6767
<property key="readOnly" type="boolean" defaultValue='false'>
6868
<caption>Read Only</caption>

src/LabelSelect/widget/LabelSelect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ define([
165165
entity: this._tagEntity,
166166
callback: lang.hitch(this, function(obj) {
167167
//set the value
168-
obj.set(this._tagAttribute, value);
168+
this.enableCapitals ? obj.set(this._tagAttribute, value) : obj.set(this._tagAttribute, value.toLowerCase());
169169
//save
170170
mx.data.commit({
171171
mxobj: obj,
@@ -291,7 +291,7 @@ define([
291291
enableCreate: this.enableCreate,
292292
showAutocompleteOnFocus: this.showAutoCompleteOnFocus,
293293
removeConfirmation: false,
294-
caseSensitive: this.enableCaseSensitive,
294+
enableCapitals: this.enableCapitals,
295295
allowDuplicates: false,
296296
allowSpaces: false,
297297
readOnly: this._readOnly,
26 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)