or
if
(options.content && !isLocalUrl(options.content)) {
contentHtml.html(templates.iframe(options));
}
I think it's worth to give the programmer to decide on the insertiframe. It may be helpful:)
var
metaDataSource
;
function
createPieChart() {
$(
"#pie"
).kendoChart({
dataSource: metaDataSource,
title: {
text:
"Total XDC Hits"
},
legend: {
position:
"bottom"
},
seriesDefaults: {
type:
"pie"
,
labels: {
visible:
"true"
,
template:
"#= kendo.format('{0:P}', percentage)#"
}
},
series:
[{
field:
"TotalHits"
,
categoryField:
"Name"
}],
chartArea: {
height: 300,
margin: 1
},
plotArea: {
margin: 1
}
});
}
function
createList() {
$(
"#list"
).kendoDropDownList({
index: 0,
dataSource : metaDataSource,
dataTextField:
"Name"
,
dataValueField:
"ID"
,
change: onSelectXDC
});
}
function
onSelectXDC() {
var
dl=$(
"#list"
).data(
"kendoDropDownList"
);
var
txt = dl.text();
var
val = dl.value();
log(kendo.format(
"Select XDC :: {0} {1}"
, txt, val ));
}
function
OnListXDC(e) {
var
view = metaDataSource.view();
log(kendo.format(
"ds listxdc, #rows={0}"
,view.length));
$(view).each(
function
() {
log(kendo.format(
"ID={0}, Name={1}, Hits={2}"
,
this
.ID,
this
.Name,
this
.TotalHits));
});
}
$(document).ready(
function
(){
metaDataSource =
new
kendo.data.DataSource({
transport: {
read: {
url:
"/metrics/listxdc"
,
data: {
json:
"true"
,
simu:
"true"
}
}
},
schema: {
model: {
fields: {
ID: { type:
"number"
},
Name: { type:
"string"
},
Path: { type:
"string"
},
TotalHits: { type:
"number"
}
}
}
},
change: OnListXDC
});
createList();
createPieChart();
});
var
stuff = [
{
FirstName:
"Joe"
,
LastName:
"Smith"
},
{
FirstName:
"Jane"
,
LastName:
"Smith"
}];
var
ds =
new
kendo.data.DataSource({data: stuff});
$(
"#grid"
).kendoGrid({
columns:[
{
field:
"FirstName"
,
title:
"First Name"
},
{
field:
"LastName"
,
title:
"Last Name"
}],
dataSource: ds.filter([{ field:
"FirstName"
, operator:
"neq"
, value:
"Joe"
}])
});
<
div
class
=
"k-widget k-window panel"
>