Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update for 1.11.5 Release for new 2011 Session

  • Loading branch information...
commit 41204ee6e626b6b384b697cadc8b2eab8190270d 1 parent 06d352d
NY Senate CIO Office authored
Showing with 3,118 additions and 1,569 deletions.
  1. BIN  Resources/{views/window → }/.DS_Store
  2. BIN  Resources/android/images/res-long-land-hdpi/default.png
  3. BIN  Resources/android/images/res-long-land-ldpi/default.png
  4. BIN  Resources/android/images/res-long-port-hdpi/default.png
  5. BIN  Resources/android/images/res-long-port-ldpi/default.png
  6. BIN  Resources/android/images/res-notlong-land-hdpi/default.png
  7. BIN  Resources/android/images/res-notlong-land-ldpi/default.png
  8. BIN  Resources/android/images/res-notlong-land-mdpi/default.png
  9. BIN  Resources/android/images/res-notlong-port-hdpi/default.png
  10. BIN  Resources/android/images/res-notlong-port-ldpi/default.png
  11. BIN  Resources/android/images/res-notlong-port-mdpi/default.png
  12. +14 −15 Resources/app.js
  13. BIN  Resources/appicon@2x.png
  14. +146 −35 Resources/{inc → }/globals.js
  15. BIN  Resources/img/.DS_Store
  16. BIN  Resources/img/senators/(02-04-09) Adams-HS-059NEW HEADSHOT_1.JPG
  17. BIN  Resources/img/senators/(02-05-09) Perkins-HS-004_0.jpg
  18. BIN  Resources/img/senators/(02-11-09) Dilan-HS-046.jpg
  19. BIN  Resources/img/senators/(03-03-09) Huntley-HS-015_1.jpg
  20. BIN  Resources/img/senators/(03-03-09) Savino-HS-019.jpg
  21. BIN  Resources/img/senators/(03-05-09) Squadron HS-040.jpg
  22. BIN  Resources/img/senators/(03-09-09) Stewart-Cousins HS-016.jpg
  23. BIN  Resources/img/senators/(12-07-10) Carlucci-HS-028.jpg
  24. BIN  Resources/img/senators/148791_10150090738830786_723005785_7922082_6685808_n.jpg
  25. BIN  Resources/img/senators/2.jpg
  26. BIN  Resources/img/senators/2009 Sen Seward Head Shot.jpg
  27. BIN  Resources/img/senators/2010-8-5.FOR WEB PAGE.jpg
  28. BIN  Resources/img/senators/24x7@300dpi.jpg
  29. BIN  Resources/img/senators/42ProfilePic Bonacic.jpg
  30. BIN  Resources/img/senators/Addabbo.SD15.jpg
  31. BIN  Resources/img/senators/Avella Website Photo.jpg
  32. BIN  Resources/img/senators/BIOShotOppenheimer2007newheadshotcolor.jpg
  33. BIN  Resources/img/senators/Breslin202009.jpg
  34. BIN  Resources/img/senators/Diaz-HS-2009.jpg
  35. BIN  Resources/img/senators/DuaneHeadshot07ColorBIO.jpg
  36. BIN  Resources/img/senators/Giannaris.jpg
  37. BIN  Resources/img/senators/HEADSHOT-CK 2009_0.JPG
  38. BIN  Resources/img/senators/JK_Headshot_2009mp.jpg
  39. BIN  Resources/img/senators/Jose Peralta MAIN-Senate headshot.JPG
  40. BIN  Resources/img/senators/KLavalle.jpg
  41. BIN  Resources/img/senators/Kennedy,Tim.jpg
  42. BIN  Resources/img/senators/Libous.jpg
  43. BIN  Resources/img/senators/Montgomery May Headshot 2_0.jpg
  44. BIN  Resources/img/senators/Official Website Headshot_0.jpg
  45. BIN  Resources/img/senators/Parker2007Biography.jpg
  46. BIN  Resources/img/senators/SD22_Golden.jpg
  47. BIN  Resources/img/senators/SD41_Saland.jpg
  48. BIN  Resources/img/senators/SD43_McDonald.jpg
  49. BIN  Resources/img/senators/SD44_Farley.jpg
  50. BIN  Resources/img/senators/SD47_Griffo.jpg
  51. BIN  Resources/img/senators/SD4_Johnson.jpg
  52. BIN  Resources/img/senators/SD50_Defrancisco.jpg
  53. BIN  Resources/img/senators/SD56_Robach.jpg
  54. BIN  Resources/img/senators/SD62_Maziarz_0.jpg
  55. BIN  Resources/img/senators/SD9_Skelos_4.jpg
  56. BIN  Resources/img/senators/Senate Headshot.jpg
  57. BIN  Resources/img/senators/Senator Alesi - 55th- Headshot 6-2008.JPG
  58. BIN  Resources/img/senators/Smith-HS-024.jpg
  59. BIN  Resources/img/senators/Valesky-HSmp.jpg
  60. BIN  Resources/img/senators/WebBio Hassell-ThompsonHS.jpg
  61. BIN  Resources/img/senators/andrea-stewart-cousins.jpg
  62. BIN  Resources/img/senators/andrew-j-lanza.jpg
  63. BIN  Resources/img/senators/antoine-m-thompson.jpg
  64. BIN  Resources/img/senators/ball_web.jpg
  65. BIN  Resources/img/senators/bill-perkins.jpg
  66. BIN  Resources/img/senators/brian-x-foley.jpg
  67. BIN  Resources/img/senators/carl-kruger.jpg
  68. BIN  Resources/img/senators/carl-l-marcellino.jpg
  69. BIN  Resources/img/senators/catharine-young.jpg
  70. BIN  Resources/img/senators/charles-j-fuschillo-jr.jpg
  71. BIN  Resources/img/senators/craig-m-johnson.jpg
  72. BIN  Resources/img/senators/dale-m-volker.jpg
  73. BIN  Resources/img/senators/daniel-l-squadron.jpg
  74. BIN  Resources/img/senators/darrel-j-aubertine.jpg
  75. BIN  Resources/img/senators/david-j-valesky.jpg
  76. BIN  Resources/img/senators/dean-g-skelos.jpg
  77. BIN  Resources/img/senators/diane-j-savino.jpg
  78. BIN  Resources/img/senators/elizabeth-little.jpg
  79. BIN  Resources/img/senators/eric-adams.jpg
  80. BIN  Resources/img/senators/eric-t-schneiderman.jpg
  81. BIN  Resources/img/senators/esp.jpg
  82. BIN  Resources/img/senators/forwebBROCHURESSENATORFUSCHILLO'SOFFICIALHEADSHOT.jpg
  83. BIN  Resources/img/senators/frank-padavan.jpg
  84. BIN  Resources/img/senators/gallivan_web.jpg
  85. BIN  Resources/img/senators/george-d-maziarz.jpg
  86. BIN  Resources/img/senators/george-h-winner-jr.jpg
  87. BIN  Resources/img/senators/george-onorato.jpg
  88. BIN  Resources/img/senators/grisanti_web.jpg
  89. BIN  Resources/img/senators/hannon.jpg
  90. BIN  Resources/img/senators/head.JPG
  91. BIN  Resources/img/senators/headshotWEB.jpg
  92. BIN  Resources/img/senators/hs.jpg
  93. BIN  Resources/img/senators/hugh-t-farley.jpg
  94. BIN  Resources/img/senators/james-l-seward.jpg
  95. BIN  Resources/img/senators/james-s-alesi.jpg
  96. BIN  Resources/img/senators/jeffrey-d-klein.jpg
  97. BIN  Resources/img/senators/john-defrancisco.jpg
  98. BIN  Resources/img/senators/john-j-bonacic.jpg
  99. BIN  Resources/img/senators/john-j-flanagan.jpg
  100. BIN  Resources/img/senators/john-l-sampson.jpg
  101. BIN  Resources/img/senators/jose-m-serrano.jpg
  102. BIN  Resources/img/senators/jose-peralta.jpg
  103. BIN  Resources/img/senators/joseph-e-robach.jpg
  104. BIN  Resources/img/senators/joseph-griffo.jpg
  105. BIN  Resources/img/senators/joseph-p-addabbo-jr.jpg
  106. BIN  Resources/img/senators/kemp-hannon.jpg
  107. BIN  Resources/img/senators/kenneth-p-lavalle.jpg
  108. BIN  Resources/img/senators/kevin-s-parker.jpg
  109. BIN  Resources/img/senators/liz-krueger.jpg
  110. BIN  Resources/img/senators/malcolm-smith.jpg
  111. BIN  Resources/img/senators/martin-j-golden.jpg
  112. BIN  Resources/img/senators/martin-malave-dilan.jpg
  113. BIN  Resources/img/senators/martins_web.jpg
  114. BIN  Resources/img/senators/michael-f-nozzolio.jpg
  115. BIN  Resources/img/senators/michael-h-ranzenhofer.jpg
  116. BIN  Resources/img/senators/neil-d-breslin.jpg
  117. BIN  Resources/img/senators/omara_web.jpg
  118. BIN  Resources/img/senators/openwordlogo.gif
  119. BIN  Resources/img/senators/owen-h-johnson.jpg
  120. BIN  Resources/img/senators/pedro-espada-jr.jpg
  121. BIN  Resources/img/senators/ritchie_web.jpg
  122. BIN  Resources/img/senators/roy-j-mcdonald.jpg
  123. BIN  Resources/img/senators/ruben-diaz.jpg
  124. BIN  Resources/img/senators/ruth-hassell-thompson.jpg
  125. BIN  Resources/img/senators/serranoheadshot.JPG
  126. BIN  Resources/img/senators/shirley-l-huntley.jpg
  127. BIN  Resources/img/senators/small/andrea-stewart-cousins.jpg
  128. BIN  Resources/img/senators/small/andrew-j-lanza.jpg
  129. BIN  Resources/img/senators/small/antoine-m-thompson.jpg
  130. BIN  Resources/img/senators/small/bill-perkins.jpg
  131. BIN  Resources/img/senators/small/brian-x-foley.jpg
  132. BIN  Resources/img/senators/small/carl-kruger.jpg
  133. BIN  Resources/img/senators/small/carl-l-marcellino.jpg
  134. BIN  Resources/img/senators/small/catharine-young.jpg
  135. BIN  Resources/img/senators/small/charles-j-fuschillo-jr.jpg
  136. BIN  Resources/img/senators/small/craig-m-johnson.jpg
  137. BIN  Resources/img/senators/small/dale-m-volker.jpg
  138. BIN  Resources/img/senators/small/daniel-l-squadron.jpg
  139. BIN  Resources/img/senators/small/darrel-j-aubertine.jpg
  140. BIN  Resources/img/senators/small/david-j-valesky.jpg
  141. BIN  Resources/img/senators/small/dean-g-skelos.jpg
  142. BIN  Resources/img/senators/small/diane-j-savino.jpg
  143. BIN  Resources/img/senators/small/elizabeth-little.jpg
  144. BIN  Resources/img/senators/small/eric-adams.jpg
  145. BIN  Resources/img/senators/small/eric-t-schneiderman.jpg
  146. BIN  Resources/img/senators/small/frank-padavan.jpg
  147. BIN  Resources/img/senators/small/george-d-maziarz.jpg
  148. BIN  Resources/img/senators/small/george-h-winner-jr.jpg
  149. BIN  Resources/img/senators/small/george-onorato.jpg
  150. BIN  Resources/img/senators/small/hugh-t-farley.jpg
  151. BIN  Resources/img/senators/small/james-l-seward.jpg
  152. BIN  Resources/img/senators/small/james-s-alesi.jpg
  153. BIN  Resources/img/senators/small/jeffrey-d-klein.jpg
  154. BIN  Resources/img/senators/small/john-defrancisco.jpg
  155. BIN  Resources/img/senators/small/john-j-bonacic.jpg
  156. BIN  Resources/img/senators/small/john-j-flanagan.jpg
  157. BIN  Resources/img/senators/small/john-l-sampson.jpg
  158. BIN  Resources/img/senators/small/jose-m-serrano.jpg
  159. BIN  Resources/img/senators/small/jose-peralta.jpg
  160. BIN  Resources/img/senators/small/joseph-e-robach.jpg
  161. BIN  Resources/img/senators/small/joseph-griffo.jpg
  162. BIN  Resources/img/senators/small/joseph-p-addabbo-jr.jpg
  163. BIN  Resources/img/senators/small/kemp-hannon.jpg
  164. BIN  Resources/img/senators/small/kenneth-p-lavalle.jpg
  165. BIN  Resources/img/senators/small/kevin-s-parker.jpg
  166. BIN  Resources/img/senators/small/liz-krueger.jpg
  167. BIN  Resources/img/senators/small/malcolm-smith.jpg
  168. BIN  Resources/img/senators/small/martin-j-golden.jpg
  169. BIN  Resources/img/senators/small/martin-malave-dilan.jpg
  170. BIN  Resources/img/senators/small/michael-f-nozzolio.jpg
  171. BIN  Resources/img/senators/small/michael-h-ranzenhofer.jpg
  172. BIN  Resources/img/senators/small/neil-d-breslin.jpg
  173. BIN  Resources/img/senators/small/owen-h-johnson.jpg
  174. BIN  Resources/img/senators/small/pedro-espada-jr.jpg
  175. BIN  Resources/img/senators/small/roy-j-mcdonald.jpg
  176. BIN  Resources/img/senators/small/ruben-diaz.jpg
  177. BIN  Resources/img/senators/small/ruth-hassell-thompson.jpg
  178. BIN  Resources/img/senators/small/shirley-l-huntley.jpg
  179. BIN  Resources/img/senators/small/stephen-m-saland.jpg
  180. BIN  Resources/img/senators/small/suzi-oppenheimer.jpg
  181. BIN  Resources/img/senators/small/thomas-duane.jpg
  182. BIN  Resources/img/senators/small/thomas-p-morahan.jpg
  183. BIN  Resources/img/senators/small/toby-ann-stavisky.jpg
  184. BIN  Resources/img/senators/small/tom-libous.jpg
  185. BIN  Resources/img/senators/small/velmanette-montgomery.jpg
  186. BIN  Resources/img/senators/small/vincent-l-leibell.jpg
  187. BIN  Resources/img/senators/small/william-j-larkin-jr.jpg
  188. BIN  Resources/img/senators/small/william-j-larkin.jpg
  189. BIN  Resources/img/senators/small/william-t-stachowski.jpg
  190. BIN  Resources/img/senators/stephen-m-saland.jpg
  191. BIN  Resources/img/senators/suzi-oppenheimer.jpg
  192. BIN  Resources/img/senators/thomas-duane.jpg
  193. BIN  Resources/img/senators/thomas-p-morahan.jpg
  194. BIN  Resources/img/senators/toby-ann-stavisky.jpg
  195. BIN  Resources/img/senators/tom-libous.jpg
  196. BIN  Resources/img/senators/velmanette-montgomery.jpg
  197. BIN  Resources/img/senators/vincent-l-leibell.jpg
  198. BIN  Resources/img/senators/webphoto1.jpg
  199. BIN  Resources/img/senators/william-j-larkin-jr.jpg
  200. BIN  Resources/img/senators/william-j-larkin.jpg
  201. BIN  Resources/img/senators/william-t-stachowski.jpg
  202. BIN  Resources/img/senators/young headshot-ret.jpg
  203. BIN  Resources/img/senators/zeldin.jpg
  204. BIN  Resources/{img/senators → inc}/.DS_Store
  205. +64 −0 Resources/inc/drupal_services.js
  206. +313 −0 Resources/inc/jssha256.js
  207. +103 −0 Resources/inc/map.js
  208. +30 −31 Resources/{views/window → inc}/rss.js
  209. +45 −32 Resources/{views/window/findsenator.js → inc/seeclickfix.js}
  210. 0  Resources/{views/window → inc}/videos-blip.js
  211. +33 −112 Resources/{views/window/videos.js → inc/youtube.js}
  212. BIN  Resources/iphone/.DS_Store
  213. +0 −341 Resources/iphone/MainWindow.xib
  214. +0 −353 Resources/iphone/MainWindow_ipad.xib
  215. BIN  Resources/iphone/appicon@2x.png
  216. BIN  Resources/views/.DS_Store
  217. 0  Resources/views/{window → }/calevent.js
  218. +24 −10 Resources/views/{window → }/committees.js
  219. +406 −0 Resources/views/findsenator.js
  220. +1 −1  Resources/views/{window → }/home-android.js
  221. +1 −1  Resources/views/{window → }/home-coverflow.js
  222. +5 −5 Resources/views/{window → }/home-ipad-nav.js
  223. +14 −95 Resources/views/{window → }/home-ipad.js
  224. +1 −1  Resources/views/{window → }/home-webview.js
  225. +6 −6 Resources/views/{window → }/home.js
  226. +814 −0 Resources/views/homeslider.js
  227. +15 −21 Resources/views/{window → }/legislation.js
  228. 0  Resources/views/{window → }/more-dash.js
  229. +1 −1  Resources/views/{window → }/more.js
  230. +3 −3 Resources/views/{window/olsearch-json.js → olsearch.js}
  231. +70 −40 Resources/views/{window → }/senator.js
  232. +377 −0 Resources/views/senators-android.js
  233. +281 −0 Resources/views/senators-ipad.js
  234. +320 −0 Resources/views/senators.js
  235. 0  Resources/views/{window → }/today-demo.js
  236. +1 −1  Resources/views/{window → }/today.js
  237. +5 −2 Resources/views/{window → }/videos-boxes.js
  238. 0  Resources/views/{window → }/welcome.js
  239. +0 −152 Resources/views/window/senators-android.js
  240. +0 −188 Resources/views/window/senators-ipad.js
  241. +0 −113 Resources/views/window/senators.js
  242. +5 −5 manifest
  243. +20 −5 tiapp.xml
