Merge branch 'uiredesign' of /var/www/trunk into uiredesign

This commit is contained in:
Evan Prodromou 2009-01-17 20:10:56 +00:00
commit e019a55a83
15 changed files with 302 additions and 180 deletions

View File

@ -85,45 +85,46 @@ class EmailsettingsAction extends SettingsAction
$user = common_current_user(); $user = common_current_user();
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'emailsettings', 'id' => 'form_settings_email',
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('emailsettings'))); common_local_url('emailsettings')));
$this->elementStart('fieldset', array('id' => 'settings_email_address'));
$this->element('legend', null, _('Address'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('h2', null, _('Address'));
if ($user->email) { if ($user->email) {
$this->elementStart('p'); $this->element('p', array('id' => 'email_confirmed', $user->email));
$this->element('span', 'address confirmed', $user->email); $this->element('p', array('class' => 'form_note'), _('Current confirmed email address.'));
$this->element('span', 'input_instructions',
_('Current confirmed email address.'));
$this->hidden('email', $user->email); $this->hidden('email', $user->email);
$this->elementEnd('p');
$this->submit('remove', _('Remove')); $this->submit('remove', _('Remove'));
} else { } else {
$confirm = $this->getConfirmation(); $confirm = $this->getConfirmation();
if ($confirm) { if ($confirm) {
$this->elementStart('p'); $this->element('p', array('id' => 'email_unconfirmed'), $confirm->address);
$this->element('span', 'address unconfirmed', $confirm->address); $this->element('p', array('class' => 'form_note'),
$this->element('span', 'input_instructions', _('Awaiting confirmation on this address. '.
_('Awaiting confirmation on this address. '. 'Check your inbox (and spam box!) for a message '.
'Check your inbox (and spam box!) for a message '. 'with further instructions.'));
'with further instructions.'));
$this->hidden('email', $confirm->address); $this->hidden('email', $confirm->address);
$this->elementEnd('p');
$this->submit('cancel', _('Cancel')); $this->submit('cancel', _('Cancel'));
} else { } else {
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('email', _('Email Address'), $this->input('email', _('Email Address'),
($this->arg('email')) ? $this->arg('email') : null, ($this->arg('email')) ? $this->arg('email') : null,
_('Email address, like "UserName@example.org"')); _('Email address, like "UserName@example.org"'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('add', _('Add')); $this->submit('add', _('Add'));
} }
} }
$this->elementEnd('fieldset');
if ($user->email) { if ($user->email) {
$this->element('h2', null, _('Incoming email')); $this->elementStart('fieldset', array('id' => 'settings_email_incoming'));
$this->element('legend',_('Incoming email'));
if ($user->incomingemail) { if ($user->incomingemail) {
$this->elementStart('p'); $this->elementStart('p');
$this->element('span', 'address', $user->incomingemail); $this->element('span', 'address', $user->incomingemail);
@ -139,32 +140,48 @@ class EmailsettingsAction extends SettingsAction
'cancels the old one.')); 'cancels the old one.'));
$this->elementEnd('p'); $this->elementEnd('p');
$this->submit('newincoming', _('New')); $this->submit('newincoming', _('New'));
$this->elementEnd('fieldset');
} }
$this->element('h2', null, _('Preferences'));
$this->elementStart('fieldset', array('id' => 'settings_email_preferences'));
$this->element('legend', null, _('Preferences'));
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->checkbox('emailnotifysub', $this->checkbox('emailnotifysub',
_('Send me notices of new subscriptions through email.'), _('Send me notices of new subscriptions through email.'),
$user->emailnotifysub); $user->emailnotifysub);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifyfav', $this->checkbox('emailnotifyfav',
_('Send me email when someone '. _('Send me email when someone '.
'adds my notice as a favorite.'), 'adds my notice as a favorite.'),
$user->emailnotifyfav); $user->emailnotifyfav);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifymsg', $this->checkbox('emailnotifymsg',
_('Send me email when someone sends me a private message.'), _('Send me email when someone sends me a private message.'),
$user->emailnotifymsg); $user->emailnotifymsg);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailnotifynudge', $this->checkbox('emailnotifynudge',
_('Allow friends to nudge me and send me an email.'), _('Allow friends to nudge me and send me an email.'),
$user->emailnotifynudge); $user->emailnotifynudge);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailpost', $this->checkbox('emailpost',
_('I want to post notices by email.'), _('I want to post notices by email.'),
$user->emailpost); $user->emailpost);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('emailmicroid', $this->checkbox('emailmicroid',
_('Publish a MicroID for my email address.'), _('Publish a MicroID for my email address.'),
$user->emailmicroid); $user->emailmicroid);
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('save', _('Save')); $this->submit('save', _('Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
} }

