or
<
html
>
<
head
>
<
link
href
=
"http://cdn.kendostatic.com/2011.3.1407/styles/kendo.common.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"http://cdn.kendostatic.com/2011.3.1407/styles/kendo.default.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
script
type
=
"text/javascript"
src
=
"http://code.jquery.com/jquery-1.7.1.min.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"http://cdn.kendostatic.com/2011.3.1407/js/kendo.all.min.js"
></
script
>
</
head
>
<
body
>
<
form
id
=
"foo-form"
name
=
"foo-form"
action
=
"/foo"
method
=
"get"
>
<
select
id
=
"test-combo"
multiple
=
"multiple"
>
<
option
value
=
"1"
>Option 1</
option
>
<
option
value
=
"2"
>SmOption 2</
option
>
<
option
value
=
"3"
>BlOption 3</
option
>
<
option
value
=
"4"
>GOption 4</
option
>
</
select
>
<
br
/>
<
label
for
=
"org"
class
=
"required"
>Organization</
label
>
<
input
id
=
"org"
name
=
"org"
required
=
"required"
type
=
"text"
validationMessage
=
"Organization required"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"org"
></
span
><
br
/>
<
label
for
=
"zip"
class
=
"required"
>Zip Code</
label
>
<
input
id
=
"zip"
name
=
"zip"
pattern
=
"\d{5}([\-]\d{4})?"
required
=
"required"
type
=
"text"
validationMessage
=
"Valid zip code required"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"zip"
></
span
><
br
/>
<
label
for
=
"fullname"
class
=
"required"
>Name</
label
>
<
input
id
=
"fullname"
name
=
"fullname"
required
=
"required"
type
=
"text"
validationMessage
=
"Please enter full name"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"fullname"
></
span
><
br
/>
<
label
for
=
"email"
class
=
"required"
>Email</
label
>
<
input
id
=
"email"
name
=
"email"
required
=
"required"
type
=
"email"
validationMessage
=
"Valid email required"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"email"
></
span
><
br
/>
<
label
for
=
"password"
class
=
"required"
>Password</
label
>
<
input
id
=
"password"
name
=
"password"
required
=
"required"
type
=
"password"
validationMessage
=
"Please enter password"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"password"
></
span
><
br
/>
<
label
for
=
"password-confirm"
class
=
"required"
>Confirm Password</
label
>
<
input
id
=
"password-confirm"
name
=
"password-confirm"
required
=
"required"
type
=
"password"
validationMessage
=
"Please confirm password"
/>
<
span
class
=
"k-invalid-msg"
data-for
=
"password-confirm"
></
span
><
br
/>
<
input
id
=
"register-submit"
name
=
"register-submit"
type
=
"submit"
value
=
"Sign Up"
/>
</
form
>
<
script
type
=
"text/javascript"
>
$(document).ready(function(){
$("#test-combo").kendoComboBox({
filter: "contains",
suggest: true,
});
$("#foo-form").kendoValidator({
rules: {
verifyPasswords: function(input){
var ret = true;
if (input.is("[name=password-confirm]")) {
ret = input.val() === $("#password").val();
}
return ret;
}
},
messages: {
verifyPasswords: "What's going on?"
}
});
});
</
script
>
</
body
>
$(
"#searchResultsListView"
).kendoMobileListView({
dataSource: ds,
template:
"#= f #"
,
headerTemplate:
"${value}"
,
loadMore:
true
});
var
ds =
new
kendo.data.DataSource({
transport: {
read: {
url:
"http://localhost:3000/api/anagram"
,
dataType:
"jsonp"
,
data: {
format:
'html'
}
},
parameterMap:
function
(options) {
if
(options.filter && options.filter.filters.length > 0)
return
{
rack: options.filter.filters[0].value.replace(/\?/g,
'-'
),
format:
'html'
,
limit: options.pageSize,
page: options.page
};
return
options;
}
},
group:
'length'
,
pageSize: 10,
page: 1,
sort: {field:
'w'
, dir:
'asc'
},
filter: { field:
'rack'
, operator:
'eq'
, value:
'z'
},
serverFiltering:
true
,
serverPaging:
true
,
serverGrouping:
true
,
serverSorting:
true
,
error:
function
(e){
alert(e);
console.log(e);
},
change:
function
(e) {
console.log(
'Data changed: '
+
this
.total());
},
schema: {
groups:
'groups'
,
total:
'count'
,
model: {
fields: {
length: {
type:
'number'
},
w: {
type:
'string'
},
f: {
type:
'string'
}
}
}
}
});