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" }