Skip to content

Commit

Permalink
Added palceholder to use . in group
Browse files Browse the repository at this point in the history
  • Loading branch information
kappu committed Feb 7, 2017
1 parent 231244d commit 023fa81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions web/client/components/TOC/fragments/settings/General.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ const General = React.createClass({
},
getGroups(groups, idx = 0) {
return groups.filter((group) => group.nodes).reduce((acc, g) => {
acc.push({label: g.id.replace(/\./g, '/'), value: g.id});
acc.push({label: g.id.replace(/\./g, '/').replace(/\${dot}/g, '.'), value: g.id});
if (g.nodes.length > 0) {
return acc.concat(this.getGroups(g.nodes, idx + 1));
}
return acc;
}, []);
},
getLabelName(groupLable = "") {
return groupLable.replace(/\./g, '/');
return groupLable.replace(/\./g, '/').replace(/\${dot}/g, '.');
},
render() {
return (<form ref="settings">
Expand Down Expand Up @@ -81,8 +81,8 @@ const General = React.createClass({
})).indexOf(search) > -1) {
return null;
}
const val = search.replace(/\//g, '.');
return {label: val, value: val};
const val = search.replace(/\./g, '${dot}').replace(/\//g, '.');
return {label: search, value: val};
}}

onValueChange={function(item) {
Expand Down
2 changes: 1 addition & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const reorderLayers = (groups, allLayers) => {
const createGroup = (groupId, groupName, layers, addLayers) => {
return assign({}, {
id: groupId,
title: (groupName || "").replace(/\${dot}/g, "."),
name: groupName,
title: groupName,
nodes: addLayers ? getLayersId(groupId, layers) : [],
expanded: true
});
Expand Down

0 comments on commit 023fa81

Please sign in to comment.