The velo function Tree creates a nested tree.
Html
<div id="pm_pakket" class="listgroup"></div>
*Italic attributes are optional
*Bold attributes are mandatory
*Bold attributes are mandatory
JS
new Velo({
el: "pm_pakket",
type: velo.Constants.elementtypes.TREE,
data: {
function: velo.Data.get.vmpakkettree,
input: [],
outputType: "CATEGORY" //Model that returns
},
expanded: false,
singleSelect: false,
selectFunction: function(_this) {
var bRemove = (velo.Utils.hasClass(_this.parentElement, "selected"));
GetVitesCall(apiPath + "SetVMUserFilter", JSON.stringify({type: 1, value: _this.itemid, remove: bRemove}), function() {
getVendors("pm_pakket");
});
},
unselectFunction: function(_this) {
var bRemove = (velo.Utils.hasClass(_this.parentElement, "selected") == true ? false : true);
GetVitesCall(apiPath + "SetVMUserFilter", JSON.stringify({type: 1, value: _this.itemid, remove: bRemove}), function() {
getVendors("pm_pakket");
});
}
});
- CATEGORY (VendorLink.Services.Pakket.TreeItem)
- CONTRACT (VendorLink.Services.Contracts.TreeItem)