Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
senchatouch-notes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
senchatouch-notes
Commits
0eacf9b3
Commit
0eacf9b3
authored
Apr 14, 2013
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Sencha TS
parent
6ed19bc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
12 deletions
+32
-12
app.js
www/app.js
+3
-4
Contacts.js
www/app/store/Contacts.js
+29
-8
No files found.
www/app.js
View file @
0eacf9b3
...
@@ -67,14 +67,13 @@ Ext.application({
...
@@ -67,14 +67,13 @@ Ext.application({
xtype
:
'list'
,
xtype
:
'list'
,
title
:
'List'
,
title
:
'List'
,
iconCls
:
'star'
,
iconCls
:
'star'
,
itemTpl
:
'<div class="contact2"><strong>{first
Name}</strong> {lastN
ame}</div>'
,
itemTpl
:
'<div class="contact2"><strong>{first
_names}</strong> {last_n
ame}</div>'
,
disclosure
:
true
,
disclosure
:
true
,
grouped
:
true
,
grouped
:
true
,
indexBar
:
true
,
indexBar
:
true
,
onItemDisclosure
:
function
(
record
,
item
,
index
,
e
)
{
onItemDisclosure
:
function
(
record
,
item
,
index
,
e
)
{
//show a messagebox alert which shows the persons firstName
this
.
getDetailCard
().
setHtml
(
post
.
get
(
'content'
));
e
.
stopEvent
();
Ext
.
Msg
.
alert
(
'Disclose'
,
'Disclose more info for '
+
record
.
get
(
'firstName'
));
},
},
store
:
'Contacts'
store
:
'Contacts'
...
...
www/app/store/Contacts.js
View file @
0eacf9b3
Ext
.
define
(
'PO.store.Contacts'
,
{
Ext
.
define
(
'PO.store.Contacts'
,
{
extend
:
'Ext.data.Store'
,
extend
:
'Ext.data.Store'
,
config
:
{
config
:
{
fields
:
[
'firstName'
,
'lastName'
],
fields
:
[
'first_names'
,
'last_name'
],
sorters
:
'firstName'
,
autoLoad
:
true
,
sorters
:
'first_names'
,
grouper
:
{
grouper
:
{
groupFn
:
function
(
record
)
{
return
record
.
get
(
'firstName'
)[
0
];
}
groupFn
:
function
(
record
)
{
var
fn
=
record
.
get
(
'first_names'
);
if
(
fn
==
null
)
{
return
'a'
;
}
return
fn
[
0
];
}
},
proxy
:
{
type
:
'rest'
,
url
:
'/intranet-rest/user'
,
appendId
:
true
,
extraParams
:
{
format
:
'json'
},
},
reader
:
{
type
:
'json'
,
rootProperty
:
'data'
}
}
/*
data: [
data: [
{
first
Name
:
'Ed'
,
lastN
ame
:
'Spencer'
},
{ first
_names: 'Ed', last_n
ame: 'Spencer' },
{
first
Name
:
'Tommy'
,
lastN
ame
:
'Maintz'
},
{ first
_names: 'Tommy', last_n
ame: 'Maintz' },
{
first
Name
:
'Aaron'
,
lastN
ame
:
'Conran'
},
{ first
_names: 'Aaron', last_n
ame: 'Conran' },
{
first
Name
:
'Jamie'
,
lastN
ame
:
'Avins'
}
{ first
_names: 'Jamie', last_n
ame: 'Avins' }
]
]
*/
}
}
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment