Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesGrimont committed Jan 6, 2025
1 parent ec3ac68 commit 8d75853
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion _c8oProject/sequences/formssource_GetTableData.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ comment: |
var current = elem[key];
if(current != null){
obj[key] = {"displayName": key, "type": "html", value:""};
var result = computeAnyType(current);
var result = computeAnyType(current, false);
html += result.innerHtml;
obj[key].value = result.value;
if(key == "id" || key == "order" || (jConfig.hidden ? jConfig.hidden.includes(key) : false)){
Expand Down
2 changes: 1 addition & 1 deletion c8oProject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
contextTimeout: ${lib_baserow.context_timout=3600}
corsOrigin: =Origin
httpSessionTimeout: ${lib_baserow.session_timout=3600}
version: 1.1.7
version: 1.1.8
↓Baserow_API_spec [connectors.HttpConnector]: 🗏 connectors/Baserow_API_spec.yaml
↓MediaConnector [connectors.HttpConnector]: 🗏 connectors/MediaConnector.yaml
↓_disabled_formssource_GetSelectDataOld [sequences.GenericSequence]: 🗏 sequences/_disabled_formssource_GetSelectDataOld.yaml
Expand Down
24 changes: 12 additions & 12 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,52 +35,52 @@ var get_base_array_image_html = (url)=>{
var get_base_array_link_html = (url, visibleName)=>{
return "<p style='background-color : lightgray;' ><a src=\"" + url + "\" >" + visibleName + "</a></p>"
}
var computeAnyType = (element)=>{
var computeAnyType = (element, nested)=>{
var value;
var innerHtml = "";
if(Array.isArray(element)){
value = [];
element.forEach((arrayItem)=>{
var result = computeAnyType(arrayItem);
var result = computeAnyType(arrayItem, true);
value.push(result.value);
innerHtml += result.innerHtml;
});
innerHtml += close_html;
//innerHtml += close_html;
}
else if(typeof element == "object"){
if(element.value != undefined && typeof element.value == "object"){
var result = computeAnyType(element.value);
var result = computeAnyType(element.value, true);
innerHtml = result.innerHtml;
value = result.value;
}
else if(element.value != undefined){
innerHtml = get_base_array_html(element.value, element.color) + close_html;
innerHtml = get_base_array_html(element.value, element.color); // + close_html;
value = element;
}
else if(element.name != undefined && element.is_image == undefined && element.url == undefined) {
innerHtml = get_base_array_html(element.name, element.color) + close_html;
innerHtml = get_base_array_html(element.name, element.color); // + close_html;
value = element;
}
else if(element.url != undefined && element.label != undefined && element.is_image == undefined){
innerHtml = get_base_btn_html(element.url, element.label, "light-blue") + close_html;
innerHtml = get_base_btn_html(element.url, element.label, "light-blue"); // + close_html;
value = element;
}
else if(element.is_image != undefined){
if(element.is_image == true){
innerHtml = get_base_array_image_html(element.url) + close_html;
innerHtml = get_base_array_image_html(element.url); // + close_html;
}
else{
innerHtml = get_base_array_link_html(element.url, arrayItem.visible_name) + close_html;
innerHtml = get_base_array_link_html(element.url, arrayItem.visible_name); // + close_html;
}
value = element;
}
else{
log.warn("toto");
log.warn("type not handled");
}
}
else{
innerHtml = element + close_html;
innerHtml = element; // + close_html;
value = element;
}
return {innerHtml: innerHtml, value: value};
return {innerHtml: innerHtml + (nested ? "" : close_html), value: value};
}
2 changes: 1 addition & 1 deletion project.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is the Baserow No Code connector for Convertigo. Use this connector to exch
## ![](https://github.com/convertigo/convertigo/blob/develop/engine/src/com/twinsoft/convertigo/beans/references/images/ProjectSchemaReference_16x16.png?raw=true "ProjectSchemaReference") C8Oforms


see [readme](https://github.com/convertigo/C8oForms/tree/hotfix/2.0.4#readme)
see [readme](https://github.com/convertigo/C8oForms/tree/hotfix/2.0.5#readme)
</p></blockquote></details>

<details><summary><b>CouchDb_schema</b></summary><blockquote><p>
Expand Down

0 comments on commit 8d75853

Please sign in to comment.