summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-17 20:10:56 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-01-17 20:10:56 +0000
commite019a55a83b70684f629bcd179ec938d735b4a57 (patch)
tree56a44da68df769a965f18caf14e6fadbc2138e2f /lib
parent400927f757b1e4d13a6703c73125a4a38137eba9 (diff)
parent6cc3f78cf309a80c72156c673dceac21dde63603 (diff)
Merge branch 'uiredesign' of /var/www/trunk into uiredesign
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php4
-rw-r--r--lib/htmloutputter.php23
-rw-r--r--lib/noticeform.php2
-rw-r--r--lib/noticelist.php14
-rw-r--r--lib/personalgroupnav.php10
-rw-r--r--lib/settingsgroupnav.php4
6 files changed, 25 insertions, 32 deletions
diff --git a/lib/action.php b/lib/action.php
index 5ff536dab..71520b84e 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -566,7 +566,9 @@ class Action extends HTMLOutputter // lawsuit
$lattrs['class'] = 'current';
}
- $this->elementStart('li', (is_null($id)) ? null : array('id' => $id), $lattrs);
+ (is_null($id)) ? $lattrs : $lattrs['id'] = $id;
+
+ $this->elementStart('li', $lattrs);
$attrs['href'] = $url;
if ($title) {
$attrs['title'] = $title;
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index eb8a612e4..71f17604b 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -155,20 +155,17 @@ class HTMLOutputter extends XMLOutputter
function input($id, $label, $value=null, $instructions=null)
{
- $this->elementStart('p');
$this->element('label', array('for' => $id), $label);
$attrs = array('name' => $id,
'type' => 'text',
- 'class' => 'input_text',
'id' => $id);
if ($value) {
$attrs['value'] = htmlspecialchars($value);
}
$this->element('input', $attrs);
if ($instructions) {
- $this->element('span', 'input_instructions', $instructions);
+ $this->element('p', 'form_guide', $instructions);
}
- $this->elementEnd('p');
}
/**
@@ -192,7 +189,6 @@ class HTMLOutputter extends XMLOutputter
function checkbox($id, $label, $checked=false, $instructions=null,
$value='true', $disabled=false)
{
- $this->elementStart('p');
$attrs = array('name' => $id,
'type' => 'checkbox',
'class' => 'checkbox',
@@ -208,14 +204,13 @@ class HTMLOutputter extends XMLOutputter
}
$this->element('input', $attrs);
$this->text(' ');
- $this->element('label', array('class' => 'checkbox_label',
+ $this->element('label', array('class' => 'checkbox',
'for' => $id),
$label);
$this->text(' ');
if ($instructions) {
- $this->element('span', 'input_instructions', $instructions);
+ $this->element('p', 'form_guide', $instructions);
}
- $this->elementEnd('p');
}
/**
@@ -240,7 +235,6 @@ class HTMLOutputter extends XMLOutputter
function dropdown($id, $label, $content, $instructions=null,
$blank_select=false, $selected=null)
{
- $this->elementStart('p');
$this->element('label', array('for' => $id), $label);
$this->elementStart('select', array('id' => $id, 'name' => $id));
if ($blank_select) {
@@ -257,9 +251,8 @@ class HTMLOutputter extends XMLOutputter
}
$this->elementEnd('select');
if ($instructions) {
- $this->element('span', 'input_instructions', $instructions);
+ $this->element('p', 'form_guide', $instructions);
}
- $this->elementEnd('p');
}
/**
@@ -296,7 +289,6 @@ class HTMLOutputter extends XMLOutputter
function password($id, $label, $instructions=null)
{
- $this->elementStart('p');
$this->element('label', array('for' => $id), $label);
$attrs = array('name' => $id,
'type' => 'password',
@@ -304,9 +296,8 @@ class HTMLOutputter extends XMLOutputter
'id' => $id);
$this->element('input', $attrs);
if ($instructions) {
- $this->element('span', 'input_instructions', $instructions);
+ $this->element('p', 'form_guide', $instructions);
}
- $this->elementEnd('p');
}
/**
@@ -348,7 +339,6 @@ class HTMLOutputter extends XMLOutputter
function textarea($id, $label, $content=null, $instructions=null)
{
- $this->elementStart('p');
$this->element('label', array('for' => $id), $label);
$this->element('textarea', array('rows' => 3,
'cols' => 40,
@@ -356,8 +346,7 @@ class HTMLOutputter extends XMLOutputter
'id' => $id),
($content) ? $content : '');
if ($instructions) {
- $this->element('span', 'input_instructions', $instructions);
+ $this->element('p', 'form_guide', $instructions);
}
- $this->elementEnd('p');
}
}
diff --git a/lib/noticeform.php b/lib/noticeform.php
index 84817639a..d6a3aa9c2 100644
--- a/lib/noticeform.php
+++ b/lib/noticeform.php
@@ -144,8 +144,8 @@ class NoticeForm extends Form
if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');
- $this->out->hidden('notice_in-reply-to', $this->action, 'inreplyto');
}
+ $this->out->hidden('notice_in-reply-to', $this->action, 'inreplyto');
}
/**
diff --git a/lib/noticelist.php b/lib/noticelist.php
index fde93a3b6..1283e43e4 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -438,7 +438,7 @@ class NoticeListItem extends Widget
$reply_url = common_local_url('newnotice',
array('replyto' => $this->profile->nickname));
- $this->out->elementStart('dl', 'reply');
+ $this->out->elementStart('dl', 'notice_reply');
$this->out->element('dt', null, _('Reply to this notice'));
$this->out->elementStart('dd');
$this->out->element('a', array('href' => $reply_url,
@@ -459,11 +459,13 @@ class NoticeListItem extends Widget
if ($user && $this->notice->profile_id == $user->id) {
$deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id));
- $this->out->elementStart('a', array('class' => 'deletenotice',
- 'href' => $deleteurl,
- 'title' => _('delete')));
- $this->out->raw(' &#215;');
- $this->out->elementEnd('a');
+ $this->out->elementStart('dl', 'notice_delete');
+ $this->out->element('dt', null, _('Delete this notice'));
+ $this->out->elementStart('dd');
+ $this->out->element('a', array('href' => $deleteurl,
+ 'title' => _('delete')), _('Delete'));
+ $this->out->elementEnd('dd');
+ $this->out->elementEnd('dl');
}
}
diff --git a/lib/personalgroupnav.php b/lib/personalgroupnav.php
index 5d727a505..63e6138df 100644
--- a/lib/personalgroupnav.php
+++ b/lib/personalgroupnav.php
@@ -91,28 +91,28 @@ class PersonalGroupNav extends Widget
$user_profile = false;
}
- $this->out->elementStart('ul', array('id' => 'nav_views'));
+ $this->out->elementStart('ul', array('class' => 'nav'));
$this->out->menuItem(common_local_url('all', array('nickname' =>
$nickname)),
_('Personal'),
sprintf(_('%s and friends'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
- $action == 'all');
+ $action == 'all', 'nav_timeline_personal');
$this->out->menuItem(common_local_url('replies', array('nickname' =>
$nickname)),
_('Replies'),
sprintf(_('Replies to %s'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)),
- $action == 'replies');
+ $action == 'replies', 'nav_timeline_replies');
$this->out->menuItem(common_local_url('showstream', array('nickname' =>
$nickname)),
_('Profile'),
($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname,
- $action == 'showstream');
+ $action == 'showstream', 'nav_profile');
$this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
$nickname)),
_('Favorites'),
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')),
- $action == 'showfavorites');
+ $action == 'showfavorites', 'nav_timeline_favorites');
$cur = common_current_user();
diff --git a/lib/settingsgroupnav.php b/lib/settingsgroupnav.php
index 044c74552..bd66c65a6 100644
--- a/lib/settingsgroupnav.php
+++ b/lib/settingsgroupnav.php
@@ -94,7 +94,7 @@ class SettingsGroupNav extends Widget
_('Other options')));
$action_name = $this->action->trimmed('action');
- $this->action->elementStart('ul', array('id' => 'nav_views'));
+ $this->action->elementStart('ul', array('class' => 'nav'));
foreach ($menu as $menuaction => $menudesc) {
if ($menuaction == 'imsettings' &&
@@ -104,7 +104,7 @@ class SettingsGroupNav extends Widget
$this->action->menuItem(common_local_url($menuaction),
$menudesc[0],
$menudesc[1],
- $action_name == $menuaction);
+ $action_name === $menuaction);
}
$this->action->elementEnd('ul');