1
/****************************************************************************
3
** Copyright (C) 2013 Canonical Ltd
5
****************************************************************************/
10
function initSectionData(list) {
11
if (!list || !list.model) {
19
prop = list.section.property,
22
for (var i = 0, count = list.model.contacts.length; i < count; i++) {
23
item = list.sectionValueForContact(list.model.contacts[i])
24
if (item !== current) {
26
_sections.push(current);
27
sectionData.push({ index: i, header: current });
32
function getIndexFor(sectionName) {
33
var val = sectionData[_sections.indexOf(sectionName)].index;
34
return val === 0 || val > 0 ? val : -1;