Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Lots of other small changes for 1.12 release

  • Loading branch information...
commit 5cc6ceb4a283acf1ee45a12bd66b807190ad4273 1 parent 9eca70f
@n8fr8 n8fr8 authored
View
BIN  Resources/.DS_Store
Binary file not shown
View
8 Resources/app.js
@@ -2,12 +2,10 @@ Ti.include("globals.js");
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
-Titanium.UI.setBackgroundColor('#000');
+Titanium.UI.setBackgroundColor('#ffffff');
// create tab group
-var tabGroup = Titanium.UI.createTabGroup({
- backgroundColor:DEFAULT_BAR_COLOR
- });
+var tabGroup = Titanium.UI.createTabGroup({});
//
// create base UI tab and root window
@@ -16,7 +14,7 @@ var winHome;
winHome = Titanium.UI.createWindow({
title:'New York State Senate',
- url:'views/homeslider.js',
+ url:'views/homemenu.js',
//url:'views/window/newsroom.js',
barColor:DEFAULT_BAR_COLOR,
backgroundImage:"img/bg/black.png",
View
10 Resources/views/legislation.js
@@ -14,9 +14,7 @@ data.push({title:'By Committee', summary:'Browse Legislation by Committee', link
// create table view
var tableview = Titanium.UI.createTableView({
- backgroundColor:"#ffffff",
- opacity:.8,
- color:"#333333"
+ backgroundColor:"#ffffff"
});
for (var c = 0; c < data.length; c++)
@@ -29,7 +27,7 @@ for (var c = 0; c < data.length; c++)
row.link = data[c].link;
row.oltype = data[c].oltype;
row.hasDetail = true;
-
+
var labelTitle = Ti.UI.createLabel({
@@ -38,7 +36,7 @@ for (var c = 0; c < data.length; c++)
top:5,
height:35,
font:{fontSize:20},
- color:'#000'
+ color:'#333333'
});
row.add(labelTitle);
@@ -47,7 +45,7 @@ for (var c = 0; c < data.length; c++)
left:10,
top:40,
font:{fontSize:14},
- color:'#333'
+ color:'#555555'
});
row.add(labelTime);
View
2  Resources/views/more.js
@@ -12,7 +12,7 @@ var data = [
{title:'Constitution', summary:'New York State Constitution',hasDetail:true, color:"#000000",link:'http://www.nysenate.gov/constitution'},
{title:'State Seal', summary:'New York State Seal Image and Explanation',hasDetail:true, color:"#000000", link:'http://www.nysenate.gov/state-seal'},
{title:'State History Timeline', summary:'From 1609 and onward', hasDetail:true, color:"#000000", link:'http://www.nysenate.gov/timeline'},
-// {title:'Office of the CIO', summary:'News from the Senate Technology Group', hasDetail:true, color:"#000000", rss:'http://www.nysenate.gov/department/cio/content/feed'}
+
];
var tableview = Titanium.UI.createTableView(
View
32 Resources/views/senators.js
@@ -1,7 +1,7 @@
Ti.include("../globals.js");
-var SENATOR_THUMB_BASE = "http://nysenate.gov/files/imagecache/senator_teaser/profile-pictures/";
-var SENATOR_FULL_BASE = "http://nysenate.gov/files/imagecache/teaser_featured_image/profile-pictures/";
+//var SENATOR_THUMB_BASE = "http://nysenate.gov/files/imagecache/senator_teaser/profile-pictures/";
+//var SENATOR_FULL_BASE = "http://nysenate.gov/files/imagecache/teaser_featured_image/profile-pictures/";
var senatorItems = [];
var senatorRows = [];
@@ -13,16 +13,17 @@ var senatorJsonUrl = "http://open.nysenate.gov/legislation/senators.json";
var xhr = Ti.Network.createHTTPClient();
xhr.setTimeout(30000);
-var toolActInd = Titanium.UI.createActivityIndicator();
-//toolActInd.style = Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN;
-toolActInd.font = {fontFamily:'Helvetica Neue', fontSize:15,fontWeight:'bold'};
-toolActInd.color = 'white';
-toolActInd.message = 'Loading Senators...';
+
+var toolActInd = Titanium.UI.createAlertDialog({
+ title: 'Loading',
+ message: 'Loading Senators From Server\n',
+ buttonNames: []
+});
+toolActInd.show();
senatorView = Titanium.UI.createTableView({
backgroundColor:"#ffffff",
left:0
- //opacity:.8,
});
@@ -142,11 +143,14 @@ function loadSenators()
xhr.onload = function()
{
// Titanium.API.debug("got resp: " +this.responseText);
- toolActInd.hide();
+
cacheFile("senatorsJson",this.responseText);
parseSenatorResponse(this.responseText);
+
+ toolActInd.hide();
+
}
@@ -171,7 +175,9 @@ function parseSenatorResponse (responseText)
var imageUrl = senatorItems[i].senator.imageUrl;
-
+ //senatorItems[i].senator.imageUrl = imageUrl;
+ //senatorItems[i].senator.imageUrlLarge = imageUrl;
+
var idx = imageUrl.lastIndexOf("/");
imageUrl = imageUrl.substring(idx+1);
@@ -181,13 +187,11 @@ function parseSenatorResponse (responseText)
if (senatorItems[i].senator.key == "lanza")
{
- senatorItems[i].senator.imageUrl = "../img/senators/" + senatorItems[i].senator.key + "-" + escape(senatorItems[i].senator.imageFileName);
+ senatorItems[i].senator.imageUrl = "../img/senators/" + senatorItems[i].senator.key + "-" + escape(senatorItems[i].senator.imageFileName);
}
- Ti.API.debug(senatorItems[i].senator.imageUrl);
+ senatorItems[i].senator.imageUrlLarge = imageUrl;
- //senatorItems[i].senator.imageUrl = SENATOR_THUMB_BASE + escape(imageUrl);
- senatorItems[i].senator.imageUrlLarge = SENATOR_FULL_BASE + escape(imageUrl);
senatorItems[i].senator.district = senatorItems[i].senator.district.split(' ')[3];
senatorRows[i] = loadSenatorRow (i, senatorItems[i].senator.name, senatorItems[i].senator.district, senatorItems[i].senator.imageUrl);
Please sign in to comment.
Something went wrong with that request. Please try again.