Added test code

This commit is contained in:
Alejandro Gallardo Escobar 2014-12-17 12:26:41 +01:00
parent daca918ee6
commit b628faaeac
1 changed files with 89 additions and 0 deletions

View File

@ -691,6 +691,10 @@ enterprise_hook('close_meta_frame');
ui_include_time_picker();
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/");
ui_require_javascript_file("TreeController", "include/javascript/tree/");
echo "<div id='tree-controller-recipient'>";
//echo html_print_image ("images/pandora.ico.gif", true);
echo "</div>";
?>
<script language="javascript" type="text/javascript">
@ -968,4 +972,89 @@ ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascri
return false;
});
}
var tree = [
{
id: 1,
name: "group1",
type: "group",
children: [
{
id: 1,
name: "agent1",
type: "agent",
children: [
{
id: 5,
name: "agent5",
type: "agent"
}
]
},
{
id: 2,
name: "agent2",
type: "agent"
}
]
},
{
id: 2,
name: "group2",
type: "group",
children: []
},
{
id: 3,
name: "group3",
type: "group",
children: []
},
{
id: 4,
name: "group4",
type: "group",
children: [
{
id: 3,
name: "agent3",
type: "agent"
},
{
id: 4,
name: "agent4",
type: "agent",
children: [
{
id: 6,
name: "agent6",
type: "agent"
},
{
id: 7,
name: "agent7",
type: "agent",
children: [
{
id: 8,
name: "agent8",
type: "agent"
},
{
id: 9,
name: "agent9",
type: "agent"
}
]
}
]
}
]
}
];
var treeController = TreeController.getController();
treeController.init({
recipient: $("div#tree-controller-recipient"),
tree: tree
});
</script>