or
treeview = new kendo.ui.TreeView(element, {
dataSource: new kendo.data.HierarchicalDataSource({ data: [rootModel] })
});
this.dataSource = new kendo.data.HierarchicalDataSource({
schema: {
model: { id : "id", hasChildren: true, children: "layers" }
}
});
// treeview for navigation]
this._treeViewSelector = uiElement;
$(uiElement).kendoTreeView({
dragAndDrop: true,
checkboxes: {
checkChildren: true
},
dataSource: this.dataSource
});
this.dataSource.add({id: id, text: name, expanded: true, checked: true, children: []});
<
ul
data-role
=
"listview"
data-type
=
"group"
id
=
"itemListView"
data-click
=
"listViewClick"
data-style
=
"inset"
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
<
li
><
label
class
=
"km-listview-label"
><
textarea
id=${idval}
onfocus
=
"clearArea(this);"
style
=
"width:100%;height: 100px;"
maxlength
=
"150"
>input answer</
textarea
></
label
></
li
>
</
ul
>
<
div
data-role
=
"modalview"
id
=
"submitDialog"
style
=
"width: 40%; height: 13em;"
>
<
div
data-role
=
"header"
class
=
"navbarStyle"
>
<
div
data-role
=
"navbar"
><
h3
>info</
h3
></
div
>
</
div
>
<
div
style
=
"margin:.5em auto; text-align: center;font-size: 1.6em;"
id
=
"subcontent"
>submit ok</
div
>
<
div
style
=
"margin:0 auto; text-align: center;font-size: 1.3em; padding-top:0.5em;"
>
<
a
data-click
=
"closeSubmitDialog"
type
=
"button"
data-role
=
"button"
style
=
"width:8em;background-color:#06b375;color:#ffffff;"
>Enter</
a
>
</
div
>
</
div
>
function
openSubmitDailog(msg){
if
(MYAPP.dialogOPEN==
false
){
MYAPP.dialogOPEN=
true
;
var
modalView=$(
"#submitDialog"
).data(
"kendoMobileModalView"
);
modalView.open();
if
(msg)
$(
"#subcontent"
).html(msg);
}
}
function
closeSubmitDialog(){
//setTimeout(function(){
var
modalView=$(
"#submitDialog"
).data(
"kendoMobileModalView"
);
modalView.close();
MYAPP.dialogOPEN=
false
;
if
(MYAPP.status==8){
init();
}
else
if
(MYAPP.status==4){
MYAPP.app.navigate(
"#loginpage"
);
}
//return;
//},100);
}
$(
"#userGrid"
).data(
"kendoGrid"
).setDataSource(
new
kendo.data.DataSource({
//data: userList,
transport: {
read: {
url: MyAxitea_Config.baseURL +
"Services/UserHandler.ashx/GetUserListByCurrentUser"
,
type:
"POST"
},
update: {
url: MyAxitea_Config.baseURL +
"Services/UserHandler.ashx/UpdateUserAuthById"
,
dataType:
"json"
,
type:
"POST"
/*,
data: function (options) {
return {
id: options.IdUtente,
abilitato: options.Abilitato
}
}*/
}
},
schema: {
model: {
id:
"IdUtente"
,
fields: {
Nome: { type:
"string"
, editable:
false
},
Cognome: { type:
"string"
, editable:
false
},
Alias: { type:
"string"
, editable:
false
},
IdPrivilegio: { type:
"int"
, editable:
false
},
Email: { type:
"string"
, editable:
false
},
Abilitato: { type:
"boolean"
},
DataDisattivazione: { type:
"date"
, editable:
false
},
}
}
},
pageSize: 10,
sort: { field:
"IdPrivilegio"
, dir:
"asc"
}
}));