Skip to content

Commit

Permalink
Merge pull request #2597 from kobotoolbox/623-improve-autonaming
Browse files Browse the repository at this point in the history
Improve autonaming
  • Loading branch information
magicznyleszek committed Mar 16, 2020
2 parents 5c6c7dd + 5a2e9a5 commit f8afe37
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion jsapp/js/formbuild/containers/KoboMatrix.es6
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class KoboMatrix extends React.Component {
lowerCase: true,
lrstrip: true,
preventDuplicateUnderscores: true,
characterLimit: 14,
characterLimit: 40,
incrementorPadding: false,
validXmlTag: false,
replaceNonWordCharacters: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,21 @@
overflow: hidden;

label {
width: 32%;
display: inline-block;
width: 40%;
padding-left: 4px;
color: #7E858C;
}

span, .editable-container {
span,
.editable-container {
text-align: right;
display: inline-block;
float: right;
width: 64%;
width: 60%;
padding-right: 4px;
color: #7E858C;
text-align: right;
overflow-wrap: break-word;
cursor: text;
}

Expand All @@ -123,8 +126,9 @@
text-align: right;
display: inline-block;
float: right;
width: 60% !important;
color: $linkColor;
line-height: 1em;
line-height: inherit;
font-size: 11px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion jsapp/xlform/src/model.choices.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = do ->
preventDuplicates: names
lowerCase: true
lrstrip: true
characterLimit: 14
characterLimit: 40
incrementorPadding: false
validXmlTag: false
})
Expand Down
4 changes: 2 additions & 2 deletions jsapp/xlform/src/view.choices.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = do ->
@t = $("<i class=\"fa fa-trash-o js-remove-option\">")
@pw = $("<div class=\"editable-wrapper js-cancel-select-row\">")
@p = $("<span class=\"js-cancel-select-row\">")
@c = $("<code><label>#{_t("Value:")}</label> <span class=\"js-cancel-select-row\">#{_t("AUTOMATIC")}</span></code>")
@c = $("<code><label>#{_t("XML value:")}</label> <span class=\"js-cancel-select-row\">#{_t("AUTOMATIC")}</span></code>")
@d = $('<div>')
if @model
@p.html @model.get("label") || 'Empty'
Expand Down Expand Up @@ -116,7 +116,7 @@ module.exports = do ->
lowerCase: false
lrstrip: true
incrementorPadding: false
characterLimit: 14
characterLimit: 40
validXmlTag: false
nonWordCharsExceptions: '+-.'
})
Expand Down
2 changes: 1 addition & 1 deletion jsapp/xlform/src/view.choices.templates.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = do ->
"""<div class="card__addoptions">
<div class="card__addoptions__layer"></div>
<ul><li class="multioptions__option xlf-option-view xlf-option-view--depr">
<div><div class="editable-wrapper"><span class="editable editable-click">+ #{_t("Click to add another response...")}</span></div><code><label>#{_t("Value:")}</label> <span>#{_t("AUTOMATIC")}</span></code></div>
<div><div class="editable-wrapper"><span class="editable editable-click">+ #{_t("Click to add another response...")}</span></div><code><label>#{_t("XML value:")}</label> <span>#{_t("AUTOMATIC")}</span></code></div>
</li></ul>
</div>"""

Expand Down

0 comments on commit f8afe37

Please sign in to comment.