View File

@ -130,15 +130,27 @@ class LoginAction extends Action
function showContent() function showContent()
{ {
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'login', 'id' => 'form_login',
'class' => 'form_login',
'action' => common_local_url('login'))); 'action' => common_local_url('login')));
$this->elementStart('fieldset');
$this->element('legend', null, _('Login to site'));
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->input('nickname', _('Nickname')); $this->input('nickname', _('Nickname'));
$this->elementEnd('li');
$this->elementStart('li');
$this->password('password', _('Password')); $this->password('password', _('Password'));
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('rememberme', _('Remember me'), false, $this->checkbox('rememberme', _('Remember me'), false,
_('Automatically login in the future; ' . _('Automatically login in the future; ' .
'not for shared computers!')); 'not for shared computers!'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', _('Login')); $this->submit('submit', _('Login'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
$this->elementStart('p'); $this->elementStart('p');
$this->element('a', array('href' => common_local_url('recoverpassword')), $this->element('a', array('href' => common_local_url('recoverpassword')),

View File

@ -85,26 +85,31 @@ class OpenidsettingsAction extends SettingsAction
$user = common_current_user(); $user = common_current_user();
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'openidadd', 'id' => 'form_settings_openid_add',
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('openidsettings'))); common_local_url('openidsettings')));
$this->elementStart('fieldset', array('id' => 'settings_openid_add'));
$this->element('legend', null, _('Add OpenID'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('h2', null, _('Add OpenID')); $this->element('p', 'form_guide',
$this->element('p', null,
_('If you want to add an OpenID to your account, ' . _('If you want to add an OpenID to your account, ' .
'enter it in the box below and click "Add".')); 'enter it in the box below and click "Add".'));
$this->elementStart('p'); $this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->element('label', array('for' => 'openid_url'), $this->element('label', array('for' => 'openid_url'),
_('OpenID URL')); _('OpenID URL'));
$this->element('input', array('name' => 'openid_url', $this->element('input', array('name' => 'openid_url',
'type' => 'text', 'type' => 'text',
'id' => 'openid_url')); 'id' => 'openid_url'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->element('input', array('type' => 'submit', $this->element('input', array('type' => 'submit',
'id' => 'add', 'id' => 'settings_openid_add_action-submit',
'name' => 'add', 'name' => 'add',
'class' => 'submit', 'class' => 'submit',
'value' => _('Add'))); 'value' => _('Add')));
$this->elementEnd('p'); $this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
$oid = new User_openid(); $oid = new User_openid();
@ -134,7 +139,7 @@ class OpenidsettingsAction extends SettingsAction
} else { } else {
$this->element('p', null, $this->element('p', 'form_guide',
_('You can remove an OpenID from your account '. _('You can remove an OpenID from your account '.
'by clicking the button marked "Remove".')); 'by clicking the button marked "Remove".'));
$idx = 0; $idx = 0;
@ -142,10 +147,11 @@ class OpenidsettingsAction extends SettingsAction
while ($oid->fetch()) { while ($oid->fetch()) {
$this->elementStart('form', $this->elementStart('form',
array('method' => 'POST', array('method' => 'POST',
'id' => 'openiddelete' . $idx, 'id' => 'form_settings_openid_delete' . $idx,
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('openidsettings'))); common_local_url('openidsettings')));
$this->elementStart('p'); $this->elementStart('fieldset');
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('a', array('href' => $oid->canonical), $this->element('a', array('href' => $oid->canonical),
$oid->display); $oid->display);
@ -158,7 +164,7 @@ class OpenidsettingsAction extends SettingsAction
'name' => 'remove', 'name' => 'remove',
'class' => 'submit', 'class' => 'submit',
'value' => _('Remove'))); 'value' => _('Remove')));
$this->elementEnd('p'); $this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
$idx++; $idx++;
} }

View File

