Hi, i am using a 4.2.2 android tablet
this is an example.
I think it happens when i try to overwrite sidemenu content.
If not, the tree loads correctly.
hope it helps!
Here is my sample:
var _mainUI = {};
_mainUI.elements = {};
_mainUI.elements.sideMenu =
{
view: “eventlayout”,
id: “sideMenu”,
rows:
[
{ view: “button”, type: “image”, id: “ibMenu1”, label: “Menu1”, image: “” },
{ view: “button”, type: “image”, id: “ibMenu2”, label: “Menu2”, image: “” },
{ view: “button”, type: “image”, id: “ibMenu3”, label: “Menu3”, image: “” }
]
}
_mainUI.elements.sideTree =
{
view: “eventlayout”,
id: “sideMenu”,
type: “clean”,
rows:
[
{
view: “form”, elements:
[
{ view: “template”, height: 35, template: “
Title
” },
{
view: “tree”,
activeTitle: true,
scroll: true,
threeState: true,
type:
{
checkbox: function (obj) {
if (obj.nocheckbox)
return "";
var attrs = (obj.checked ? "checked" : "") + (obj.disabled ? " disabled" : "");
return "<input type='checkbox' class='webix_tree_checkbox webix_custom_checkbox' " + attrs + " style='background-color:#fff' />";
}
},
template: function (obj, common) { return common.icon(obj, common) + common.checkbox(obj, common) + "<span style='color:#EE7402;'>" + obj.value + "</span>" },
data:
[
{ id: "1", open: true, value: "Categoria 1",
data:
[
{ id: "1.1", value: "subcategoria 1" },
{ id: "1.2", value: "subcategoria 2" },
{ id: "1.3", value: "subcategoria 3" }
]
},
{ id: "2", open: true, value: "Categoria 2",
data:
[
{ id: "2.1", value: "subcategoria 1" },
{ id: "2.2", value: "subcategoria 2" }
]
}
]
}
]
}
]
}
function switchMenu() {
// sidemenu
$$("index").define("menuWidth", 200);
$$("index").define("autoCollapse", true);
$$("index").resize();
webix.ui([_mainUI.elements.sideMenu], $$('sideMenu'));
$$("index").expand();
}
function switchTree() {
// sidemenu
$$("index").define("menuWidth", 400);
//$$("index").define("autoCollapse", false);
$$("index").resize();
webix.ui([_mainUI.elements.sideTree], $$('sideMenu'));
$$("index").expand();
}
_mainUI.elements.index =
{
view: "sidemenu",
menuWidth: 300,
id: "index",
menu:
{
view: "eventlayout",
id: "sideMenu",
rows: [_mainUI.elements.sideMenu]
},
body:
{
view: "eventlayout",
type: "clean",
cols:
[
{ view: "template", template: "<span onclick='javascript:switchMenu();'>menu</span>", click: "switchMenu()" },
{ view: "template", template: "<span onclick='javascript:switchTree();'>tree</span>", click: "switchTree()" }
]
}
}
_mainUI.configMobile =
{
view: “eventlayout”,
type: “clean”,
id: “mainLayOut”,
height: 500,
width: 500,
rows:
[
_mainUI.elements.index
]
}
_mainUI.init = function () {
webix.protoUI(
{ name: "eventlayout"
}, webix.ui.layout, webix.EventSystem);
webix.Date.Locale = {
month_full: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
month_short: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
day_full: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"],
day_short: ["Dom", "Lun", "Mar", "Mie", "Jue", "Vie", "Sab"]
};
webix.ui(_mainUI.configMobile);
};
Thanks and regards!