or
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
link
href
=
"styles/kendo.mobile.all.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"inwx.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
>
</
head
>
<
body
>
<
div
id
=
"menu"
data-role
=
"view"
data-title
=
"Start"
>
<
div
class
=
"head"
> </
div
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
data-type
=
"group"
id
=
"listview-menu"
>
<
li
>I want to:
<
ul
>
<
li
data-icon
=
"play"
><
a
href
=
"#searchform"
>search domains</
a
></
li
>
</
ul
>
</
li
>
</
ul
>
</
div
>
<
div
data-role
=
"view"
data-title
=
"Destinations"
id
=
"domainlist"
data-init
=
"initListView"
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
data-type
=
"group"
id
=
"listview-domains"
>
</
ul
>
</
div
>
<
div
id
=
"searchform"
data-role
=
"view"
data-title
=
"Domain Search"
data-init
=
"initForm"
>
<
form
>
<
ul
data-role
=
"listview"
data-style
=
"inset"
>
<
li
>
<
select
id
=
"region-value"
data-bind
=
"source: regions, value: region"
></
select
>
search region
</
li
>
<
li
>
<
input
id
=
"domain-value"
type
=
"text"
data-bind
=
"value: domain"
/>
domain
</
li
>
</
ul
>
<
button
data-bind
=
"click: startSearch"
>search</
button
>
</
form
>
</
div
>
<
script
type
=
"text/x-kendo-template"
id
=
"domainlistItemTemplate"
>
<
li
data-icon=
# if (status == 'used') { #
"globe"
#} else {#
"toprated"
#}#>
#: domain #
</
li
>
</
script
>
<
script
>
var template = kendo.template($("#domainlistItemTemplate").html());
</
script
>
<
script
src
=
"domainlist.js"
type
=
"text/javascript"
></
script
>
</
body
>
</
html
>
var
initForm;
var
initListView;
$(document).ready(
function
(){
alert(
"ready"
);
var
app =
new
kendo.mobile.Application(document.body);
var
domainsearchModel =
new
kendo.data.ObservableObject({
domain:
"sebastian"
,
region:
"EUROPE"
,
regions: [
"EUROPE"
,
"ASIA"
,
"AMERICAS"
,
"AFRICA"
,
"ALL"
],
startSearch:
function
() {
app.navigate(
"#domainlist"
);
}
});
var
domainlistSource =
new
kendo.data.DataSource({
transport: {
read: {
type:
"POST"
,
dataType:
"json"
,
data: {
d:
function
() {
return
domainsearchModel.get(
"domain"
);
},
r:
function
() {
return
domainsearchModel.get(
"region"
)
}
}
}
},
schema: {
data:
function
(data) {
return
data.items;
},
type:
"json"
},
group: {
field:
"country"
},
filter: [{
field:
"status"
,
operator:
"neq"
,
value:
"error"
}, {
field:
"status"
,
operator:
"neq"
,
value:
"timeout"
}, {
field:
"status"
,
operator:
"neq"
,
value:
"yours"
}, {
field:
"status"
,
operator:
"neq"
,
value:
"unsupported"
}],
pagesize: 20
});
$(
"#listview-domains"
).kendoMobileListView({
style:
"inset"
,
template:
"#: domain #"
,
// template: template,
dataSource: domainlistSource
});
initForm =
function
() {
var
body = $(
".km-vertical,.km-horizontal"
);
kendo.bind($(
"#searchform"
), domainsearchModel);
};
initListView =
function
() {
};
});
parameterMap: function (options) {
kendo.ui.progress($("#rolesListView"), false);
return options;
}
@(Html.Kendo().ListView<
iProjX.Models.RoleModel
>(Model.Roles)
.Name("rolesListView")
.TagName("div")
.ClientTemplateId("rolesList")
.Editable()
.Pageable()
.DataSource(dataSource => dataSource
.Model(model =>
{
model.Id("RoleId");
model.Field(f => f.ProjectId).DefaultValue(Model.ProjectId);
model.Field(f => f.Title);
model.Field(f => f.Description);;
})
.Events(e => e
.Error("rolesListViewData_error")
.Change("rolesListViewData_change")
.RequestStart("rolesListViewData_requestStart"))
.Create(create => create.Action("createRole", "Project"))
.Read(read => read.Action("getRoles", "Project", new { projectId = Model.ProjectId }))
.Update(update => update.Action("updateRole", "Project"))
.PageSize(30)
)
.Events(e => e
.Change("rolesListView_change")
.Edit("rolesListView_edit")
.DataBound("rolesListView_databound"))
)