@ -83,12 +83,14 @@ class SmssettingsAction extends SettingsAction
$user = common_current_user(); $user = common_current_user();
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'smssettings', 'id' => 'form_settings_sms',
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('smssettings'))); common_local_url('smssettings')));
$this->elementStart('fieldset', array('id' => 'settings_sms_address'));
$this->element('legend', null, _('Address'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->element('h2', null, _('Address'));
if ($user->sms) { if ($user->sms) {
$this->elementStart('p'); $this->elementStart('p');
@ -126,6 +128,7 @@ class SmssettingsAction extends SettingsAction
$this->submit('add', _('Add')); $this->submit('add', _('Add'));
} }
} }
$this->elementEnd('fieldset');
if ($user->sms) { if ($user->sms) {
$this->element('h2', null, _('Incoming email')); $this->element('h2', null, _('Incoming email'));
@ -139,24 +142,29 @@ class SmssettingsAction extends SettingsAction
$this->submit('removeincoming', _('Remove')); $this->submit('removeincoming', _('Remove'));
} }
$this->elementStart('p'); $this->element('p', 'form_guide',
$this->element('span', 'input_instructions',
_('Make a new email address for posting to; '. _('Make a new email address for posting to; '.
'cancels the old one.')); 'cancels the old one.'));
$this->elementEnd('p');
$this->submit('newincoming', _('New')); $this->submit('newincoming', _('New'));
} }
$this->element('h2', null, _('Preferences')); $this->elementStart('fieldset', array('id' => 'settings_sms_preferences'));
$this->element('legend', null, _('Preferences'));
$this->elementStart('ul', 'form_datas');
$this->elementStart('li');
$this->checkbox('smsnotify', $this->checkbox('smsnotify',
_('Send me notices through SMS; '. _('Send me notices through SMS; '.
'I understand I may incur '. 'I understand I may incur '.
'exorbitant charges from my carrier.'), 'exorbitant charges from my carrier.'),
$user->smsnotify); $user->smsnotify);
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('save', _('Save')); $this->submit('save', _('Save'));
$this->elementEnd('fieldset');
$this->elementEnd('form'); $this->elementEnd('form');
} }
@ -436,8 +444,9 @@ class SmssettingsAction extends SettingsAction
$cnt = $carrier->find(); $cnt = $carrier->find();
$this->elementStart('p'); $this->elementStart('ul');
$this->element('label', array('for' => 'carrier')); $this->elementStart('li');
$this->element('label', array('for' => 'carrier'), _('Mobile carrier'));
$this->elementStart('select', array('name' => 'carrier', $this->elementStart('select', array('name' => 'carrier',
'id' => 'carrier')); 'id' => 'carrier'));
$this->element('option', array('value' => 0), $this->element('option', array('value' => 0),
@ -447,13 +456,14 @@ class SmssettingsAction extends SettingsAction
$carrier->name); $carrier->name);
} }
$this->elementEnd('select'); $this->elementEnd('select');
$this->elementEnd('p'); $this->element('p', 'form_guide',
$this->element('span', 'input_instructions',
sprintf(_('Mobile carrier for your phone. '. sprintf(_('Mobile carrier for your phone. '.
'If you know a carrier that accepts ' . 'If you know a carrier that accepts ' .
'SMS over email but isn\'t listed here, ' . 'SMS over email but isn\'t listed here, ' .
'send email to let us know at %s.'), 'send email to let us know at %s.'),
common_config('site', 'email'))); common_config('site', 'email')));
$this->elementEnd('li');
$this->elementEnd('ul');
} }
/** /**

View File

@ -97,58 +97,71 @@ class TwittersettingsAction extends SettingsAction
} }
$this->elementStart('form', array('method' => 'post', $this->elementStart('form', array('method' => 'post',
'id' => 'twittersettings', 'id' => 'form_settings_twitter',
'class' => 'form_settings',
'action' => 'action' =>
common_local_url('twittersettings'))); common_local_url('twittersettings')));
$this->elementStart('fieldset', array('id' => 'settings_twitter_account'));
$this->element('legend', null, _('Twitter Account'));
$this->hidden('token', common_session_token()); $this->hidden('token', common_session_token());
$this->elementStart('ul', 'form_datas');
$this->element('h2', null, _('Twitter Account'));
if ($fuser) { if ($fuser) {
$this->elementStart('p'); $this->elementStart('li');
$this->element('span', 'twitter_user', $fuser->nickname); $this->element('span', 'twitter_user', $fuser->nickname);
$this->element('a', array('href' => $fuser->uri), $fuser->uri); $this->element('a', array('href' => $fuser->uri), $fuser->uri);
$this->element('span', 'input_instructions', $this->element('p', 'form_guide',
_('Current verified Twitter account.')); _('Current verified Twitter account.'));
$this->hidden('flink_foreign_id', $flink->foreign_id); $this->hidden('flink_foreign_id', $flink->foreign_id);
$this->elementEnd('p');
$this->submit('remove', _('Remove')); $this->submit('remove', _('Remove'));
$this->elementEnd('li');
} else { } else {
$this->elementStart('li');
$this->input('twitter_username', _('Twitter user name'), $this->input('twitter_username', _('Twitter user name'),
($this->arg('twitter_username')) ? ($this->arg('twitter_username')) ?
$this->arg('twitter_username') : $this->arg('twitter_username') :
$profile->nickname, $profile->nickname,
_('No spaces, please.')); // hey, it's what Twitter says _('No spaces, please.')); // hey, it's what Twitter says
$this->elementEnd('li');
$this->elementStart('li');
$this->password('twitter_password', _('Twitter password')); $this->password('twitter_password', _('Twitter password'));
$this->elementend('li');
} }
$this->elementEnd('ul');
$this->elementEnd('fieldset');
$this->element('h2', null, _('Preferences')); $this->elementStart('fieldset', array('id' => 'settings_twitter_preferences'));
$this->element('legend', null, _('Preferences'));
$this->elementStart('ul');
$this->elementStart('li');
$this->checkbox('noticesync', $this->checkbox('noticesync',
_('Automatically send my notices to Twitter.'), _('Automatically send my notices to Twitter.'),
($flink) ? ($flink) ?
($flink->noticesync & FOREIGN_NOTICE_SEND) : ($flink->noticesync & FOREIGN_NOTICE_SEND) :
true); true);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('replysync', $this->checkbox('replysync',
_('Send local "@" replies to Twitter.'), _('Send local "@" replies to Twitter.'),
($flink) ? ($flink) ?
($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) : ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) :
true); true);
$this->elementEnd('li');
$this->elementStart('li');
$this->checkbox('friendsync', $this->checkbox('friendsync',
_('Subscribe to my Twitter friends here.'), _('Subscribe to my Twitter friends here.'),
($flink) ? ($flink) ?
($flink->friendsync & FOREIGN_FRIEND_RECV) : ($flink->friendsync & FOREIGN_FRIEND_RECV) :
false); false);
$this->elementEnd('li');
$this->elementEnd('ul');
if ($flink) { if ($flink) {
$this->submit('save', _('Save')); $this->submit('save', _('Save'));
} else { } else {
$this->submit('add', _('Add')); $this->submit('add', _('Add'));
} }
$this->elementEnd('fieldset');
$this->showTwitterSubscriptions(); $this->showTwitterSubscriptions();
@ -481,4 +494,4 @@ class TwittersettingsAction extends SettingsAction
return false; return false;
} }
} }

View File

@ -179,7 +179,7 @@ function doreply(nick,id) {
replyto = "@" + nick + " "; replyto = "@" + nick + " ";
if ($("#notice_data-text").length) { if ($("#notice_data-text").length) {
$("#notice_data-text").val(replyto); $("#notice_data-text").val(replyto);
$("form#form_notice input#inreplyto").val(id); $("#form_notice input#notice_in-reply-to").val(id);
$("#notice_data-text").focus(); $("#notice_data-text").focus();
return false; return false;
} }

47
js/xbImportNode.js Normal file
View File

@ -0,0 +1,47 @@
/* is this stuff defined? */
if (!document.ELEMENT_NODE) {
document.ELEMENT_NODE = 1;
document.ATTRIBUTE_NODE = 2;
document.TEXT_NODE = 3;
document.CDATA_SECTION_NODE = 4;
document.ENTITY_REFERENCE_NODE = 5;
document.ENTITY_NODE = 6;
document.PROCESSING_INSTRUCTION_NODE = 7;
document.COMMENT_NODE = 8;
document.DOCUMENT_NODE = 9;
document.DOCUMENT_TYPE_NODE = 10;
document.DOCUMENT_FRAGMENT_NODE = 11;
document.NOTATION_NODE = 12;
}
document._importNode = function(node, allChildren) {
/* find the node type to import */
switch (node.nodeType) {
case document.ELEMENT_NODE:
/* create a new element */
var newNode = document.createElement(node.nodeName);
/* does the node have any attributes to add? */
if (node.attributes && node.attributes.length > 0)
/* add all of the attributes */
for (var i = 0, il = node.attributes.length; i < il;) {
if (node.attributes[i].nodeName == 'class') {
newNode.className = node.getAttribute(node.attributes[i++].nodeName);
} else {
newNode.setAttribute(node.attributes[i].nodeName, node.getAttribute(node.attributes[i++].nodeName));
}
}
/* are we going after children too, and does the node have any? */
if (allChildren && node.childNodes && node.childNodes.length > 0)
/* recursively get all of the child nodes */
for (var i = 0, il = node.childNodes.length; i < il;)
newNode.appendChild(document._importNode(node.childNodes[i++], allChildren));
return newNode;
break;
case document.TEXT_NODE:
case document.CDATA_SECTION_NODE:
case document.COMMENT_NODE:
return document.createTextNode(node.nodeValue);
break;
}
};

