SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 183 | Next

Richard Wagner

"Professional iPhone and iPod touch Programming: Building Applications for Mobile Safari"

substr(1)));
setTimeout(unselect, 500);
}
// Begin cui insertion
else if ( link.getAttribute(???class???) == ???cuiServiceLink??? )
{
var curRow = findParent( link, ???div??? );
curRow.setAttribute(???cuiSelected???, ???true???);
setTimeout(function() {
curRow.removeAttribute(???cuiSelected???);
}, 500);
return;
}
// End cui insertion
else if (link == $(???backButton???))
history.back();
else if (link.getAttribute(???type???) == ???submit???)
submitForm(findParent(link, ???form???));
else if (link.getAttribute(???type???) == ???cancel???)
cancelDialog(findParent(link, ???form???));
else if (link.target == ???_replace???)
{
link.setAttribute(???selected???, ???progress???);
iui.showPageByHref(link.href, null, null, link, unselect);
}
else if (!link.target)
{
link.setAttribute(???selected???, ???progress???);
iui.showPageByHref(link.href, null, null, null, unselect);
}
else
return;
event.preventDefault();
}
}, true);
The first else if conditional block is inserted to check for all links that have a class of
cuiServiceLink . If so, then the parent div is retrieved and its instance assigned to curRow . A
cuiSelected attribute is then added to the curRow and then removed. When paired with the styles
set up in cui.


Pages:
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195