Skip to content

Commit 3380ee9

Browse files
authored
Merge pull request #259 from AtlasOfLivingAustralia/feature/issue258
Updated to bs4 styles #258
2 parents 5045e20 + 1ae9fb8 commit 3380ee9

File tree

5 files changed

+50
-40
lines changed

5 files changed

+50
-40
lines changed

grails-app/assets/components/javascript/multi-input.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ko.components.register('multi-input', {
33
var self = this;
44

55
self.observableValues = ko.observableArray();
6+
self.addValueText = params.addValueText;
67

78
// This method updates the values parameter with the contents of the managed array.
89
function syncValues() {
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<div data-bind="foreach: observableValues">
2-
<div class="input-append">
3-
<span data-bind="template:{nodes:$componentTemplateNodes}"></span><span class="add-on"
4-
data-bind="click:$parent.removeValue"><i
5-
class="fa fa-remove"></i></span>
2+
<div class="input-group mb-1">
3+
<!-- ko template: { nodes: $componentTemplateNodes } -->
4+
<!-- /ko -->
5+
<div class="input-group-append">
6+
<span class="input-group-text" data-bind="click:$parent.removeValue"><i class="fa fa-remove"></i></span>
7+
</div>
8+
69
</div>
710
</div>
8-
<i class="fa fa-plus" data-bind="click:addValue"></i>
11+
<span><i class="fa fa-plus" data-bind="click:addValue"></i> <span data-bind="text:addValueText || 'Click to add'"></span></span>

package-lock.json

+39-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@turf/convex": "^6.0.2",
2222
"@turf/length": "^6.0.2",
2323
"@turf/simplify": "^5.1.5",
24-
"chromedriver": "125.0.3",
24+
"chromedriver": "127.0.3",
2525
"geojson2svg": "^1.2.3",
2626
"handlebars": "^4.7.7",
2727
"jasmine-ajax": "^4.0.0",

src/integration-test/groovy/pages/MultiInput.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class MultiInput extends Module {
66
static content = {
77
addItem(required: true) { $("multi-input i.fa-plus.fa") }
88
inputItem(required: false) { $("multi-input input") }
9-
removeItem(required: false) { $("multi-input span.add-on") }
9+
removeItem(required: false) { $("multi-input span.input-group-text") }
1010
}
1111
}

0 commit comments

Comments
 (0)