<script id="treeview-template" type="text/kendo-ui-template">
# var id = item.id; #
# var name = item.text; #
# var parentId = item.parentId; #
#= item.parentid #
# if (item.parentid == null) { #
test
# } #
<span categoryId="#= id #" class="#= parentId #">#= name #</span>
<input type="hidden" name="#= name #" value="#= id #" />
</script>
Any way for me to disable the nodes where the parentId is null?
I tried doing this without success:-
# if (item.parentid == null) { #
<span categoryId="#= id #" class="k-denied">#= name #</span>
# } #
Thanks
Gregor
<liferay-ui:ratings-score score="5"></liferay-ui:ratings-score> does not work. It prints the output of this custom tag right on the top of the page.
Actually it prints the output of the above mentioned custom tag in the template as well as on the left top corner of the page
Any help ?
var ticketDataSource = new kendo.data.DataSource({
transport: {
read: "/support/data",
dataType: "json",
create: {
url: function() {
if (support_create_type == 'new'){
var url = "/support/newticketpost/";
} else if (support_create_type == 'reply'){
var url = "/support/reply/" + support_id + "/";
}
return url;
},
type: "POST",
dataType: "json"
},
update: {
url: function() {
if (support_update_type == 'markasread'){
var url = "/support/markasread/" + support_id + "/";
} else if (support_update_type == 'close'){
var url = "/support/close/" + support_id + "/" + support_ticket_closed;
}
return url;
},
type: "POST",
dataType: "json"
},
},
error: function(e) {
alert(e.responseText);
},
sort: { field: "DateCreated", dir: "asc" },
schema: {
model: {
id: "ThreadID",
fields: {
DateCreated: { type: "date" },
Subject: { type: "string" },
Closed: { type: "string" }
}
}
}
});
$(
function
() {
var
grid = $(
"#grid"
).kendoGrid({
dataSource : {
pageSize:10,
sort : {
field :
"firstname"
,
dir :
"asc"
},
transport : {
read :
"data/getemployees.php"
},
schema : {
data :
"data"
,
total:
"data.length"
},
},
pageable:
true
,
columns : [{
field :
"firstname"
,
title :
"First Name"
}, {
field :
"lastname"
,
title :
"Last Name"
}, {
field :
"cellphone"
,
title :
"Cell Phone"
}, {
field :
"deskphone"
,
title :
"Desk Phone"
}, {
field :
"emailaddress"
,
title :
"Email Address"
},{
command:{text:
"vCard"
, className:
"vCardButton"
}, title:
"vCard"
, width:
"110px"
}],
sortable:
true
,
});
$(
"#grid"
).delegate(
".vCardButton"
,
"click"
,
function
(e) {
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
var
myVar = grid.dataItem(grid.tbody.find(
">tr"
));
});
});
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
type: "jsonp",
serverPaging: true,
serverSorting: true,
pageSize: 13,
transport: {
read: "../../emrwebservices/service.asmx/getSampleSQLDataKendo"}
},
schema: {
data: 'items',
total : function(data) {return data.totalCount;
}
},
height: 250,
scrollable: true,
sortable: true,
pageable: true,
columns: [
{ field: "userID", title: "User ID" },
{ field: "fullName", title: "Name" },
{ field: "userName", title: "User Name" },
{ field: "eMail" },
{ field: "isActive"}
]
});
});
Web Service data is below. Also viewable at http://www.speechtodocs.com/emrwebservices/service.asmx
{"totalCount":80,"items":[{"userID":"227","fullName":"Dr. Hank Aaron","userName":"HankAaron","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"197","fullName":"Dr. Jeffrey Aronoff","userName":"4690","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"189","fullName":"Dr. Sunil Asnani","userName":"4749","eMail":"melissa@dmmt.com","isActive":"True"},{"userID":"165","fullName":"Dr. Kalman etc..................