Skip to content

Instantly share code, notes, and snippets.

@ferclaverino
Created July 26, 2012 21:08
Show Gist options
  • Save ferclaverino/3184523 to your computer and use it in GitHub Desktop.
Save ferclaverino/3184523 to your computer and use it in GitHub Desktop.
ready() step 1
ready: function (element, options) {
backColor = options.item.BackColor;
var detailHeader = element.querySelector('#detailHeader');
detailHeader.style.msGridColumns = '80px 1fr 325px;'; //'1fr 300px';
detailHeader.style.backgroundColor = backColor;
backButton.className = "win-backbutton backbutton";
var zoomIn = document.querySelector("#zoomIn");
zoomIn.style.display = 'none';
var zoomOut = document.querySelector("#zoomOut");
zoomOut.style.display = 'none';
document.querySelector("#refreshCmd").style.display = 'inline';
//*********************************************************
refreshPointer.Refresh = RefreshData;
listView = element.querySelector('.grouplist').winControl;
var groupDataSource = groupedItems.createGrouped(function (item) {
return item.group.key;
}, function (item) {
return {
title: item.group.title,
}
}).groups;
ui.setOptions(listView, {
itemDataSource: groupedItems.dataSource,
groupDataSource: null,
itemTemplate: element.querySelector('.itemTemplate'),
layout: new ui.GridLayout({ groupHeaderPosition: "top" }),
oniteminvoked: this.itemInvoked.bind(this)
});
globalNombreSection = options.item.NombreSeccion;
element.querySelector('#sectionHeader').textContent = options.item.NombreSeccion;
this.updateLayout(element, Windows.UI.ViewManagement.ApplicationView.value);
feedToShow = options.item.group.url;
list.splice(0, list.length - 1);
if (list.length > 0) {
list.pop();
}
FillNews(serviceRootSite + feedToShow);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment