Conversion and layout problem
Posted: Wed May 11, 2016 12:58 pm
Hi again,
I'm trying to insert some fields into a mobile device layout automatically during conversion of DDS files.
I've put the following code into my conversion theme:
fkeys buttons are OK, they are correctly inserted in the bottom container of the layout but others fields are not.
In the browser console, they seem to be fine:
but if i save to a json file here is what i get:
I don't understand how these attributes (layout and container) are lost.
I'm trying to insert some fields into a mobile device layout automatically during conversion of DDS files.
I've put the following code into my conversion theme:
Code: Select all
"process field": function(field, item, isSubfile, isWindow){
if (!isWindow){
item.layout = "MainPanel";
if(field.row <= 2) {
item.container = "1";
console.log(item);
item["css class"] = "top-line";
} else {
item.container = "2";
}
}
},
"process fkey": function(keyword, item, format, member) {
item.layout = "MainPanel";
item.container = "3";
console.log(item);
},
In the browser console, they seem to be fine:
Code: Select all
Object { id: "constant1", field type: "output field", value: " GESTION DES EMPLOYES ", css class: "ld-constant", left: "240px", cursor column: "30", top: "20px", cursor row: "1", css class 2: "top-line", layout: "MainPanel", container: "1"}
Code: Select all
{ "id": "constant1", "field type": "output field", "value": " GESTION DES EMPLOYES ", "css class": "top-line", "left": "240px", "cursor column": "30", "top": "20px", "cursor row": "1", "css class 2": "top-line" }