Facebook app - reorganized some stuff; better HTML output

This commit is contained in:
Zach Copley 2009-02-04 22:33:50 +00:00
parent a97f8f6a43
commit 68152dcf3a
2 changed files with 4 additions and 21 deletions

View File

@ -148,14 +148,11 @@ class FacebookhomeAction extends FacebookAction
function showNoticeForm() function showNoticeForm()
{ {
$post_action = "$this->app_uri/index.php"; $post_action = "$this->app_uri/index.php";
$notice_form = new FacebookNoticeForm($this, $post_action, null, $notice_form = new FacebookNoticeForm($this, $post_action, null,
$post_action, $this->user); $post_action, $this->user);
$notice_form->show(); $notice_form->show();
} }
function title() function title()
@ -169,7 +166,6 @@ class FacebookhomeAction extends FacebookAction
function showContent() function showContent()
{ {
$notice = $this->user->noticesWithFriends(($this->page-1) * $notice = $this->user->noticesWithFriends(($this->page-1) *
NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
@ -179,7 +175,6 @@ class FacebookhomeAction extends FacebookAction
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'index.php', array('nickname' => $this->user->nickname)); $this->page, 'index.php', array('nickname' => $this->user->nickname));
} }
function showNoticeList($notice) function showNoticeList($notice)

View File

@ -129,7 +129,7 @@ class FacebookAction extends Action
* Start an Facebook ready HTML document * Start an Facebook ready HTML document
* *
* For Facebook we don't want to actually output any headers, * For Facebook we don't want to actually output any headers,
* DTD info, etc. * DTD info, etc. Just Stylesheet and JavaScript links.
* *
* If $type isn't specified, will attempt to do content negotiation. * If $type isn't specified, will attempt to do content negotiation.
* *
@ -140,6 +140,9 @@ class FacebookAction extends Action
function startHTML($type=null) function startHTML($type=null)
{ {
$this->showStylesheets();
$this->showScripts();
$this->elementStart('div', array('class' => 'facebook-page')); $this->elementStart('div', array('class' => 'facebook-page'));
} }
@ -181,8 +184,6 @@ class FacebookAction extends Action
function showHead($error, $success) function showHead($error, $success)
{ {
$this->showStylesheets();
$this->showScripts();
if ($error) { if ($error) {
$this->element("h1", null, $error); $this->element("h1", null, $error);
@ -204,7 +205,6 @@ class FacebookAction extends Action
// Make this into a widget later // Make this into a widget later
function showLocalNav() function showLocalNav()
{ {
$this->elementStart('ul', array('class' => 'nav')); $this->elementStart('ul', array('class' => 'nav'));
$this->elementStart('li', array('class' => $this->elementStart('li', array('class' =>
@ -229,18 +229,7 @@ class FacebookAction extends Action
$this->elementEnd('li'); $this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
} }
/**
* Show primary navigation.
*
* @return nothing
*/
function showPrimaryNav()
{
// we don't want to show anything for this
}
/** /**
* Show header of the page. * Show header of the page.
@ -254,7 +243,6 @@ class FacebookAction extends Action
$this->elementStart('div', array('id' => 'header')); $this->elementStart('div', array('id' => 'header'));
$this->showLogo(); $this->showLogo();
$this->showNoticeForm(); $this->showNoticeForm();
$this->showPrimaryNav();
$this->elementEnd('div'); $this->elementEnd('div');
} }