View File

@ -566,7 +566,9 @@ class Action extends HTMLOutputter // lawsuit
$lattrs['class'] = 'current'; $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; $attrs['href'] = $url;
if ($title) { if ($title) {
$attrs['title'] = $title; $attrs['title'] = $title;

View File

@ -155,20 +155,17 @@ class HTMLOutputter extends XMLOutputter
function input($id, $label, $value=null, $instructions=null) function input($id, $label, $value=null, $instructions=null)
{ {
$this->elementStart('p');
$this->element('label', array('for' => $id), $label); $this->element('label', array('for' => $id), $label);
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'text', 'type' => 'text',
'class' => 'input_text',
'id' => $id); 'id' => $id);
if ($value) { if ($value) {
$attrs['value'] = htmlspecialchars($value); $attrs['value'] = htmlspecialchars($value);
} }
$this->element('input', $attrs); $this->element('input', $attrs);
if ($instructions) { 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, function checkbox($id, $label, $checked=false, $instructions=null,
$value='true', $disabled=false) $value='true', $disabled=false)
{ {
$this->elementStart('p');
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'checkbox', 'type' => 'checkbox',
'class' => 'checkbox', 'class' => 'checkbox',
@ -208,14 +204,13 @@ class HTMLOutputter extends XMLOutputter
} }
$this->element('input', $attrs); $this->element('input', $attrs);
$this->text(' '); $this->text(' ');
$this->element('label', array('class' => 'checkbox_label', $this->element('label', array('class' => 'checkbox',
'for' => $id), 'for' => $id),
$label); $label);
$this->text(' '); $this->text(' ');
if ($instructions) { 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, function dropdown($id, $label, $content, $instructions=null,
$blank_select=false, $selected=null) $blank_select=false, $selected=null)
{ {
$this->elementStart('p');
$this->element('label', array('for' => $id), $label); $this->element('label', array('for' => $id), $label);
$this->elementStart('select', array('id' => $id, 'name' => $id)); $this->elementStart('select', array('id' => $id, 'name' => $id));
if ($blank_select) { if ($blank_select) {
@ -257,9 +251,8 @@ class HTMLOutputter extends XMLOutputter
} }
$this->elementEnd('select'); $this->elementEnd('select');
if ($instructions) { 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) function password($id, $label, $instructions=null)
{ {
$this->elementStart('p');
$this->element('label', array('for' => $id), $label); $this->element('label', array('for' => $id), $label);
$attrs = array('name' => $id, $attrs = array('name' => $id,
'type' => 'password', 'type' => 'password',
@ -304,9 +296,8 @@ class HTMLOutputter extends XMLOutputter
'id' => $id); 'id' => $id);
$this->element('input', $attrs); $this->element('input', $attrs);
if ($instructions) { 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) function textarea($id, $label, $content=null, $instructions=null)
{ {
$this->elementStart('p');
$this->element('label', array('for' => $id), $label); $this->element('label', array('for' => $id), $label);
$this->element('textarea', array('rows' => 3, $this->element('textarea', array('rows' => 3,
'cols' => 40, 'cols' => 40,
@ -356,8 +346,7 @@ class HTMLOutputter extends XMLOutputter
'id' => $id), 'id' => $id),
($content) ? $content : ''); ($content) ? $content : '');
if ($instructions) { if ($instructions) {
$this->element('span', 'input_instructions', $instructions); $this->element('p', 'form_guide', $instructions);
} }
$this->elementEnd('p');
} }
} }

View File

@ -144,8 +144,8 @@ class NoticeForm extends Form
if ($this->action) { if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto'); $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');
} }
/** /**

View File

@ -438,7 +438,7 @@ class NoticeListItem extends Widget
$reply_url = common_local_url('newnotice', $reply_url = common_local_url('newnotice',
array('replyto' => $this->profile->nickname)); 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->element('dt', null, _('Reply to this notice'));
$this->out->elementStart('dd'); $this->out->elementStart('dd');
$this->out->element('a', array('href' => $reply_url, $this->out->element('a', array('href' => $reply_url,
@ -459,11 +459,13 @@ class NoticeListItem extends Widget
if ($user && $this->notice->profile_id == $user->id) { if ($user && $this->notice->profile_id == $user->id) {
$deleteurl = common_local_url('deletenotice', $deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id)); array('notice' => $this->notice->id));
$this->out->elementStart('a', array('class' => 'deletenotice', $this->out->elementStart('dl', 'notice_delete');
'href' => $deleteurl, $this->out->element('dt', null, _('Delete this notice'));
'title' => _('delete'))); $this->out->elementStart('dd');
$this->out->raw(' &#215;'); $this->out->element('a', array('href' => $deleteurl,
$this->out->elementEnd('a'); 'title' => _('delete')), _('Delete'));
$this->out->elementEnd('dd');
$this->out->elementEnd('dl');
} }
} }

View File

@ -91,28 +91,28 @@ class PersonalGroupNav extends Widget
$user_profile = false; $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' => $this->out->menuItem(common_local_url('all', array('nickname' =>
$nickname)), $nickname)),
_('Personal'), _('Personal'),
sprintf(_('%s and friends'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), 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' => $this->out->menuItem(common_local_url('replies', array('nickname' =>
$nickname)), $nickname)),
_('Replies'), _('Replies'),
sprintf(_('Replies to %s'), (($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname)), 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' => $this->out->menuItem(common_local_url('showstream', array('nickname' =>
$nickname)), $nickname)),
_('Profile'), _('Profile'),
($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname, ($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname,
$action == 'showstream'); $action == 'showstream', 'nav_profile');
$this->out->menuItem(common_local_url('showfavorites', array('nickname' => $this->out->menuItem(common_local_url('showfavorites', array('nickname' =>
$nickname)), $nickname)),
_('Favorites'), _('Favorites'),
sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')), sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')),
$action == 'showfavorites'); $action == 'showfavorites', 'nav_timeline_favorites');
$cur = common_current_user(); $cur = common_current_user();

View File

@ -94,7 +94,7 @@ class SettingsGroupNav extends Widget
_('Other options'))); _('Other options')));
$action_name = $this->action->trimmed('action'); $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) { foreach ($menu as $menuaction => $menudesc) {
if ($menuaction == 'imsettings' && if ($menuaction == 'imsettings' &&
@ -104,7 +104,7 @@ class SettingsGroupNav extends Widget
$this->action->menuItem(common_local_url($menuaction), $this->action->menuItem(common_local_url($menuaction),
$menudesc[0], $menudesc[0],
$menudesc[1], $menudesc[1],
$action_name == $menuaction); $action_name === $menuaction);
} }
$this->action->elementEnd('ul'); $this->action->elementEnd('ul');

View File

@ -30,30 +30,38 @@ h1,h2,h3,h4,h5,h6 {
text-transform:uppercase; text-transform:uppercase;
margin-bottom:7px; margin-bottom:7px;
} }
legend { font-weight:bold; } caption {
font-weight:bold;
}
.opened { display: block !important;}
.closed { display: none !important;}
legend {
font-weight:bold;
font-size:1.6em;
text-transform:uppercase;
}
form {
}
input, textarea, select, option { input, textarea, select, option {
padding:4px; padding:4px;
font-family:sans-serif; font-family:sans-serif;
font-size:1em; font-size:1em;
-moz-border-radius:4px; -moz-border-radius:4px;
} }
input:focus, textarea:focus, select:focus {
border-width:2px;
border-style: solid;
}
select, option { select, option {
padding-bottom:0; padding-bottom:0;
} }
fieldset { fieldset {
padding:11px; padding:0;
border:0;
} }
input:focus, textarea:focus, select:focus {
border-width:2px;
border-style: solid;
-moz-border-radius:4px;
}
caption {
font-weight:bold;
}
.opened { display: block !important;}
.closed { display: none !important;}
span.required { font-weight:bold; }
form ul li { form ul li {
list-style-type:none; list-style-type:none;
margin:0 0 18px 0; margin:0 0 18px 0;
@ -64,8 +72,17 @@ font-weight:bold;
} }
form ul li input { form ul li input {
} }
form .error {
margin-right:11px; form input.checkbox {
position:relative;
top:2px;
left:0;
}
#page_notice .error {
background-color:#F7E8E8;
padding:4px 7px;
-moz-border-radius:4px;
} }
form label.submit { form label.submit {
display:none; display:none;
@ -76,15 +93,7 @@ display:block;
.form_response { .form_response {
margin-bottom:18px; margin-bottom:18px;
} }
.form_response dt {
}
.form_response dd {
}
form input.remove,
form input.submit {
-moz-border-radius:4px;
}
form input.submit { form input.submit {
} }
@ -93,21 +102,19 @@ form input.submit {
/* FORM SETTINGS */ /* FORM SETTINGS */
.form_settings fieldset { .form_settings fieldset {
padding:0; margin-bottom:29px;
border:0;
}
.form_settings legend {
display:none;
}
.form_settings .form_datas label {
display:block;
} }
.form_guide { .form_guide {
font-style:italic; font-style:italic;
} }
.form_settings .form_actions label { .form_login label,
.form_settings label {
margin-right:11px;
}
.form_actions label {
display:none; display:none;
} }
@ -116,7 +123,17 @@ display:inline;
font-weight:bold; font-weight:bold;
} }
.form_settings p {
margin-bottom:18px;
}
#settings_email_address {
margin-bottom:29px;
}
.form_settings label.checkbox {
font-weight:normal;
}
/* FORM SETTINGS */ /* FORM SETTINGS */
@ -200,8 +217,9 @@ padding:4px 11px;
-moz-border-radius-topleft:4px; -moz-border-radius-topleft:4px;
-moz-border-radius-topright:4px; -moz-border-radius-topright:4px;
border-width:1px; border-width:1px;
border-style:dashed; border-style:solid;
border-bottom:0; border-bottom:0;
font-weight:bold;
} }
#site_nav_local_views .nav { #site_nav_local_views .nav {
float:left; float:left;
@ -698,12 +716,15 @@ clear:left;
float:left; float:left;
width:48%; width:48%;
} }
.notice div.entry-content, .notice div.entry-content a,
.notice .notice-options a, .notice .notice-options a,
.notice .notice-options input { .notice .notice-options input {
font-size:0.9em;
}
}
.notice .notice-options a,
.notice .notice-options input {
float:left;
}
#laconicat .notice div.entry-content { #laconicat .notice div.entry-content {
/*margin-left:0;*/ /*margin-left:0;*/
@ -718,17 +739,16 @@ display:inline;
.notice div.entry-content .response dt { .notice div.entry-content .response dt {
display:none; display:none;
} }
.notice div.entry-content .timestamp { .notice div.entry-content .timestamp a {
} }
.notice div.entry-content .device dt { .notice div.entry-content .device dt {
text-transform:lowercase; text-transform:lowercase;
} }
.notice div.entry-content a { .notice div.entry-content a {
text-decoration:none;
} }
.notice div.entry-content a:hover { .notice div.entry-content a:hover {
text-decoration:underline;
} }
@ -749,40 +769,42 @@ display:block;
outline:none; outline:none;
} }
.notice-options { .notice-options {
margin-left:2%; padding-left:2%;
float:left; float:left;
width:50%;
} }
.notice-options .reply, .notice-options .notice_reply,
.notice-options .notice_delete ,
.notice-options .notice_favorite { .notice-options .notice_favorite {
float:left; float:left;
margin-right:11px; margin-right:11px;
} }
.notice-options .reply { .notice-options .notice_reply {
margin-top:1px;
} }
.notice-options .reply dt { .notice-options .notice_reply dt {
display:none; display:none;
} }
.notice-options .reply a, .notice-options .notice_reply a,
.notice-options form input.submit { .notice-options form input.submit {
display:block; display:block;
border:0; border:0;
} }
.notice-options .notice_reply a,
.notice-options .reply a { .notice-options .notice_delete a {
text-decoration:none; text-decoration:none;
padding-left:20px; padding-left:20px;
} }
.notice-options form input.submit {
cursor:pointer; .notice-options .notice_delete {
padding:0 0 0 17px; float:right;
} }
.notice-options .notice_delete legend, .notice-options form input.submit {
cursor:pointer;
padding:2px 0 2px 17px;
}
.notice-options .notice_delete dt,
.notice-options .notice_favorite legend { .notice-options .notice_favorite legend {
display:none; display:none;
} }
@ -792,10 +814,6 @@ border:0;
padding:0; padding:0;
} }
.notice-options form.notice_delete {
margin-left:2em;
}
/*END: NOTICES */ /*END: NOTICES */
@ -830,12 +848,12 @@ border-bottom:0;
} }
.pagination .nav_prev a { .pagination .nav_prev a {
-moz-border-radius-topright:4px; -moz-border-radius-topright:7px;
padding-left:20px; padding-left:20px;
border-left:0; border-left:0;
} }
.pagination .nav_next a { .pagination .nav_next a {
-moz-border-radius-topleft:4px; -moz-border-radius-topleft:7px;
padding-right:20px; padding-right:20px;
border-right:0; border-right:0;
} }

