Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
46 changes: 23 additions & 23 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Today we are releasing the beta version of the New York State Senate mobile app. This is the first mobile app released by a State Legislature. This app brings the functionality of the NYSenate.gov site and the Open Legislation service to users on the go, no matter where they are. From finding your Senator using your current GPS location, to searching legislation or session transcripts, to watching Senate session video from just hours ago, citizens of New York State are now just a tap away from their legislature.
Today we are releasing the beta version of the New York State Senate mobile app. This is the first mobile app released by a State Legislature. This app brings the functionality of the NYSenate.gov site and the Open Legislation service to users on the go, no matter where they are. From finding your Senator using your current GPS location, to searching legislation or session transcripts, to watching Senate session video from just hours ago, citizens of New York State are now just a tap away from their legislature.

Read the announcement here: http://www.nysenate.gov/blogs/2010/jun/04/android-app-beta-and-mobile-source-code-released

Expand All @@ -9,37 +9,37 @@ This application was developed using the Appcelerator Titanium framework which c

Titanium is a cross-platform Javascript-to-Native binding approach to mobile development, which produces highly usable, well performing native mobile applications from one central Javascript application source source. The Javascript code is fully compliant, standards-based scripting, though the application APIs are proprietary to the Titanium platform. However, Appcelerator has open-sourced their code base, which was sufficient for us to choose their platform on which to build our application.

We are also big supporters of pure HTML5+CSS mobile applications, but for now, this is the approach we have taken, and we hope you find value in our source code.
We are also big supporters of pure HTML5+CSS mobile applications, but for now, this is the approach we have taken, and we hope you find value in our source code.

----------------------------------
Stuff our legal folk make us say:

Appcelerator, Appcelerator Titanium and associated marks and logos are
trademarks of Appcelerator, Inc.
Appcelerator, Appcelerator Titanium and associated marks and logos are
trademarks of Appcelerator, Inc.

Titanium is Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.

Titanium is licensed under the Apache Public License (Version 2). Please
see the LICENSE file for the full license.

In order to make the Senate's information and software as public as
possible, it is has adopted unique system using two types of licenses -
GNU General Public License as well as the BSD License. This system is
meant to ensure the most public licence is used in each specific case
such that:

(i) Any Software released containing components with preexisting GPL
copyrights must be released pursuant to a GPL v3 copyright restriction.
(ii) Any Software created independently by the Senate without any
preexisting licensing restrictions on any of its components shall be
released under dual licensing and take one of two forms: (a) a BSD
license, or (b) a GPL v3 license. The ultimate user of such Software
shall choose which form of licensing makes the most sense for his or her
project.
(iii) Regarding Software containing preexisting copyright restrictions
other than GPL, the CIO shall make the determination how he or she
wishes to release such Software.

GPL v3: http://www.gnu.org/copyleft/gpl.html
In order to make the Senate's information and software as public as
possible, it is has adopted unique system using two types of licenses -
GNU General Public License as well as the BSD License. This system is
meant to ensure the most public licence is used in each specific case
such that:

(i) Any Software released containing components with preexisting GPL
copyrights must be released pursuant to a GPL v3 copyright restriction.
(ii) Any Software created independently by the Senate without any
preexisting licensing restrictions on any of its components shall be
released under dual licensing and take one of two forms: (a) a BSD
license, or (b) a GPL v3 license. The ultimate user of such Software
shall choose which form of licensing makes the most sense for his or her
project.
(iii) Regarding Software containing preexisting copyright restrictions
other than GPL, the CIO shall make the determination how he or she
wishes to release such Software.

GPL v3: http://www.gnu.org/copyleft/gpl.html
BSD: http://www.opensource.org/licenses/bsd-license.php

