function Controller(){function e(){s.toggleMenu(o.news,Alloy.Globals.animations.menu)}function t(){s.toggleMenu(o.filterTable,Alloy.Globals.animations.filterMenu)}function i(){if(Alloy.Globals.dataValidSections){var e=[];_.each(Alloy.Globals.sections,function(t){s.is("section item",t);var i=Alloy.createController("filterTableRow",{id:t.sectionId,title:t.title,type:"section"}).getView();e.push(i)}),o.filterTable.data=e}else setTimeout(i,300)}function l(e){n({sectionId:e.row.sectionId})}function n(e){void 0!==c&&c===e.sectionId?s.toggleMenu(o.filterTable,Alloy.Globals.animations.filterMenu):(s.i("changing filter ["+e.sectionId+"]"),Alloy.Globals.loading.showHide("show"),o.newsItems.getNews(e.sectionId),s.toggleMenu(o.filterTable,Alloy.Globals.animations.filterMenu))}require("alloy/controllers/BaseController").apply(this,Array.prototype.slice.call(arguments)),this.__controllerPath="news",arguments[0]?arguments[0].__parentSymbol:null,arguments[0]?arguments[0].$model:null,arguments[0]?arguments[0].__itemTemplate:null;var o=this,r={},a={};o.__views.news=Ti.UI.createView({backgroundColor:Alloy.CFG.colors.darkBlue,layout:"vertical",id:"news"}),o.__views.news&&o.addTopLevelView(o.__views.news),o.__views.titleBar=Ti.UI.createView({height:40,top:0,id:"titleBar"}),o.__views.news.add(o.__views.titleBar),o.__views.menuButton=Ti.UI.createView({width:33,height:33,left:12,backgroundImage:"images/iconMenu.png",id:"menuButton"}),o.__views.titleBar.add(o.__views.menuButton),e?o.__views.menuButton.addEventListener("click",e):a["$.__views.menuButton!click!toggleMenu"]=!0,o.__views.title=Ti.UI.createLabel({font:{fontSize:20,fontFamily:Alloy.CFG.fonts.bold},color:Alloy.CFG.colors.white,text:L("News_Title"),id:"title"}),o.__views.titleBar.add(o.__views.title),o.__views.filterButton=Ti.UI.createView({width:33,height:33,right:12,backgroundImage:"images/iconFilter.png",id:"filterButton"}),o.__views.titleBar.add(o.__views.filterButton),t?o.__views.filterButton.addEventListener("click",t):a["$.__views.filterButton!click!toggleFilterMenu"]=!0,o.__views.tableWrapper=Ti.UI.createView({id:"tableWrapper"}),o.__views.news.add(o.__views.tableWrapper),o.__views.table=Ti.UI.createScrollView({layout:"vertical",contentWidth:Ti.UI.FILL,id:"table"}),o.__views.tableWrapper.add(o.__views.table),o.__views.newsItems=Alloy.createController("newsItems",{id:"newsItems",itemCount:"10",__parentSymbol:o.__views.table}),o.__views.newsItems.setParent(o.__views.table),o.__views.filterTable=Ti.UI.createTableView({separatorColor:Alloy.CFG.colors.darkGrey,backgroundColor:"transparent",height:420,top:-420,id:"filterTable"}),o.__views.tableWrapper.add(o.__views.filterTable),l?o.__views.filterTable.addEventListener("click",l):a["$.__views.filterTable!click!filterMenuClicked"]=!0,r.destroy=function(){},_.extend(o,o.__views);var s=require("helpers");require("feedSigner"),require("netConnect");var c;i(),o.news.cancelRefresh=o.newsItems.cancelRefresh,a["$.__views.menuButton!click!toggleMenu"]&&o.__views.menuButton.addEventListener("click",e),a["$.__views.filterButton!click!toggleFilterMenu"]&&o.__views.filterButton.addEventListener("click",t),a["$.__views.filterTable!click!filterMenuClicked"]&&o.__views.filterTable.addEventListener("click",l),_.extend(o,r)}var Alloy=require("alloy"),Backbone=Alloy.Backbone,_=Alloy._;module.exports=Controller;