or
function createChart() {
$(".chart").kendoChart({
theme: $(document).data("kendoSkin") || "default",
legend: {
position: "bottom",
visible: false,
},
chartArea: {
background: "",
margin: 0,
},
plotArea: {
margin: 0,
border: {
width: 0
}
},
seriesDefaults: {
type: "line" ,
border: {
width: 1
},
margin: 0,
width: 1,
markers: {
visible: false,
}
},
series: [{
data: [0, 5, 5, 6, 8, 12, 16, 19, 20, 20, 23, 25, 28, 29, 29, 29, 32, 35, 35],
}],
valueAxis: {
majorUnit: 25,
max: 100,
min: 0,
majorGridLines: {
dashType: "dash",
}
},
categoryAxis: {
max: 65,
min: 0,
line: {
dashType: "dash" //or "dash", "longdash", "dashdot", "longdashdot" and "longdashdotdot"
},
majorGridLines: {
width: 1,
},
categories: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65 ],
majorUnit: 10,
},
tooltip: {
visible: true,
format: "{0}%",
},
axisDefaults: {
labels: {
visible: false
},
majorTickType: "none",
majorGridLines: {
width: 1,
},
}
});
}
$(document).ready(function() {
setTimeout(function() {
createChart();
// Initialize the chart with a delay to make sure
// the initial animation is visible
}, 400);
$(document).bind("kendo:skinChange", function(e) {
createChart();
});
});
<
script
type
=
"text/javascript"
>
function RefCarrierRank_ErrorHandler(e) {
}
function RefCarrierRankEdit(e) {
if (e.container[0].cellIndex == 2) {
$(".k-selected-color").css("width", "100%");
$("#RankColor").data("kendoColorPicker").open();
}
}
</
script
>
<
div
id
=
"RefCarrierRankContainer"
>
<
h3
style
=
"margin:1px;"
>Rank Dictionary</
h3
>
@(Html.Kendo().Grid(Model.AdminModel.GlobalDictionary.RefCarrierRankModels)
.Name("RefCarrierRank")
.Columns(columns =>
{
columns.Bound(item => item.Name);
columns.Bound(item => item.Rank)
.EditorTemplateName("RefCarrierRank/Rank");
columns.Bound(item => item.RankColor)
.ClientTemplate("<
div
class
=
'k-textbox'
style
=
'background-color:#=RankColor#; width:80px; height:20px;'
></
div
>")
.EditorTemplateName("RefCarrierRank/RankColor").Width(100);
columns.Command(command =>
{
command.Destroy();
}).Width(100);
})
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.Events(events =>
{
events.Edit("RefCarrierRankEdit");
})
.Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Top))
.Navigatable(navigatable => navigatable.Enabled(true))
.Pageable(pageAction =>
{
pageAction.PageSizes(new int[] { 5, Model.AdminModel.GlobalDictionary.RefCarrierRankModels.Count });
})
.Sortable()
.Scrollable()
.Filterable()
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(false)
.Events(events =>
{
events.Error("RefCarrierRank_ErrorHandler");
})
.Sort(sort =>
{
sort.Add("Rank").Ascending();
})
.Model(model =>
{
model.Id(i => i.RefCarrierRankID);
model.Field(i => i.Rank).DefaultValue(Model.AdminModel.GlobalDictionary.RefCarrierRankModels.Max(i => i.Rank) + 1);
model.Field(i => i.RankColor).DefaultValue("#a8a8a8");
})
.Read(read => read.Action("GetRefCarrierRanks", "Dictionary"))
.Create(create => create.Action("CreateRefCarrierRanks", "Dictionary"))
.Update(update => update.Action("UpdateRefCarrierRanks", "Dictionary"))
.Destroy(delete => delete.Action("DeleteRefCarrierRanks", "Dictionary"))
)
)
</
div
>
@(Html.Kendo().ColorPicker()
.Name("RankColor")
.Value("#=RankColor#")
.Opacity(true)
)
Timestamp: 3.12.2013 14:09:09
Error: TypeError: t.getAttribute is not a function
Source File: http://localhost:44112/Resources/scripts/vendor/kendoUI/js/kendo.all.min.js
Line: 9
<!DOCTYPE html>
<
html
>
<
head
runat
=
"server"
>
<
style
>
.gumb {
display: inline-block;
}
.container-gumbi {
float: right;
margin-top: 5px;
}
.kocka {
display: inline-block;
}
.kockaimg {
display: inline-block;
vertical-align: middle;
}
p.info-text {
margin: auto;
font-size: 10px;
}
p.date-text {
margin-top: 5px;
font-size: 13px;
font-weight: 800;
margin-bottom: 0px;
}
p.opis-text {
margin-top: 5px;
font-size: 11px;
font-weight: 500;
margin-bottom: 0px;
}
p.denar-text {
margin-top: 5px;
font-size: 14px;
font-weight: 800;
margin-bottom: 0px;
}
</
style
>
<
title
></
title
>
<
link
href
=
"/../../../Resources/scripts/vendor/kendoUI/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"/../../../Resources/scripts/vendor/kendoUI/styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"/../../../Resources/scripts/vendor/kendoUI/styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
<
script
src
=
"/../../../Resources/scripts/vendor/kendoUI/js/jquery.min.js"
></
script
>
<
script
src
=
"/../../../Resources/scripts/vendor/kendoUI/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
div
data-role
=
"view"
id
=
"listview-templates"
data-init
=
"mobileListViewTemplatesInit"
data-title
=
"ListView"
>
<
div
class
=
"head"
> </
div
>
<
ul
id
=
"custom-listview"
></
ul
>
</
div
>
<<
script
type
=
"text/x-kendo-template"
id
=
"customListViewTemplate"
>
<
li
>
<
div
class
=
"kockaimg"
>
<
img
width
=
"50"
height
=
"50"
src
=
"../../../clipart-generic-logo-d2f5.png"
/>
</
div
>
<
div
class
=
"kocka"
>
<
h4
><
span
>#:nazivNarocnika#</
span
></
h4
>
</
div
>
</
li
>
<
li
>
<
div
class
=
"kocka"
>
<
p
class
=
"info-text"
>
Datum lansiranja:<
br
/>
</
p
>
<
p
class
=
"date-text"
>#:dtLansiranja#</
p
>
</
div
>
<
div
class
=
"kocka"
>
<
p
class
=
"info-text"
>
Datum pričetka:<
br
/>
</
p
>
<
p
class
=
"date-text"
>#:dtPricetka#</
p
>
</
div
>
<
div
class
=
"kocka"
>
<
p
class
=
"info-text"
>
Datum zaključka:<
br
/>
</
p
>
<
p
class
=
"date-text"
>#:dtZakljucka#</
p
>
</
div
>
</
li
>
<
li
>
<
p
class
=
"info-text"
>
Opis:<
br
/>
</
p
>
<
p
class
=
"opis-text"
>#:opis#</
p
>
</
li
>
<
li
>
<
div
class
=
"kocka"
>
<
p
class
=
"info-text"
>
Trenutna ponudba:<
br
/>
</
p
>
<
p
class
=
"denar-text"
>#:cena# €</
p
>
</
div
>
<
div
class
=
"container-gumbi"
>
<
div
class
=
"gumb"
>
<
a
class
=
"k-button"
data-icon
=
"add"
style
=
"font-size: 10px"
data-role
=
"button"
href
=
""
>Dodaj ponudbo</
a
>
</
div
>
<
div
class
=
"gumb"
>
<
a
class
=
"k-button"
data-icon
=
"info"
style
=
"font-size: 10px"
data-role
=
"button"
href
=
""
>Podrobno</
a
>
</
div
>
</
div
>
</
li
>
</
script
>
<
script
>
var groupedData = [
{ nazivNarocnika: "Narocnik d.d.", dtLansiranja: "18.5.2013", dtPricetka: "21.5.2013", dtZakljucka: "5.6.2013", opis: "Bla bla bla.", cena: "8.000,00" },
{ nazivNarocnika: "Narocnik d.d.", dtLansiranja: "18.5.2013", dtPricetka: "21.5.2013", dtZakljucka: "5.6.2013", opis: "Bla bla bla.", cena: "8.000,00" },
{ nazivNarocnika: "Narocnik d.d.", dtLansiranja: "18.5.2013", dtPricetka: "21.5.2013", dtZakljucka: "5.6.2013", opis: "Bla bla bla.", cena: "8.000,00" },
{ nazivNarocnika: "Narocnik d.d.", dtLansiranja: "18.5.2013", dtPricetka: "21.5.2013", dtZakljucka: "5.6.2013", opis: "Bla bla bla.", cena: "8.000,00" }
];
function mobileListViewTemplatesInit() {
$("#custom-listview").kendoMobileListView({
dataSource: kendo.data.DataSource.create({ data: groupedData }),
template: $("#customListViewTemplate").html(),
headerTemplate: "Ime razpisa"
});
}
var app = new kendo.mobile.Application($("#mjav"), {
skin: 'flat'
});
</
script
>
<
script
>
var app = new kendo.mobile.Application(document.body);
</
script
>
</
body
>
</
html
>