예제 #1
0
파일: my_photos.php 프로젝트: vazahat/dudex
 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $count = 28;
     $photos = $this->bridge->findUserPhotos($this->userId, 0, $count);
     $height = $this->windowHeight - 250;
     $height = $height > 650 ? 650 : $height;
     if (empty($photos)) {
         $height = null;
     } else {
         $this->addComponent('photoList', new GHEADER_CMP_MyPhotoList($photos));
     }
     $this->assign('height', $height);
     $js = UTIL_JsGenerator::composeJsString('var photoSelector = new GHEADER.PhotoSelector({$params}, _scope)', array('params' => array('responder' => OW::getRouter()->urlFor('GHEADER_CTRL_Header', 'rsp'), 'userId' => $this->userId, 'listFull' => count($photos) < $count)));
     OW::getDocument()->addOnloadScript($js);
 }