View
BIN  Resources/views/window/.DS_Store → Resources/.DS_Store
Binary file not shown
View
BIN  Resources/android/images/res-long-land-hdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-long-land-ldpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-long-port-hdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-long-port-ldpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-land-hdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-land-ldpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-land-mdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-port-hdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-port-ldpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/android/images/res-notlong-port-mdpi/default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
29 Resources/app.js
@@ -5,29 +5,29 @@ Titanium.UI.setBackgroundColor('#fff');
-
-
// create table view data object
var tdata = [
- {title:'Senate Home',ilink:'views/window/home-ipad.js',leftImage:'img/tabs/bank.png',navBarHidden:true, className:'menuRow'},
- {title:'Senate Calendar',ilink:'views/window/today.js',leftImage:'img/tabs/clock.png',navBarHidden:false, className:'menuRow'},
- {title:'Senators',hasChild:true,mlink:'views/window/senators-android.js',leftImage:'img/tabs/man.png',navBarHidden:false, className:'menuRow'},
- {title:'Open Legislation',ilink:'views/window/legislation.js',leftImage:'img/tabs/database.png',navBarHidden:false, className:'menuRow'},
- {title:'Committee Activity',ilink:'views/window/committees.js',leftImage:'img/tabs/connections.png',navBarHidden:false, className:'menuRow'},
- {title:'Official Blog',hasDetail:false, rss:'http://www.nysenate.gov/blog/feed',navBarHidden:false, leftImage:'img/tabs/newspaper.png', className:'menuRow'},
+ {title:'Senate Home',ilink:'views/home-ipad.js',leftImage:'img/tabs/bank.png',navBarHidden:true, className:'menuRow'},
+ {title:'Senate Calendar',ilink:'views/today.js',leftImage:'img/tabs/clock.png',navBarHidden:false, className:'menuRow'},
+ {title:'Senators',hasChild:true,mlink:'views/senators.js',leftImage:'img/tabs/man.png',navBarHidden:false, className:'menuRow'},
+ {title:'Open Legislation',ilink:'views/legislation.js',leftImage:'img/tabs/database.png',navBarHidden:false, className:'menuRow'},
+ {title:'Committee Activity',ilink:'views/committees.js',leftImage:'img/tabs/connections.png',navBarHidden:false, className:'menuRow'},
+// {title:'Newsroom',hasDetail:false, ilink:'views/homeslider.js',navBarHidden:false, leftImage:'img/tabs/newspaper.png', className:'menuRow'},
+
+// {title:'Official Blog',hasDetail:false, rss:'http://www.nysenate.gov/blog/feed',navBarHidden:false, leftImage:'img/tabs/newspaper.png', className:'menuRow'},
/*{title:'Open Data Search',elink:'http://www.nysenate.gov/opendata',leftImage:'img/tabs/search.png',navBarHidden:false},*/
- {title:'Video Gallery',ilink:'views/window/videos-boxes.js',leftImage:'img/tabs/star.png',navBarHidden:false, className:'menuRow'},
+ {title:'Video Gallery',ilink:'views/videos-boxes.js',leftImage:'img/tabs/star.png',navBarHidden:false, className:'menuRow'},
{title:'Issues & Initiatives',link:'http://www.nysenate.gov/issues-initiatives',leftImage:'img/tabs/newspaper.png',navBarHidden:false, className:'menuRow'},
/* {title:'Daily Newsclips (Beta)', elink:'http://newsclips.senate.state.ny.us/names.jsp',navBarHidden:false, leftImage:'img/tabs/newspaper.png', className:'menuRow'},
*/
{title:'@NYSenate', elink:'http://m.twitter.com/nysenate',leftImage:'img/tabs/speechbubble.png',navBarHidden:false, className:'menuRow'},
- {title:'Senate Reports', link:'http://www.nysenate.gov/reports',navBarHidden:false,leftImage:'img/tabs/folder.png', className:'menuRow'},
+// {title:'Senate Reports', link:'http://www.nysenate.gov/reports',navBarHidden:false,leftImage:'img/tabs/folder.png', className:'menuRow'},
{title:'Contact the Senate', elink:'http://www.nysenate.gov/contact_form',leftImage:'img/tabs/newspaper.png',navBarHidden:false, className:'menuRow'},
{title:'---------------', className:'menuRow'},
{title:'About the Senate', hasDetail:true, link:'http://www.nysenate.gov/about-us',navBarHidden:false, className:'menuRow'},
{title:'Frequently Asked Questions', hasDetail:true, link:'http://www.nysenate.gov/frequently-asked-questions',navBarHidden:false, className:'menuRow'},
- {title:'FOIL Request', hasDetail:true, link:'http://www.nysenate.gov/foil_request',navBarHidden:false, className:'menuRow'},
+ {title:'FOIL Request', hasDetail:true, elink:'http://www.nysenate.gov/foil_request',navBarHidden:false, className:'menuRow'},
{title:'Visiting the Capitol', hasDetail:true, link:'http://www.nysenate.gov/node/76',navBarHidden:false, className:'menuRow'},
/* {title:'Capitol Map', hasDetail:true, elink:'http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=ny+state+capitol&sll=37.0625,-95.677068&sspn=34.534108,75.498047&ie=UTF8&hq=ny+state+capitol&hnear=&ll=42.653783,-73.756628&spn=0.03131,0.10643&z=14&iwloc=A',navBarHidden:false},*/
{title:'Senate Rules', hasDetail:true, link:'http://www.nysenate.gov/rules',navBarHidden:false, className:'menuRow'},
@@ -41,8 +41,7 @@ var tdata = [
// create table view
var tableViewOptions = {
-
- data:tdata
+ data:tdata
};
@@ -179,7 +178,7 @@ masterViewTable.addEventListener('click', function(e)
var subWin = Titanium.UI.createWindow({
- url:'views/window/rss.js',
+ url:'inc/rss.js',
title:tdata[e.index].title,
barColor:DEFAULT_BAR_COLOR,
rss:tdata[e.index].rss,
@@ -202,7 +201,7 @@ var winHome;
winHome = Titanium.UI.createWindow({
title:'Home',
- url:'views/window/home-ipad.js',
+ url:'views/home-ipad.js',
navBarHidden:false,
barColor:DEFAULT_BAR_COLOR
});
View
BIN  Resources/appicon@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
181 Resources/inc/globals.js → Resources/globals.js
@@ -36,18 +36,23 @@ function getSenatorJSON ()
if (!senatorJson)
{
Titanium.API.info("loading senators json");
-
- var file = Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'senators.json');
- var contents = file.read();
-
- Titanium.API.info("parsing senators json");
- senatorJson = JSON.parse(contents.text);
+ var cachedFeed = getCachedFile("senatorsJson");
+
+ // Titanium.API.info("parsing senators json: " + cachedFeed);
+
+ if (cachedFeed)
+ {
+ senatorJson = JSON.parse('{"data":' + cachedFeed + '}').data;
+
+ }
+
}
return senatorJson;
}
+
function processHtml (rawHTML)
{
rawHTML=rawHTML.replace(/<br>/gi, " ");
@@ -380,51 +385,92 @@ function showNYSenateContent(wTitle, wUrl,detailView)
};
-function getCachedFile (fileUrl)
+function getCachedFile (cacheUrl)
{
- var filename = Titanium.Utils.md5HexDigest(fileUrl);
- var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
- if (f.exists())
- return f;
- else
+ var filename = Titanium.Utils.md5HexDigest(cacheUrl);
+
+ try
+ {
+ // Ti.API.debug('looking for cached file md5: ' + filename);
+
+ var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
+
+ if (f)
+ {
+ // Ti.API.debug('found cached file: ' + f.nativePath);
+ return f.read();
+ }
+ else
+ return null;
+ }
+ catch (E)
+ {
+ //Ti.API.debug('no cache for: ' + cacheUrl);
return null;
+ }
+
+ return null;
}
-function cacheFile (fileUrl)
+function cacheFile (fileUrl, fileData, fileCallbackFunction)
{
- var c = Titanium.Network.createHTTPClient();
-
- c.setTimeout(10000);
-
- c.onload = function()
+ if (fileData)
{
-
var filename = Titanium.Utils.md5HexDigest(fileUrl);
- var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
- f.write(this.responseData);
-
- };
+
+ //Ti.API.debug('saving file ' + fileUrl + ' as : ' + filename);
- c.ondatastream = function(e)
- {
- //ind.value = e.progress ;
- };
+ var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
+
+ f.write(fileData);
+
+ if(fileCallbackFunction)
+ fileCallbackFunction(fileUrl,f);
- c.error = function(e)
+ }
+ else
{
- //Ti.UI.createAlertDialog({title:'XHR', message:'Error: ' + e.error}).show();
- };
-
- c.open('GET', fileUrl);
-
- // send the data
- c.send();
+ var c = Titanium.Network.createHTTPClient();
+
+ c.setTimeout(30000);
+
+ c.onload = function()
+ {
+ var filename = Titanium.Utils.md5HexDigest(fileUrl);
+
+ //Ti.API.info('saving file ' + fileUrl + ' as : ' + filename);
+ var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,filename);
+
+ f.write(this.responseData);
+
+ if(fileCallbackFunction)
+ fileCallbackFunction(fileUrl,f);
+
+ };
+
+ c.ondatastream = function(e)
+ {
+ //ind.value = e.progress ;
+ //Ti.API.info('ONDATASTREAM1 - PROGRESS: ' + e.progress);
+ };
+
+ c.error = function(e)
+ {
+ //Ti.UI.createAlertDialog({title:'XHR', message:'Error: ' + e.error}).show();
+ //Ti.API.debug('ONDATASTREAM1 - ERROR: ' + e.error);
+ };
+
+ c.open('GET', fileUrl);
+
+ // send the data
+ c.send();
+ }
}
@@ -438,3 +484,68 @@ function trim(s)
return s.substring(l, r+1);
}
+// Simulates PHP's date function
+Date.prototype.format = function(format) {
+ var returnStr = '';
+ var replace = Date.replaceChars;
+ for (var i = 0; i < format.length; i++) {
+ var curChar = format.charAt(i);
+ if (replace[curChar]) {
+ returnStr += replace[curChar].call(this);
+ } else {
+ returnStr += curChar;
+ }
+ }
+ return returnStr;
+};
+Date.replaceChars = {
+ shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ longMonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ longDays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+
+ // Day
+ d: function() { return (this.getDate() < 10 ? '0' : '') + this.getDate(); },
+ D: function() { return Date.replaceChars.shortDays[this.getDay()]; },
+ j: function() { return this.getDate(); },
+ l: function() { return Date.replaceChars.longDays[this.getDay()]; },
+ N: function() { return this.getDay() + 1; },
+ S: function() { return (this.getDate() % 10 == 1 && this.getDate() != 11 ? 'st' : (this.getDate() % 10 == 2 && this.getDate() != 12 ? 'nd' : (this.getDate() % 10 == 3 && this.getDate() != 13 ? 'rd' : 'th'))); },
+ w: function() { return this.getDay(); },
+ z: function() { return "Not Yet Supported"; },
+ // Week
+ W: function() { return "Not Yet Supported"; },
+ // Month
+ F: function() { return Date.replaceChars.longMonths[this.getMonth()]; },
+ m: function() { return (this.getMonth() < 9 ? '0' : '') + (this.getMonth() + 1); },
+ M: function() { return Date.replaceChars.shortMonths[this.getMonth()]; },
+ n: function() { return this.getMonth() + 1; },
+ t: function() { return "Not Yet Supported"; },
+ // Year
+ L: function() { return (((this.getFullYear()%4==0)&&(this.getFullYear()%100 != 0)) || (this.getFullYear()%400==0)) ? '1' : '0'; },
+ o: function() { return "Not Supported"; },
+ Y: function() { return this.getFullYear(); },
+ y: function() { return ('' + this.getFullYear()).substr(2); },
+ // Time
+ a: function() { return this.getHours() < 12 ? 'am' : 'pm'; },
+ A: function() { return this.getHours() < 12 ? 'AM' : 'PM'; },
+ B: function() { return "Not Yet Supported"; },
+ g: function() { return this.getHours() % 12 || 12; },
+ G: function() { return this.getHours(); },
+ h: function() { return ((this.getHours() % 12 || 12) < 10 ? '0' : '') + (this.getHours() % 12 || 12); },
+ H: function() { return (this.getHours() < 10 ? '0' : '') + this.getHours(); },
+ i: function() { return (this.getMinutes() < 10 ? '0' : '') + this.getMinutes(); },
+ s: function() { return (this.getSeconds() < 10 ? '0' : '') + this.getSeconds(); },
+ // Timezone
+ e: function() { return "Not Yet Supported"; },
+ I: function() { return "Not Supported"; },
+ O: function() { return (-this.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() / 60)) + '00'; },
+ P: function() { return (-this.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() / 60)) + ':' + (Math.abs(this.getTimezoneOffset() % 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() % 60)); },
+ T: function() { var m = this.getMonth(); this.setMonth(0); var result = this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1'); this.setMonth(m); return result;},
+ Z: function() { return -this.getTimezoneOffset() * 60; },
+ // Full Date/Time
+ c: function() { return this.format("Y-m-d") + "T" + this.format("H:i:sP"); },
+ r: function() { return this.toString(); },
+ U: function() { return this.getTime() / 1000; }
+};
+
View
BIN  Resources/img/.DS_Store
Binary file not shown
View
BIN  Resources/img/senators/(02-04-09) Adams-HS-059NEW HEADSHOT_1.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(02-05-09) Perkins-HS-004_0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(02-11-09) Dilan-HS-046.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(03-03-09) Huntley-HS-015_1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(03-03-09) Savino-HS-019.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(03-05-09) Squadron HS-040.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(03-09-09) Stewart-Cousins HS-016.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/(12-07-10) Carlucci-HS-028.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/148791_10150090738830786_723005785_7922082_6685808_n.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/2009 Sen Seward Head Shot.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/2010-8-5.FOR WEB PAGE.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/24x7@300dpi.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/42ProfilePic Bonacic.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  Resources/img/senators/Addabbo.SD15.jpg
Diff not rendered
View
BIN  Resources/img/senators/Avella Website Photo.jpg
Diff not rendered
View
BIN  Resources/img/senators/BIOShotOppenheimer2007newheadshotcolor.jpg
Diff not rendered
View
BIN  Resources/img/senators/Breslin202009.jpg
Diff not rendered
View
BIN  Resources/img/senators/Diaz-HS-2009.jpg
Diff not rendered
View
BIN  Resources/img/senators/DuaneHeadshot07ColorBIO.jpg
Diff not rendered
View
BIN  Resources/img/senators/Giannaris.jpg
Diff not rendered
View
BIN  Resources/img/senators/HEADSHOT-CK 2009_0.JPG
Diff not rendered
View
BIN  Resources/img/senators/JK_Headshot_2009mp.jpg
Diff not rendered
View
BIN  Resources/img/senators/Jose Peralta MAIN-Senate headshot.JPG
Diff not rendered
View
BIN  Resources/img/senators/KLavalle.jpg
Diff not rendered
View
BIN  Resources/img/senators/Kennedy,Tim.jpg
Diff not rendered
View
BIN  Resources/img/senators/Libous.jpg
Diff not rendered
View
BIN  Resources/img/senators/Montgomery May Headshot 2_0.jpg
Diff not rendered
View
BIN  Resources/img/senators/Official Website Headshot_0.jpg
Diff not rendered
View
BIN  Resources/img/senators/Parker2007Biography.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD22_Golden.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD41_Saland.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD43_McDonald.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD44_Farley.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD47_Griffo.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD4_Johnson.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD50_Defrancisco.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD56_Robach.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD62_Maziarz_0.jpg
Diff not rendered
View
BIN  Resources/img/senators/SD9_Skelos_4.jpg
Diff not rendered
View
BIN  Resources/img/senators/Senate Headshot.jpg
Diff not rendered
View
BIN  Resources/img/senators/Senator Alesi - 55th- Headshot 6-2008.JPG
Diff not rendered
View
BIN  Resources/img/senators/Smith-HS-024.jpg
Diff not rendered
View
BIN  Resources/img/senators/Valesky-HSmp.jpg
Diff not rendered
View
BIN  Resources/img/senators/WebBio Hassell-ThompsonHS.jpg
Diff not rendered
View
BIN  Resources/img/senators/andrea-stewart-cousins.jpg
Diff not rendered
View
BIN  Resources/img/senators/andrew-j-lanza.jpg
Diff not rendered
View
BIN  Resources/img/senators/antoine-m-thompson.jpg
Diff not rendered
View
BIN  Resources/img/senators/ball_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/bill-perkins.jpg
Diff not rendered
View
BIN  Resources/img/senators/brian-x-foley.jpg
Diff not rendered
View
BIN  Resources/img/senators/carl-kruger.jpg
Diff not rendered
View
BIN  Resources/img/senators/carl-l-marcellino.jpg
Diff not rendered
View
BIN  Resources/img/senators/catharine-young.jpg
Diff not rendered
View
BIN  Resources/img/senators/charles-j-fuschillo-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/craig-m-johnson.jpg
Diff not rendered
View
BIN  Resources/img/senators/dale-m-volker.jpg
Diff not rendered
View
BIN  Resources/img/senators/daniel-l-squadron.jpg
Diff not rendered
View
BIN  Resources/img/senators/darrel-j-aubertine.jpg
Diff not rendered
View
BIN  Resources/img/senators/david-j-valesky.jpg
Diff not rendered
View
BIN  Resources/img/senators/dean-g-skelos.jpg
Diff not rendered
View
BIN  Resources/img/senators/diane-j-savino.jpg
Diff not rendered
View
BIN  Resources/img/senators/elizabeth-little.jpg
Diff not rendered
View
BIN  Resources/img/senators/eric-adams.jpg
Diff not rendered
View
BIN  Resources/img/senators/eric-t-schneiderman.jpg
Diff not rendered
View
BIN  Resources/img/senators/esp.jpg
Diff not rendered
View
BIN  Resources/img/senators/forwebBROCHURESSENATORFUSCHILLO'SOFFICIALHEADSHOT.jpg
Diff not rendered
View
BIN  Resources/img/senators/frank-padavan.jpg
Diff not rendered
View
BIN  Resources/img/senators/gallivan_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/george-d-maziarz.jpg
Diff not rendered
View
BIN  Resources/img/senators/george-h-winner-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/george-onorato.jpg
Diff not rendered
View
BIN  Resources/img/senators/grisanti_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/hannon.jpg
Diff not rendered
View
BIN  Resources/img/senators/head.JPG
Diff not rendered
View
BIN  Resources/img/senators/headshotWEB.jpg
Diff not rendered
View
BIN  Resources/img/senators/hs.jpg
Diff not rendered
View
BIN  Resources/img/senators/hugh-t-farley.jpg
Diff not rendered
View
BIN  Resources/img/senators/james-l-seward.jpg
Diff not rendered
View
BIN  Resources/img/senators/james-s-alesi.jpg
Diff not rendered
View
BIN  Resources/img/senators/jeffrey-d-klein.jpg
Diff not rendered
View
BIN  Resources/img/senators/john-defrancisco.jpg
Diff not rendered
View
BIN  Resources/img/senators/john-j-bonacic.jpg
Diff not rendered
View
BIN  Resources/img/senators/john-j-flanagan.jpg
Diff not rendered
View
BIN  Resources/img/senators/john-l-sampson.jpg
Diff not rendered
View
BIN  Resources/img/senators/jose-m-serrano.jpg
Diff not rendered
View
BIN  Resources/img/senators/jose-peralta.jpg
Diff not rendered
View
BIN  Resources/img/senators/joseph-e-robach.jpg
Diff not rendered
View
BIN  Resources/img/senators/joseph-griffo.jpg
Diff not rendered
View
BIN  Resources/img/senators/joseph-p-addabbo-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/kemp-hannon.jpg
Diff not rendered
View
BIN  Resources/img/senators/kenneth-p-lavalle.jpg
Diff not rendered
View
BIN  Resources/img/senators/kevin-s-parker.jpg
Diff not rendered
View
BIN  Resources/img/senators/liz-krueger.jpg
Diff not rendered
View
BIN  Resources/img/senators/malcolm-smith.jpg
Diff not rendered
View
BIN  Resources/img/senators/martin-j-golden.jpg
Diff not rendered
View
BIN  Resources/img/senators/martin-malave-dilan.jpg
Diff not rendered
View
BIN  Resources/img/senators/martins_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/michael-f-nozzolio.jpg
Diff not rendered
View
BIN  Resources/img/senators/michael-h-ranzenhofer.jpg
Diff not rendered
View
BIN  Resources/img/senators/neil-d-breslin.jpg
Diff not rendered
View
BIN  Resources/img/senators/omara_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/openwordlogo.gif
Diff not rendered
View
BIN  Resources/img/senators/owen-h-johnson.jpg
Diff not rendered
View
BIN  Resources/img/senators/pedro-espada-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/ritchie_web.jpg
Diff not rendered
View
BIN  Resources/img/senators/roy-j-mcdonald.jpg
Diff not rendered
View
BIN  Resources/img/senators/ruben-diaz.jpg
Diff not rendered
View
BIN  Resources/img/senators/ruth-hassell-thompson.jpg
Diff not rendered
View
BIN  Resources/img/senators/serranoheadshot.JPG
Diff not rendered
View
BIN  Resources/img/senators/shirley-l-huntley.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/andrea-stewart-cousins.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/andrew-j-lanza.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/antoine-m-thompson.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/bill-perkins.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/brian-x-foley.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/carl-kruger.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/carl-l-marcellino.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/catharine-young.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/charles-j-fuschillo-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/craig-m-johnson.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/dale-m-volker.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/daniel-l-squadron.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/darrel-j-aubertine.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/david-j-valesky.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/dean-g-skelos.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/diane-j-savino.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/elizabeth-little.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/eric-adams.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/eric-t-schneiderman.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/frank-padavan.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/george-d-maziarz.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/george-h-winner-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/george-onorato.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/hugh-t-farley.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/james-l-seward.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/james-s-alesi.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/jeffrey-d-klein.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/john-defrancisco.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/john-j-bonacic.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/john-j-flanagan.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/john-l-sampson.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/jose-m-serrano.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/jose-peralta.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/joseph-e-robach.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/joseph-griffo.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/joseph-p-addabbo-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/kemp-hannon.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/kenneth-p-lavalle.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/kevin-s-parker.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/liz-krueger.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/malcolm-smith.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/martin-j-golden.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/martin-malave-dilan.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/michael-f-nozzolio.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/michael-h-ranzenhofer.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/neil-d-breslin.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/owen-h-johnson.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/pedro-espada-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/roy-j-mcdonald.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/ruben-diaz.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/ruth-hassell-thompson.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/shirley-l-huntley.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/stephen-m-saland.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/suzi-oppenheimer.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/thomas-duane.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/thomas-p-morahan.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/toby-ann-stavisky.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/tom-libous.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/velmanette-montgomery.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/vincent-l-leibell.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/william-j-larkin-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/william-j-larkin.jpg
Diff not rendered
View
BIN  Resources/img/senators/small/william-t-stachowski.jpg
Diff not rendered
View
BIN  Resources/img/senators/stephen-m-saland.jpg
Diff not rendered
View
BIN  Resources/img/senators/suzi-oppenheimer.jpg
Diff not rendered
View
BIN  Resources/img/senators/thomas-duane.jpg
Diff not rendered
View
BIN  Resources/img/senators/thomas-p-morahan.jpg
Diff not rendered
View
BIN  Resources/img/senators/toby-ann-stavisky.jpg
Diff not rendered
View
BIN  Resources/img/senators/tom-libous.jpg
Diff not rendered
View
BIN  Resources/img/senators/velmanette-montgomery.jpg
Diff not rendered
View
BIN  Resources/img/senators/vincent-l-leibell.jpg
Diff not rendered
View
BIN  Resources/img/senators/webphoto1.jpg
Diff not rendered
View
BIN  Resources/img/senators/william-j-larkin-jr.jpg
Diff not rendered
View
BIN  Resources/img/senators/william-j-larkin.jpg
Diff not rendered
View
BIN  Resources/img/senators/william-t-stachowski.jpg
Diff not rendered
View
BIN  Resources/img/senators/young headshot-ret.jpg
Diff not rendered
View
BIN  Resources/img/senators/zeldin.jpg
Diff not rendered
View
BIN  Resources/img/senators/.DS_Store → Resources/inc/.DS_Store
Binary file not shown
View
64 Resources/inc/drupal_services.js
@@ -0,0 +1,64 @@
+
+
+var NYSENATE_SERVICES_ENDPOINT = 'http://www.nysenate.gov/services/json';
+var NYSENATE_DOMAIN = 'nysenate.gov';
+var NYSENATE_APIKEY = '55f7ea8c500758c8a9230fb9121abc36';
+
+//service: views.get node.get
+
+function doNYSenateServiceCall (drupal_method, drupal_method_key, drupal_method_val, callbackFunc)
+{
+ doServiceCall (NYSENATE_SERVICES_ENDPOINT, NYSENATE_DOMAIN, NYSENATE_APIKEY, drupal_method, drupal_method_key, drupal_method_val, callbackFunc);
+}
+
+function S4() {
+ return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
+}
+function rnd() {
+ return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
+}
+
+
+
+function doServiceCall (serviceUrl, domain, apikey, drupal_method, drupal_method_keys, drupal_method_vals, callbackFunc)
+{
+
+var date = new Date();
+var obj = {
+ domain_name: domain,
+ domain_time_stamp: date.getTime() + "",
+ nonce: rnd() /* just a random function that returns a random string */
+ /*sessid: sessionid //not using sessionid's because we have API keys*/
+};
+
+// create the hash using secure hash algorithm using 256bit encryption
+obj.hash = HMAC_SHA256_MAC(apikey, obj.domain_time_stamp+";"+obj.domain_name+";"+obj.nonce+";"+drupal_method);
+
+// this is your view name, be sure your authentication key allows access to views.get
+obj.method = drupal_method;
+
+for (n = 0; n < drupal_method_keys.length; n++)
+{
+ var drupal_method_key = drupal_method_keys[n];
+ var drupal_method_val = drupal_method_vals[n];
+ obj[drupal_method_key] = drupal_method_val;
+}
+
+//Ti.API.debug("sending to: " + serviceUrl + " JSON: " + JSON.stringify(obj));
+
+// create the connection to our services module and send json data via POST
+var xhr = Titanium.Network.createHTTPClient();
+xhr.setTimeout(30000);
+
+// once our data has returned the onload function is used
+xhr.onload = callbackFunc;
+xhr.onerror = function (e)
+{
+ Ti.API.debug("drupal service call error: " + e.error);
+ Ti.API.debug(e);
+};
+
+xhr.open("POST", serviceUrl);
+xhr.send(obj);
+
+}
View
313 Resources/inc/jssha256.js
@@ -0,0 +1,313 @@
+/*
+ * jssha256 version 0.1 - Copyright 2006 B. Poettering
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ * 02111-1307 USA
+ */
+
+/*
+ * http://point-at-infinity.org/jssha256/
+ *
+ * This is a JavaScript implementation of the SHA256 secure hash function
+ * and the HMAC-SHA256 message authentication code (MAC).
+ *
+ * The routines' well-functioning has been verified with the test vectors
+ * given in FIPS-180-2, Appendix B and IETF RFC 4231. The HMAC algorithm
+ * conforms to IETF RFC 2104.
+ *
+ * The following code example computes the hash value of the string "abc".
+ *
+ * SHA256_init();
+ * SHA256_write("abc");
+ * digest = SHA256_finalize();
+ * digest_hex = array_to_hex_string(digest);
+ *
+ * Get the same result by calling the shortcut function SHA256_hash:
+ *
+ * digest_hex = SHA256_hash("abc");
+ *
+ * In the following example the calculation of the HMAC of the string "abc"
+ * using the key "secret key" is shown:
+ *
+ * HMAC_SHA256_init("secret key");
+ * HMAC_SHA256_write("abc");
+ * mac = HMAC_SHA256_finalize();
+ * mac_hex = array_to_hex_string(mac);
+ *
+ * Again, the same can be done more conveniently:
+ *
+ * mac_hex = HMAC_SHA256_MAC("secret key", "abc");
+ *
+ * Note that the internal state of the hash function is held in global
+ * variables. Therefore one hash value calculation has to be completed
+ * before the next is begun. The same applies the the HMAC routines.
+ *
+ * Report bugs to: jssha256 AT point-at-infinity.org
+ *
+ */
+
+/******************************************************************************/
+
+/* Two all purpose helper functions follow */
+
+/* string_to_array: convert a string to a character (byte) array */
+
+function string_to_array(str) {
+ var len = str.length;
+ var res = new Array(len);
+ for(var i = 0; i < len; i++)
+ res[i] = str.charCodeAt(i);
+ return res;
+}
+
+/* array_to_hex_string: convert a byte array to a hexadecimal string */
+
+function array_to_hex_string(ary) {
+ var res = "";
+ for(var i = 0; i < ary.length; i++)
+ res += SHA256_hexchars[ary[i] >> 4] + SHA256_hexchars[ary[i] & 0x0f];
+ return res;
+}
+
+/******************************************************************************/
+
+/* The following are the SHA256 routines */
+
+/*
+ SHA256_init: initialize the internal state of the hash function. Call this
+ function before calling the SHA256_write function.
+*/
+
+function SHA256_init() {
+ SHA256_H = new Array(0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
+ 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19);
+ SHA256_buf = new Array();
+ SHA256_len = 0;
+}
+
+/*
+ SHA256_write: add a message fragment to the hash function's internal state.
+ 'msg' may be given as string or as byte array and may have arbitrary length.
+
+*/
+
+function SHA256_write(msg) {
+ if (typeof(msg) == "string")
+ SHA256_buf = SHA256_buf.concat(string_to_array(msg));
+ else
+ SHA256_buf = SHA256_buf.concat(msg);
+ for(var i = 0; i + 64 <= SHA256_buf.length; i += 64)
+ SHA256_Hash_Byte_Block(SHA256_H, SHA256_buf.slice(i, i + 64));
+ SHA256_buf = SHA256_buf.slice(i);
+ SHA256_len += msg.length;
+}
+
+/*
+ SHA256_finalize: finalize the hash value calculation. Call this function
+ after the last call to SHA256_write. An array of 32 bytes (= 256 bits)
+ is returned.
+*/
+
+function SHA256_finalize() {
+ SHA256_buf[SHA256_buf.length] = 0x80;
+
+ if (SHA256_buf.length > 64 - 8) {
+ for(var i = SHA256_buf.length; i < 64; i++)
+ SHA256_buf[i] = 0;
+ SHA256_Hash_Byte_Block(SHA256_H, SHA256_buf);
+ SHA256_buf.length = 0;
+ }
+
+ for(var i = SHA256_buf.length; i < 64 - 5; i++)
+ SHA256_buf[i] = 0;
+ SHA256_buf[59] = (SHA256_len >>> 29) & 0xff;
+ SHA256_buf[60] = (SHA256_len >>> 21) & 0xff;
+ SHA256_buf[61] = (SHA256_len >>> 13) & 0xff;
+ SHA256_buf[62] = (SHA256_len >>> 5) & 0xff;
+ SHA256_buf[63] = (SHA256_len << 3) & 0xff;
+ SHA256_Hash_Byte_Block(SHA256_H, SHA256_buf);
+
+ var res = new Array(32);
+ for(var i = 0; i < 8; i++) {
+ res[4 * i + 0] = SHA256_H[i] >>> 24;
+ res[4 * i + 1] = (SHA256_H[i] >> 16) & 0xff;
+ res[4 * i + 2] = (SHA256_H[i] >> 8) & 0xff;
+ res[4 * i + 3] = SHA256_H[i] & 0xff;
+ }
+
+ delete SHA256_H;
+ delete SHA256_buf;
+ delete SHA256_len;
+ return res;
+}
+
+/*
+ SHA256_hash: calculate the hash value of the string or byte array 'msg'
+ and return it as hexadecimal string. This shortcut function may be more
+ convenient than calling SHA256_init, SHA256_write, SHA256_finalize
+ and array_to_hex_string explicitly.
+*/
+
+function SHA256_hash(msg) {
+ var res;
+ SHA256_init();
+ SHA256_write(msg);
+ res = SHA256_finalize();
+ return array_to_hex_string(res);
+}
+
+/******************************************************************************/
+
+/* The following are the HMAC-SHA256 routines */
+
+/*
+ HMAC_SHA256_init: initialize the MAC's internal state. The MAC key 'key'
+ may be given as string or as byte array and may have arbitrary length.
+*/
+
+function HMAC_SHA256_init(key) {
+ if (typeof(key) == "string")
+ HMAC_SHA256_key = string_to_array(key);
+ else
+ HMAC_SHA256_key = new Array().concat(key);
+
+ if (HMAC_SHA256_key.length > 64) {
+ SHA256_init();
+ SHA256_write(HMAC_SHA256_key);
+ HMAC_SHA256_key = SHA256_finalize();
+ }
+
+ for(var i = HMAC_SHA256_key.length; i < 64; i++)
+ HMAC_SHA256_key[i] = 0;
+ for(var i = 0; i < 64; i++)
+ HMAC_SHA256_key[i] ^= 0x36;
+ SHA256_init();
+ SHA256_write(HMAC_SHA256_key);
+}
+
+/*
+ HMAC_SHA256_write: process a message fragment. 'msg' may be given as
+ string or as byte array and may have arbitrary length.
+*/
+
+function HMAC_SHA256_write(msg) {
+ SHA256_write(msg);
+}
+
+/*
+ HMAC_SHA256_finalize: finalize the HMAC calculation. An array of 32 bytes
+ (= 256 bits) is returned.
+*/
+
+function HMAC_SHA256_finalize() {
+ var md = SHA256_finalize();
+ for(var i = 0; i < 64; i++)
+ HMAC_SHA256_key[i] ^= 0x36 ^ 0x5c;
+ SHA256_init();
+ SHA256_write(HMAC_SHA256_key);
+ SHA256_write(md);
+ for(var i = 0; i < 64; i++)
+ HMAC_SHA256_key[i] = 0;
+ delete HMAC_SHA256_key;
+ return SHA256_finalize();
+}
+
+/*
+ HMAC_SHA256_MAC: calculate the HMAC value of message 'msg' under key 'key'
+ (both may be of type string or byte array); return the MAC as hexadecimal
+ string. This shortcut function may be more convenient than calling
+ HMAC_SHA256_init, HMAC_SHA256_write, HMAC_SHA256_finalize and
+ array_to_hex_string explicitly.
+*/
+
+function HMAC_SHA256_MAC(key, msg) {
+ var res;
+ HMAC_SHA256_init(key);
+ HMAC_SHA256_write(msg);
+ res = HMAC_SHA256_finalize()
+ return array_to_hex_string(res);
+}
+
+/******************************************************************************/
+
+/* The following lookup tables and functions are for internal use only! */
+
+SHA256_hexchars = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
+ 'a', 'b', 'c', 'd', 'e', 'f');
+
+SHA256_K = new Array(
+ 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
+ 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+ 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
+ 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+ 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
+ 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+ 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
+ 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+ 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
+ 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+ 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+);
+
+function SHA256_sigma0(x) {
+ return ((x >>> 7) | (x << 25)) ^ ((x >>> 18) | (x << 14)) ^ (x >>> 3);
+}
+
+function SHA256_sigma1(x) {
+ return ((x >>> 17) | (x << 15)) ^ ((x >>> 19) | (x << 13)) ^ (x >>> 10);
+}
+
+function SHA256_Sigma0(x) {
+ return ((x >>> 2) | (x << 30)) ^ ((x >>> 13) | (x << 19)) ^
+ ((x >>> 22) | (x << 10));
+}
+
+function SHA256_Sigma1(x) {
+ return ((x >>> 6) | (x << 26)) ^ ((x >>> 11) | (x << 21)) ^
+ ((x >>> 25) | (x << 7));
+}
+
+function SHA256_Ch(x, y, z) {
+ return z ^ (x & (y ^ z));
+}
+
+function SHA256_Maj(x, y, z) {
+ return (x & y) ^ (z & (x ^ y));
+}
+
+function SHA256_Hash_Word_Block(H, W) {
+ for(var i = 16; i < 64; i++)
+ W[i] = (SHA256_sigma1(W[i - 2]) + W[i - 7] +
+ SHA256_sigma0(W[i - 15]) + W[i - 16]) & 0xffffffff;
+ var state = new Array().concat(H);
+ for(var i = 0; i < 64; i++) {
+ var T1 = state[7] + SHA256_Sigma1(state[4]) +
+ SHA256_Ch(state[4], state[5], state[6]) + SHA256_K[i] + W[i];
+ var T2 = SHA256_Sigma0(state[0]) + SHA256_Maj(state[0], state[1], state[2]);
+ state.pop();
+ state.unshift((T1 + T2) & 0xffffffff);
+ state[4] = (state[4] + T1) & 0xffffffff;
+ }
+ for(var i = 0; i < 8; i++)
+ H[i] = (H[i] + state[i]) & 0xffffffff;
+}
+
+function SHA256_Hash_Byte_Block(H, w) {
+ var W = new Array(16);
+ for(var i = 0; i < 16; i++)
+ W[i] = w[4 * i + 0] << 24 | w[4 * i + 1] << 16 |
+ w[4 * i + 2] << 8 | w[4 * i + 3];
+ SHA256_Hash_Word_Block(H, W);
+}
View
103 Resources/inc/map.js
@@ -0,0 +1,103 @@
+var win = Ti.UI.currentWindow;
+
+var kml = win.kml;
+var routeName = win.title;
+var routeColor = "#191970";
+
+
+var data = [];
+
+var mapview = Ti.Map.createView({
+ mapType: Titanium.Map.STANDARD_TYPE,
+ region:{latitude:40.75, longitude:-74.37, latitudeDelta:.5, longitudeDelta:.5},
+ animate:true,
+ regionFit:true,
+ userLocation:true,
+ annotations:[]
+});
+
+
+win.add(mapview);
+
+function loadKMLPoly (kmlUrl)
+{
+ var centerLat;
+ var centerLon;
+ var centerDelta = 5;
+
+ var xhr = Titanium.Network.createHTTPClient();
+ xhr.open('GET',kmlUrl);
+
+ xhr.onload = function(){
+ // Now parse the XML
+ var xml = this.responseXML;
+ var points = [];
+
+ var coords = xml.documentElement.getElementsByTagName("coordinates");
+
+
+ for(var cc=0; cc < coords.length; cc++) {
+ var line = coords.item(cc);
+ var str = line.firstChild.text.split("\n");
+
+ for(dd = 0; dd < str.length; dd++) {
+
+ if (str[dd].length > 0)
+ {
+ // Ti.API.info("coord" + dd + ": " + str[dd]);
+
+ var loc = str[dd].split(',');
+
+ if(loc[0] && loc[1]) {
+
+ if (!centerLat)
+ centerLat = [loc[1],loc[1]];
+
+ centerLat[0] = Math.max(centerLat[0],loc[1]);
+ centerLat[1] = Math.min(centerLat[1],loc[1]);
+ // Ti.API.info("lat max:" + centerLat[0] + " min:" + centerLat[1]);
+
+ if (!centerLon)
+ centerLon = [loc[0],loc[0]];
+
+ centerLon[0] = Math.min(centerLon[0],loc[0]);
+ centerLon[1] = Math.max(centerLon[1],loc[0]);
+ // Ti.API.info("long max:" + centerLon[1] + " min:" + centerLon[0]);
+
+
+ points.push({latitude: loc[1],
+ longitude: loc[0]});
+ }
+ }
+ }
+
+ }
+
+ var route = {
+ name:routeName,
+ points:points,
+ color:routeColor,
+ width:3
+ };
+
+ // add a route
+ mapview.addRoute(route);
+
+ var latDif = (Math.abs(centerLat[1] - centerLat[0])/2);
+ var lonDif = (Math.abs(centerLon[1] - centerLon[0])/2);
+ centerDelta = centerDelta * latDif;
+ Ti.API.info("diff: " + latDif + "," + lonDif);
+ centerLat[2] = centerLat[1] + latDif;
+ centerLon[2] = centerLon[0] + lonDif;
+
+ Ti.API.info("map center: " + centerLat[2] + "," + centerLon[2]);
+
+ mapview.setLocation({latitude:centerLat[2],longitude:centerLon[2],latitudeDelta:centerDelta,longitudeDelta:centerDelta});
+ };
+ xhr.send();
+
+ }
+
+
+
+loadKMLPoly (kml);
View
61 Resources/views/window/rss.js → Resources/inc/rss.js
@@ -1,4 +1,4 @@
-Ti.include("../../inc/globals.js");
+Ti.include("../globals.js");
var win = Titanium.UI.currentWindow;
@@ -8,28 +8,26 @@ var listUrl = Titanium.UI.currentWindow.rss;
var toolActInd = Titanium.UI.createActivityIndicator();
toolActInd.font = {fontFamily:'Helvetica Neue', fontSize:15,fontWeight:'bold'};
toolActInd.color = 'white';
-toolActInd.message = 'Loading...';
-win.setToolbar([toolActInd],{animated:true});
+toolActInd.message = 'Updating content...';
toolActInd.show();
+/*
var cachedFeed = getCachedFile(listUrl);
if (cachedFeed)
{
-
- var doc = Titanium.XML.parseString(cachedFeed.read().text).documentElement;
-
+ var doc = Titanium.XML.parseString(cachedFeed).documentElement;
parseDoc(doc);
+
}
-
+*/
var xhr = Ti.Network.createHTTPClient();
xhr.onerror = function ()
{
toolActInd.hide();
- win.setToolbar(null,{animated:true});
}
xhr.onload = function()
@@ -41,7 +39,6 @@ if (cachedFeed)
parseDoc(doc);
toolActInd.hide();
- win.setToolbar(null,{animated:true});
};
@@ -73,14 +70,11 @@ function parseDoc(doc)
var title = item.getElementsByTagName("title").item(0).text;
- title = title.replace(/<.*?>/g, '').replace(/^\s*/, "").replace(/\s*$/, "").replace('\n','');
-
-
Titanium.API.debug("parsing item: " + title);
var summary = "Published " + item.getElementsByTagName("pubDate").item(0).text;
- var row = Ti.UI.createTableViewRow({height:100});
+ var row = Ti.UI.createTableViewRow({height:80});
row.hasChild = true;
row.htmlTitle = title;
@@ -91,23 +85,35 @@ function parseDoc(doc)
var labelTitle = Ti.UI.createLabel({
text:title,
left:5,
- top:0,
- height:80,
- font:{fontSize:24,fontFamily:'Helvetica Neue'},
- color:"#333333"
+ top:10,
+ height:40,
+ font:{fontSize:16},
+ color:"#000000"
});
row.add(labelTitle);
var labelSummary = Ti.UI.createLabel({
text:summary,
left:5,
- top:65,
- font:{fontSize:11,fontFamily:'Helvetica Neue'},
- color:"#777777"
+ top:45,
+ font:{fontSize:11},
+ color:"#333333"
});
row.add(labelSummary);
+
+ if (greyBg)
+ {
+ row.backgroundColor="#eeeeee";
+ }
+ else
+ {
+ row.backgroundColor = "#ffffff";
+ }
+
+
+
greyBg = !greyBg;
/*
// var media = thumbnails.item(0).getAttribute("url");
@@ -137,17 +143,10 @@ function parseDoc(doc)
tableview.addEventListener('click',function(e)
{
- if (e.row.url.indexOf('nysenate.gov')==-1)
- {
- var htmlData = e.row.htmlview;
- htmlData = '<html><head><style>.links, .share_links { display: none;} body {font-family:"Helvetica";} h1, h2{color:#012849;} a:link,a:visited{color:#5E4D42;} .imagecache-full_node_featured_image {width:280px;max-height:200px;}</style><meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" /> <meta name="apple-mobile-web-app-capable" content="YES"></head><body><h2>' + e.row.htmlTitle + '</h2>' + htmlData + '</body></html>';
- showHTMLContent(e.row.htmlTitle,e.row.url,htmlData,win.detailView);
- }
- else
- {
- showNYSenateContent(e.row.htmlTitle,e.row.url,win.detailView);
-
- }
+ var htmlData = e.row.htmlview;
+ htmlData = '<html><head><style>.links, .share_links { display: none;} body {font-family:"Helvetica";} h1, h2{color:#012849;} a:link,a:visited{color:#5E4D42;} .imagecache-full_node_featured_image {width:280px;max-height:200px;}</style><meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" /> <meta name="apple-mobile-web-app-capable" content="YES"></head><body><h2>' + e.row.htmlTitle + '</h2>' + htmlData + '</body></html>';
+ showHTMLContent(e.row.htmlTitle,e.row.url,htmlData);
+
});
}
View
77 Resources/views/window/findsenator.js → Resources/inc/seeclickfix.js
@@ -1,14 +1,38 @@
-Ti.include("../../inc/globals.js");
+Ti.include("../globals.js");
+
+
+//http://seeclickfix.com/api/issues.xml
+
+//POST DATA: issue[summary]=foo&api_key=87ced127d6dead827a0d26ebc14a176a9d59c886&issue[lat]=41.3103725899427&issue[lng]=-72.9241595114853
+
+/*
+
+Required Parameters
+
+api_key - API Key
+issue[summary] - Summary of the problem.
+issue[lat] - Longitude of the issue.
+issue[lng] - Latitude of the issue.
+Some Service Request Questions - Some service request questions are required when reporting custom service request types.
+Optional Parameters
+
+issue[description] - Longer text describing the problem.
+issue[address] - Text representation of the location of the issue.
+issue[reporter_email] - Email of the person reporting the issue.
+issue[reporter_display] - Text display of the person reporting the issue.
+issue[issue_image_attributes][uploaded_data] - Attach an image to the issue. Form data must be sent as "multipart/form-data".
+issue[request_type_id] - If submitting to a service request, specify the service request ID here. By adding this attribute, additional validations are required, including: 1. Making sure the service request can be within the given boundaries. 2. Making sure all of the required additional questions are completed.
+For each service request question provide the following parameters.
+issue[request_type_answers_attributes][][request_type_question_id] - ID of the service request question.
+issue[request_type_answers_attributes][][answer] - Answer to the service request question.
+*/
+
+
var win = Titanium.UI.currentWindow;
var geoInProgress = false;
-win.backgroundColor = "#333333";
-
-var sWidth = Titanium.UI.currentWindow.size.width;
-var sHeight = Titanium.UI.currentWindow.size.height;
-
//
// CREATE FIELD ONE
//
@@ -16,7 +40,7 @@ var lblAddress = Titanium.UI.createLabel({
text:'Street Address',
top:10,
left:30,
- width:sWidth*.75,
+ width:'auto',
height:'auto',
color:"#ffffff"
});
@@ -28,7 +52,7 @@ var txtAddress = Titanium.UI.createTextField({
height:35,
top:35,
left:30,
- width:sWidth*.75,
+ width:250,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
});
@@ -50,10 +74,10 @@ win.add(lblZipcode);
var txtZipcode = Titanium.UI.createTextField({
hintText:'Your New York State Zipcode',
+ height:35,
top:100,
left:30,
width:250,
- height:35,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
});
@@ -63,29 +87,20 @@ win.add(txtZipcode);
// CREATE BUTTON
//
var btnSearch = Titanium.UI.createButton({
- title:'Search by Address',
- top:160,
+ title:'Submit Report',
+ top:140,
left:30,
- width:250,
- height:50,
- color:"#ffffff",
- backgroundImage:'../../img/btn/BUTT_grn_off.png',
- backgroundSelectedImage:'../../img/btn/BUTT_grn_on.png',
- backgroundDisabledImage: '../../img/btn/BUTT_drk_off.png'
- }
- );
+ height:30,
+ width:250
+});
win.add(btnSearch);
var btnGeo = Titanium.UI.createButton({
- title:'Search by GPS Location',
- top:240,
+ title:'Find GPS Location',
+ top:210,
left:30,
- width:250,
- height:50,
- color:"#333333",
- backgroundImage:'../../img/btn/BUTT_gry_off.png',
- backgroundSelectedImage:'../../img/btn/BUTT_gry_on.png',
- backgroundDisabledImage: '../../img/btn/BUTT_drk_off.png'
+ height:30,
+ width:250
});
win.add(btnGeo);
@@ -164,13 +179,11 @@ function searchByAddress()
twitter:senator.twitter,
facebook:senator.facebook,
barColor:DEFAULT_BAR_COLOR,
- backgroundImage:'../../img/bg/wood.jpg',
- detailView:win.detailView
-
-
+ backgroundImage:'../../img/bg/wood.jpg'
+
});
- win.detailView.open(newWin,{animated:true});
+ Titanium.UI.currentTab.open(newWin,{animated:true});
}
}
catch (E)
View
0  Resources/views/window/videos-blip.js → Resources/inc/videos-blip.js
File renamed without changes
View
145 Resources/views/window/videos.js → Resources/inc/youtube.js
@@ -1,18 +1,13 @@
-Ti.include("../../inc/globals.js");
-
var win = Titanium.UI.currentWindow;
var tableview;
// create table view data object
-
-var currentChannel = 'nysenate';
+var data = [];
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 videos...';
-win.setToolbar([toolActInd],{animated:true});
toolActInd.show();
var xhr = Ti.Network.createHTTPClient();
@@ -20,16 +15,11 @@ var xhr = Ti.Network.createHTTPClient();
function doYouTubeSearch (channel, searchTerm)
{
-
- if (searchTerm != '')
- {
- win.title = 'Videos: ' + searchTerm;
- }
-
- var searchUrl = 'http://gdata.youtube.com/feeds/api/videos?alt=rss&author=' + escape(channel) + '&q=' + escape(searchTerm) + "&orderby=published&max-results=50&v=2";
- win.setToolbar([toolActInd],{animated:true});
+ var searchUrl = 'http://gdata.youtube.com/feeds/api/videos?alt=rss&author=' + escape(channel) + '&q=' + escape(searchTerm) + "&orderby=published&max-results=25&v=2";
toolActInd.show();
+ Ti.API.debug("youtube: " + searchUrl);
+
xhr.open("GET",searchUrl);
xhr.send();
}
@@ -38,8 +28,6 @@ xhr.onload = function()
{
try
{
- var data = [];
-
var doc;
Titanium.API.debug("got youtube video response");
@@ -95,34 +83,39 @@ xhr.onload = function()
var thumbnail = "http://i.ytimg.com/vi/" + guid + "/2.jpg";
- var row = Ti.UI.createTableViewRow({height:160});
+ var row = Ti.UI.createTableViewRow({height:80});
row.url = link;
row.guid = guid;
row.videotitle = title;
+ row.backgroundColor="#000000";
+ row.color ="#ffffff";
+
var labelTitle = Ti.UI.createLabel({
text:title,
- left:205,
+ left:105,
top:10,
- height:100,
- font:{fontSize:22}
+ height:40,
+ font:{fontSize:16},
+ color:"#ffffff"
});
row.add(labelTitle);
var labelSummary = Ti.UI.createLabel({
text:summary,
- left:205,
+ left:105,
top:45,
- font:{fontSize:14}
+ font:{fontSize:12},
+ color:"#ffffff"
});
row.add(labelSummary);
var img = Ti.UI.createImageView({
- image:thumbnail,
+ url:thumbnail,
left:0,
- height:160,
- width:200
+ height:80,
+ width:100
});
row.add(img);
@@ -137,11 +130,13 @@ xhr.onload = function()
else
{
tableview = Titanium.UI.createTableView({
- data:data
+ data:data,
+ backgroundColor:"#000000",
+ separatorColor:"#000000",
+ top:45
});
Titanium.UI.currentWindow.add(tableview);
-
tableview.addEventListener('click',function(e)
{
@@ -149,74 +144,16 @@ xhr.onload = function()
});
-
- var buttonObjects = [
- {title:'Short Clips', enabled:false},
- {title:'Full Sessions & Events', enabled:true}
- ];
-
-
- var bb1 = Titanium.UI.createButtonBar({
- labels:buttonObjects,
- style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
- height:35,
- width:'auto'
- });
-
- bb1.addEventListener('click', function(e)
- {
- if (e.index == 0)
- {
- win.title = 'YouTube: Short Clips';
- currentChannel = 'nysenate';
- doYouTubeSearch (currentChannel, '');
-
- buttonObjects[0].enabled = false;
- buttonObjects[1].enabled = true;
-