42 changes: 21 additions & 21 deletions Resources/app-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var transpColor = '#00ffffff';
function buildWindow ()
{

var win = Titanium.UI.createWindow({
var win = Titanium.UI.createWindow({
backgroundImage:'img/bg/bglight.jpg',
orientationModes:[Titanium.UI.PORTRAIT],
navBarHidden:true
Expand All @@ -28,7 +28,7 @@ function buildWindow ()
win.addEventListener('android:back',function(e)
{
Titanium.API.info("got win android:back event");

});

win.open({});
Expand All @@ -50,7 +50,7 @@ function buildWindow ()
});
win.add(imgTitle);


var tableview = Titanium.UI.createTableView({
separatorColor: transpColor,
top:64,
Expand Down Expand Up @@ -91,7 +91,7 @@ function buildWindow ()

for (var i = 0; i < gridData.length; i++)
{

if (gridColIdx == -1 || gridColIdx > 2)
{
gridRow = Ti.UI.createTableViewRow({
Expand All @@ -109,8 +109,8 @@ function buildWindow ()
else if (gridColIdx == 1)
imgLeft = xCenter;
else if (gridColIdx == 2)
imgLeft = xRight;
imgLeft = xRight;

var img = Ti.UI.createImageView({
image:gridData[i].image,
top:gridIconBuffer,
Expand All @@ -133,29 +133,29 @@ function buildWindow ()
modal:true

});

newWin.close();
newWin.open();

newWin.addEventListener('close',function(e)
{

Titanium.API.info("got android BACK key event for new win");


});

}
else if (e.source.tabIdx)
{


var tabWin = Titanium.UI.createWindow({
url:"app-tabs.js",
orientationModes:[Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT,Titanium.UI.PORTRAIT],
modal:true
});

tabWin.open({});

tabWin.addEventListener('close',function(e)
Expand All @@ -165,9 +165,9 @@ function buildWindow ()

});
}

});

gridRow.add(img);

var imgLabel = Ti.UI.createLabel({
Expand All @@ -180,12 +180,12 @@ function buildWindow ()
color:gridFontColor
});
gridRow.add(imgLabel);

gridColIdx++;

}


return win;
}

Expand Down Expand Up @@ -219,14 +219,14 @@ if (!hadWelcome)
win.open(winSearch,{animated:true});

}

Titanium.App.Properties.setString("welcome","done");

});

dialog.show();


}


Expand Down
28 changes: 14 additions & 14 deletions Resources/app-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Titanium.UI.setBackgroundColor(DEFAULT_BAR_COLOR);
//
var winHome;

winHome = Titanium.UI.createWindow({
winHome = Titanium.UI.createWindow({
title:'New York State Senate',
barColor:DEFAULT_BAR_COLOR,
backgroundImage:'img/bg/bglight.jpg',
Expand All @@ -33,8 +33,8 @@ opacity:.8

for (var c = 0; c < data.length; c++)
{


row = Ti.UI.createTableViewRow({height:60});
row.className = 'morerow';
row.color = '#333333';
Expand All @@ -45,12 +45,12 @@ for (var c = 0; c < data.length; c++)
row.oltype = data[c].oltype;
row.hasDetail = data[c].hasDetail;
row.leftImage = data[c].icon;

row.title = data[c].title;

tableview.appendRow(row);


}


Expand All @@ -62,17 +62,17 @@ tableview.addEventListener('click', function(e)
if (e.rowData.tab)
{
//Titanium.UI.currentTab.setActiveTab(e.rowData.tab);
}
}
else if (e.rowData.ilink)
{
subWin = Titanium.UI.createWindow({
url:e.rowData.ilink,
title:e.rowData.pageTitle

});

subWin.channel = e.rowData.channel;

subWin.barColor = DEFAULT_BAR_COLOR;
subWin.open({animated:true});
}
Expand Down Expand Up @@ -133,13 +133,13 @@ if (!hadWelcome)
winHome.open(winSearch,{animated:true});

}

Titanium.App.Properties.setString("welcome","done");

});

dialog.show();


}

Loading