or
gridContainer
.kendoGrid({
dataSource : dataSource,
pageable :
false
,
height : 400,
sortable :
true
,
toolbar : [
"create"
],
columns : [
{
field :
"firstName"
,
title :
"First Name"
},
{
field :
"lastName"
,
title :
"Last Name"
},
{
field :
"email"
,
title :
"Email"
},
{
field :
"status"
,
title :
"Status"
,
editor : statusEditor
},
{
field :
"telephone"
,
title :
"Telephone"
},
{
field :
"jobTitle"
,
title :
"Job"
},
{
field :
"newsSubscription"
,
title :
"Subscribe to news?"
} ],
editable :
"popup"
});
var
grid = gridContainer.data(
"kendoGrid"
);
}
});
function
createDataSource(readUrl, updateUrl, destroyUrl, createUrl){
return
new
kendo.data.DataSource({
transport : {
read : {
url : readUrl,
dataType :
"json"
},
update : {
url : updateUrl,
dataType :
"json"
},
destroy : {
url : destroyUrl,
dataType :
"json"
},
create : {
url : createUrl,
dataType :
"json"
},
parameterMap :
function
(options, operation) {
debugger;
if
(operation !==
"read"
&& options.models) {
return
{
models : kendo.stringify(options.models)
};
}
}
},
batch :
true
,
pageSize : 30,
schema : {
model : {
id :
"id"
,
fields : {
firstName : {
validation : {
required :
true
}
},
lastName : {
validation : {
required :
true
}
},
email : {
validation : {
required :
true
}
},
telephone : {
validation : {
required :
false
}
},
jobTitle : {
validation : {
required :
false
}
},
newsSubscription : {
validation : {
required :
false
},
type :
"boolean"
},
status : {
validation : {
required :
false
},
type :
"text"
}
}
},
data :
function
(data) {
return
data.users;
}
}
});
}
[ {"Department":"Manager","ID":"1","Name":"Alexandre Heuze","Position":"General Manager"}, {"Department":"Accouting","ID":"2","Name":"Pengli Liu","Position":"Accounting Manager"}, {"Department":"Human Resources","ID":"5","Name":"Jie Wu","Position":"HR Administrator"}, {"Department":"Sales and Purchasing","ID":"6","Name":"Fei He","Position":"Sales Manager"}, {"Department":"R and D Department","ID":"10","Name":"Jun Zuo","Position":"R and D Engineer"} ]
We have a page where we have included the kendo.common.css stylesheet. When we view this page in Firefox, we notice that all of our buttons are really tall. We've tracked this issue down and it is due to the following style in kendo.common.css:
/* Override the important default line-height in Firefox 4+ */
:-moz-any(input[type=
"submit"
], input[type=
"button"
], input[type=
"reset"
]) {
padding-bottom
:
0.37em
;
padding-top
:
0.37em
;
}
This applies top and bottom padding to any button on our page. This seems wrong, should this not be something more specific than any button, maybe something like (or some variation thereof):
/* Override the important default line-height in Firefox 4+ */
input.k-button:-moz-any(input[type=
"submit"
], input[type=
"button"
], input[type=
"reset"
]) {
padding-bottom
:
0.37em
;
padding-top
:
0.37em
;
}
Thanks,
Sara
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>My Open Cal</
title
>
<!-- Kendo UI Files -->
<
link
href
=
"styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
script
src
=
"js/jquery.min.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"js/kendo.mobile.min.js"
type
=
"text/javascript"
></
script
>
<
script
>
$( //jQuery page load
function ()
{
var app = new kendo.mobile.Application($(document.body), { layout: "layout", icon: "/images/xboxavatar.png" });
$("#ulMyCal").kendoMobileListView({
appendOnRefresh: true,
pullToRefresh: true,
pullTemplate: "Pull to refresh",
refreshTemplate: "Loading...",
dataSource: new kendo.data.DataSource(
{
transport:
{
read:
{
contentType: "application/json; charset=utf-8",
type: "GET",
dataType: "jsonp",
data:
{
q: "#tampa"
}
}
},
schema: {
data: "results"
}
}),
template:"<
p
>${text}</
p
>"
});
})
</
script
>
</
head
>
<
body
>
<!-- Layout for all views in the application, as specified when the app is created -->
<
div
data-role
=
"layout"
data-id
=
"layout"
>
<
div
data-role
=
"header"
>
<
div
data-role
=
"navbar"
>
<
span
data-role
=
"view-title"
>My Test</
span
>
</
div
>
</
div
>
<
div
data-role
=
"footer"
>
<
div
data-role
=
"tabstrip"
>
<
a
href
=
"#index"
data-icon
=
"organize"
>My Calendar</
a
>
<
a
href
=
"#search"
data-icon
=
"search"
>Search</
a
>
<
a
href
=
"settings.htm"
data-icon
=
"settings"
>Settings</
a
>
</
div
>
</
div
>
</
div
>
<
div
data-role
=
"view"
id
=
"index"
data-title
=
"My Calendar"
>
<
div
style
=
"text-align:center"
>
<
ul
id
=
"ulMyCal"
data-style
=
"inset"
>
</
ul
>
</
div
>
</
div
>
<
div
data-role
=
"view"
id
=
"search"
data-title
=
"Search"
>
</
div
>
</
body
>
</
html
>
}
else
if
(value.indexOf(percentSymbol) > -1) {
number = percent;
symbol = percentSymbol;
}
value = value.replace(
"-"
,
""
)
.replace(symbol,
""
)
.replace(nonBreakingSpaceRegExp,
" "
)
.split(number[
","
].replace(nonBreakingSpaceRegExp,
" "
)).join(
""
)
.replace(number[
"."
],
"."
);
value = parseFloat(value);
if
(isNaN(value)) {
value =
null
;
}
else
if
(negative) {
value *= -1;
}
return
value;
kendo.toString(value,
'P'
)
kendo.cultures[
"en-US"
].numberFormat.percent.decimals = 10;
$(
"#grid"
).kendoGrid({
autoBind:
false
,
dataSource: {
schema: {
model: {
id:
"Title"
,
fields: {
Title: { editable:
false
},
Percentage: { editable:
true
, type:
"number"
}
}
}
}
},
columns: [{
title:
"TITLE"
,
field:
"Title"
}, {
title:
"PERCENTAGE"
,
field:
"Percentage"
,
format:
"{0:P}"
}],
editable:
true
,
scrollable:
false
});