Type.registerNamespace('SpottedScript.Pages.Events.Photos');
SpottedScript.Pages.Events.Photos.Controller=function(view){SpottedScript.Pages.Events.Photos.Controller.initializeBase(this);this.view=view;$addHandler(view.get_uiCurrentGallery(),'change',Function.createDelegate(this,this.galleryChanged));this.setupController();}
SpottedScript.Pages.Events.Photos.Controller.prototype={view:null,galleryChanged:function(e){for(var $0=0;$0<this.view.get_uiCurrentGallery().childNodes.length;$0++){if((this.view.get_uiCurrentGallery().childNodes[$0]).selected){var $1=Number.parseInvariant((this.view.get_uiCurrentGallery().childNodes[$0]).value);(this.get_photoProvider()).$1($1);this.view.get_uiPhotoControl().isGallerySelectedChanged($1>0);this.view.get_uiPhotoBrowser().set_$E(0);this.get_photoBrowser().get_$C().set_$1(1);}}},get_photoControl:function(){return this.view.get_uiPhotoControl();},get_photoBrowser:function(){return this.view.get_uiPhotoBrowser();},get_threadControl:function(){return this.view.get_uiThreadControl();},photoProvider:null,get_photoProvider:function(){if(!this.photoProvider){this.photoProvider=new SpottedScript.Controls.PhotoBrowser.EventPhotoProvider(Number.parseInvariant(this.view.get_uiGalleryK().value),Number.parseInvariant(this.view.get_uiEventK().value));}return this.photoProvider;},get_latestChatController:function(){return this.view.get_uiLatestChat();}}
SpottedScript.Pages.Events.Photos.View=function(clientId){SpottedScript.Pages.Events.Photos.View.initializeBase(this,[clientId]);this.clientId=clientId;}
SpottedScript.Pages.Events.Photos.View.prototype={clientId:null,get_uiTitle:function(){return document.getElementById(this.clientId+'_uiTitle');},get_uiEventInfoSpan:function(){return document.getElementById(this.clientId+'_uiEventInfoSpan');},get_uiCurrentGallery:function(){return document.getElementById(this.clientId+'_uiCurrentGallery');},get_uiPhotoBrowser:function(){return eval(this.clientId+'_uiPhotoBrowserController');},get_uiPhotoControl:function(){return eval(this.clientId+'_uiPhotoControlController');},get_uiUpdatePanel:function(){return document.getElementById(this.clientId+'_uiUpdatePanel');},get_uiLatestChat:function(){return eval(this.clientId+'_uiLatestChatController');},get_uiThreadControl:function(){return eval(this.clientId+'_uiThreadControlController');},get_uiGalleryK:function(){return document.getElementById(this.clientId+'_uiGalleryK');},get_uiEventK:function(){return document.getElementById(this.clientId+'_uiEventK');},get_genericContainerPage:function(){return document.getElementById(this.clientId+'_GenericContainerPage');}}
SpottedScript.Pages.Events.Photos.Controller.registerClass('SpottedScript.Pages.Events.Photos.Controller',SpottedScript.Controls.PhotoBrowser.PhotosController);
SpottedScript.Pages.Events.Photos.View.registerClass('SpottedScript.Pages.Events.Photos.View',SpottedScript.Pages.Events.EventUserControl.View);