View File

@ -1,31 +1,31 @@
/* theme: identica */ /* theme: identica */
html { html {
background-color:#ddd; background-color:#ddd;
} }
body { body {
font-family: sans-serif; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-size:1em;
font-size:1em;
} }
input, textarea, select, option { input, textarea, select, option {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
} }
input:focus, textarea:focus, select:focus { input:focus, textarea:focus, select:focus {
border-color:#B2D0DD; border-color:#B2D0DD;
} }
form span.required { color:#f00; }
form .error {
background-color:#f00;
color:#fff;
}
form .error_message {
color:#EC008C;
}
a { a {
color:#002E6E; color:#002E6E;
} }
a:active {
background-color:#ddd;
}
.notice p.entry-content a:visited {
background-color:#fcfcfc;
-moz-border-radius:4px;
}
.notice p.entry-content .vcard a {
background-color:#fcfffc;
-moz-border-radius:4px;
}
@ -59,15 +59,12 @@ background-color:transparent;
#site_nav_local_views a { #site_nav_local_views a {
border-color:#fff; border-color:#fff;
background-color:rgba(255, 255, 255, 0.2);
}
#site_nav_local_views a:hover {
background-color:rgba(255, 255, 255, 0.7);:
} }
/*
#site_nav_global_primary .current a {
font-weight:bold;
border-color:#ccc;
border-style:solid;
}
*/
#content, #content,
#site_nav_local_views .current a { #site_nav_local_views .current a {
@ -139,7 +136,7 @@ color:#555;
/* NOTICES */ /* NOTICES */
.notice div.entry-content a { .notice div.entry-content a {
color:#333;
} }
.notice div.entry-content a:hover { .notice div.entry-content a:hover {
} }
@ -169,30 +166,39 @@ background-image:url(../images/icons/twotone/green/flag.gif);
background-image:url(../images/icons/twotone/green/document.gif); background-image:url(../images/icons/twotone/green/document.gif);
} }
.notice-options .reply a, .notice-options .notice_reply a,
.notice-options form input.submit { .notice-options form input.submit {
background-color:transparent; background-color:transparent;
} }
.notice-options .reply a { .notice-options .notice_reply a {
background:transparent url(../images/icons/twotone/green/reply.gif) no-repeat 0 45%; background:transparent url(../images/icons/twotone/green/reply.gif) no-repeat 0 45%;
} }
.notice-options form.notice_favorite input.submit { .notice-options form.notice_favorite input.submit {
background:transparent url(../images/icons/twotone/green/favourite.gif) no-repeat 0 45%; background:transparent url(../images/icons/twotone/green/favourite.gif) no-repeat 0 45%;
} }
.notice-options form.notice_delete input.submit { .notice-options .notice_delete a {
background:transparent url(../images/icons/twotone/green/trash.gif) no-repeat 0 45%; background:transparent url(../images/icons/twotone/green/trash.gif) no-repeat 0 45%;
} }
.notice-options a, div.entry-content,
.notice-options input { div.notice-options {
opacity:0.1; opacity:0.2;
color:#333; font-family:sans-serif;
}
div.entry-content a,
div.notice-options a,
div.notice-options input {
font-family:sans-serif;
}
div.notice-options input {
color:#002E6E;
} }
.notices li.hover { .notices li.hover {
background-color:#fcfcfc; background-color:#fcfcfc;
} }
.notices li.hover .notice-options a, .notices li.hover div.entry-content,
.notices li.hover .notice-options input { .notices li.hover div.notice-options {
opacity:1; opacity:1;
} }