Merge branch '1.0.x' into testing

Conflicts:
	plugins/EmailRegistration/scripts/cancelemailregistration.php
This commit is contained in:
Evan Prodromou 2011-05-23 18:20:18 -04:00
commit b34e267e53
28 changed files with 596 additions and 288 deletions

View File

@ -60,7 +60,6 @@ class InviteAction extends CurrentUserDesignAction
function sendInvitations()
{
if (Event::handle('StartSendInvitations', array(&$this))) {
// CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
@ -162,7 +161,6 @@ class InviteAction extends CurrentUserDesignAction
function showInvitationSuccess()
{
if (Event::handle('StartShowInvitationSuccess', array($this))) {
if ($this->already) {
// TRANS: Message displayed inviting users to use a StatusNet site while the inviting user
// TRANS: is already subscribed to one or more users with the given e-mail address(es).

View File

@ -14,6 +14,7 @@ class Invitation extends Memcached_DataObject
public $user_id; // int(4) not_null
public $address; // varchar(255) multiple_key not_null
public $address_type; // varchar(8) multiple_key not_null
public $registered_user_id; // int(4) not_null
public $created; // datetime() not_null
/* Static get */
@ -22,4 +23,11 @@ class Invitation extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function convert($user)
{
$orig = clone($this);
$this->registered_user_id = $user->id;
return $this->update($orig);
}
}

View File

@ -263,6 +263,8 @@ class User extends Memcached_DataObject
$user->nickname = $nickname;
$invite = null;
// Users who respond to invite email have proven their ownership of that address
if (!empty($code)) {
@ -353,6 +355,12 @@ class User extends Memcached_DataObject
return false;
}
// Mark that this invite was converted
if (!empty($invite)) {
$invite->convert($user);
}
if (!empty($email) && !$user->email) {
$confirm = new Confirm_address();

View File

@ -258,6 +258,7 @@ user_id = 129
address = 130
address_type = 130
created = 142
registered_user_id = 1
[invitation__keys]
code = K

View File

@ -542,14 +542,17 @@ $schema['invitation'] = array(
'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'invitation sent to'),
'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),
'registered_user_id' => array('type' => 'int', 'not null' => false, 'description' => 'if the invitation is converted, who the new user is'),
),
'primary key' => array('code'),
'foreign keys' => array(
'invitation_user_id_fkey' => array('user', array('user_id' => 'id')),
'invitation_registered_user_id_fkey' => array('user', array('registered_user_id' => 'id')),
),
'indexes' => array(
'invitation_address_idx' => array('address', 'address_type'),
'invitation_user_id_idx' => array('user_id'),
'invitation_registered_user_id_idx' => array('registered_user_id'),
),
);

View File

@ -735,7 +735,7 @@ var SN = { // StatusNet
list = notice.find('ul.threaded-replies');
}
var placeholder = $('<li class="notice-reply-placeholder">' +
'<input class="placeholder">' +
'<input class="placeholder" />' +
'</li>');
placeholder.find('input')
.val(SN.msg('reply_placeholder'));

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,7 @@ class AdminPanelNav extends Menu
// Stub section w/ home link
$this->action->elementStart('ul');
$this->action->elementStart('li');
// TRANS: Header in administrator navigation panel.
$this->action->element('h3', null, _m('HEADER','Home'));
$this->action->elementStart('ul', 'nav');
@ -74,9 +75,11 @@ class AdminPanelNav extends Menu
$this->action == 'all', 'nav_timeline_personal');
$this->action->elementEnd('ul');
$this->action->elementEnd('li');
$this->action->elementEnd('ul');
$this->action->elementStart('ul');
$this->action->elementStart('li');
// TRANS: Header in administrator navigation panel.
$this->action->element('h3', null, _m('HEADER','Admin'));
$this->action->elementStart('ul', array('class' => 'nav'));
@ -166,6 +169,7 @@ class AdminPanelNav extends Menu
Event::handle('EndAdminPanelNav', array($this));
}
$this->action->elementEnd('ul');
$this->action->elementEnd('li');
$this->action->elementEnd('ul');
}
}

View File

@ -41,7 +41,6 @@ require_once INSTALLDIR . '/lib/form.php';
* @author Zach Copley <zach@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
*/
class InviteForm extends Form
{
@ -65,16 +64,6 @@ class InviteForm extends Form
return 'form_invite';
}
/**
* class of the form
*
* @return string of the form class
*/
function formClass()
{
return 'form_settings';
}
/**
* Action of the form
*
@ -105,21 +94,21 @@ class InviteForm extends Form
{
$this->out->elementStart('ul', 'form_data');
$this->out->elementStart('li');
// TRANS: Field label for a list of e-mail addresses.
$this->out->textarea(
'addresses',
// TRANS: Field label for a list of e-mail addresses.
_('Email addresses'),
$this->out->trimmed('addresses'),
// TRANS: Tooltip for field label for a list of e-mail addresses.
// TRANS: Field title for a list of e-mail addresses.
_('Addresses of friends to invite (one per line).')
);
$this->out->elementEnd('li');
$this->out->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
$this->out->textarea(
// TRANS: Field label for a personal message to send to invitees.
'personal', _('Personal message'),
$this->out->trimmed('personal'),
// TRANS: Tooltip for field label for a personal message to send to invitees.
// TRANS: Field title for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.')
);
$this->out->elementEnd('li');
@ -133,13 +122,13 @@ class InviteForm extends Form
*/
function formActions()
{
// TRANS: Send button for inviting friends
$this->out->submit(
'send',
// TRANS: Send button for inviting friends
_m('BUTTON','Send'), 'submit form_action-primary',
// TRANS: Submit button title.
'send',
_('Send')
// TRANS: Submit button title.
_('Send invitations.')
);
}
}

View File

@ -245,7 +245,6 @@ class NoticeListItem extends Widget
if (!$first) {
$this->out->text( _m('SEPARATOR',', '));
} else {
$this->out->text(_(' ▸ '));
$first = false;
}
$this->out->element('a', array('href' => $group->homeUrl(),
@ -272,7 +271,6 @@ class NoticeListItem extends Widget
$this->out->text(_m('SEPARATOR',', '));
} else {
// TRANS: Start of profile addressees list.
$this->out->text(_(' ▸ '));
$first = false;
}
$this->out->element('a', array('href' => $reply->profileurl,

View File

@ -61,6 +61,7 @@ class SettingsNav extends Menu
// Stub section w/ home link
$this->action->elementStart('ul');
$this->action->elementStart('li');
// TRANS: Header in settings navigation panel.
$this->action->element('h3', null, _m('HEADER','Home'));
$this->action->elementStart('ul', 'nav');
@ -72,11 +73,12 @@ class SettingsNav extends Menu
// TRANS: %s is a username.
sprintf(_('%s and friends'), $name),
$this->action == 'all', 'nav_timeline_personal');
$this->action->elementEnd('ul');
$this->action->elementEnd('li');
$this->action->elementEnd('ul');
$this->action->elementStart('ul');
$this->action->elementStart('li');
// TRANS: Header in settings navigation panel.
$this->action->element('h3', null, _m('HEADER','Settings'));
$this->action->elementStart('ul', array('class' => 'nav'));
@ -155,6 +157,7 @@ class SettingsNav extends Menu
}
$this->action->elementEnd('ul');
$this->action->elementEnd('li');
$this->action->elementEnd('ul');
}
}

View File

@ -77,6 +77,7 @@ class DomainStatusNetworkPlugin extends Plugin
$sn = Status_network::staticGet('nickname', $nickname);
} catch (Exception $e) {
$this->log(LOG_ERR, $e->getMessage());
return;
}
$tags = $sn->getTags();

View File

@ -118,7 +118,7 @@ class DomainWhitelistPlugin extends Plugin
} else {
// TRANS: Client exception thrown when a given e-mailaddress is not in the domain whitelist.
// TRANS: %s are whitelisted e-mail domains separated by comma's (localisable).
$message = sprintf(_('Email address must be in one of these domains: %s.'),
$message = sprintf(_m('Email address must be in one of these domains: %s.'),
// TRANS: Separator for whitelisted domains.
implode(_m('SEPARATOR',', '), $whitelist));
}
@ -132,7 +132,7 @@ class DomainWhitelistPlugin extends Plugin
{
if (!$this->matchesWhitelist($email)) {
// TRANS: Exception thrown when an e-mail address does not match the site's domain whitelist.
throw new Exception(_('That email address is not allowed on this site.'));
throw new Exception(_m('That email address is not allowed on this site.'));
}
return true;
@ -231,8 +231,9 @@ class DomainWhitelistPlugin extends Plugin
)
);
array_unshift($orderedWhitelist, $userDomain);
if (in_array($userDomain, $whitelist)) {
array_unshift($orderedWhitelist, $userDomain);
}
return $orderedWhitelist;
}
@ -248,11 +249,25 @@ class DomainWhitelistPlugin extends Plugin
*/
function onStartShowInviteForm($action)
{
$this->showConfirmDialog($action);
$form = new WhitelistInviteForm($action, $this->getWhitelist());
$form->show();
return false;
}
function showConfirmDialog($action)
{
// For JQuery UI modal dialog
$action->elementStart(
'div',
// TRANS: Title for invitiation deletion dialog.
array('id' => 'confirm-dialog', 'title' => _m('Confirmation Required'))
);
// TRANS: Confirmation text for invitation deletion dialog.
$action->text(_m('Really delete this invitation?'));
$action->elementEnd('div');
}
/**
* This is a bit of a hack. We take the values from the custom
* whitelist invite form and reformat them so they look like

View File

@ -2,12 +2,16 @@
var SN_WHITELIST = SN_WHITELIST || {};
SN_WHITELIST.updateButtons = function() {
$("ul > li > a.remove_row").show();
$("ul > li > a.add_row").hide();
var lis = $('ul > li > input[name^="username[]"]');
if (lis.length === 1) {
$("ul > li > a.remove_row").hide();
} else {
$("ul > li > a.remove_row:first").show();
}
$("ul > li > a.add_row:last").show();
};
SN_WHITELIST.resetRow = function(row) {
@ -20,21 +24,49 @@ SN_WHITELIST.resetRow = function(row) {
SN_WHITELIST.addRow = function() {
var row = $(this).closest("li");
var newRow = row.clone();
$(row).find('a.add_row').hide();
SN_WHITELIST.resetRow(newRow);
$(newRow).insertAfter(row).show("blind", "slow", function() {
$(newRow).insertAfter(row).show("blind", "fast", function() {
SN_WHITELIST.updateButtons();
});
};
SN_WHITELIST.removeRow = function() {
$(this).closest("li").hide("blind", "slow", function() {
$(this).remove();
SN_WHITELIST.updateButtons();
var that = this;
$("#confirm-dialog").dialog({
buttons : {
"Confirm" : function() {
$(this).dialog("close");
$(that).closest("li").hide("blind", "fast", function() {
$(this).remove();
SN_WHITELIST.updateButtons();
});
},
"Cancel" : function() {
$(this).dialog("close");
}
}
});
if ($(this).closest('li').find(':input[name^=username]').val()) {
$("#confirm-dialog").dialog("open");
} else {
$(that).closest("li").hide("blind", "fast", function() {
$(this).remove();
SN_WHITELIST.updateButtons();
});
}
};
$(document).ready(function() {
$("#confirm-dialog").dialog({
autoOpen: false,
modal: true
});
$('.add_row').live('click', SN_WHITELIST.addRow);
$('.remove_row').live('click', SN_WHITELIST.removeRow);
});
SN_WHITELIST.updateButtons();
});

View File

@ -46,7 +46,7 @@ require_once INSTALLDIR . '/lib/form.php';
class WhitelistInviteForm extends Form
{
private $whitelist = null;
/**
* Constructor
*
@ -86,7 +86,7 @@ class WhitelistInviteForm extends Form
function formLegend()
{
// TRANS: Form legend.
$this->out->element('legend', null, _('Invite collegues'));
$this->out->element('legend', null, _m('Invite collegues'));
}
/**
@ -101,17 +101,17 @@ class WhitelistInviteForm extends Form
$this->showEmailLI();
}
$this->out->elementStart('li');
// TRANS: Field label for a personal message to send to invitees.
$this->out->textarea(
'personal', _('Personal message'),
// TRANS: Field label for a personal message to send to invitees.
'personal', _m('Personal message'),
$this->out->trimmed('personal'),
// TRANS: Tooltip for field label for a personal message to send to invitees.
_('Optionally add a personal message to the invitation.')
// TRANS: Field title for a personal message to send to invitees.
_m('Optionally add a personal message to the invitation.')
);
$this->out->elementEnd('li');
$this->out->elementEnd('ul');
}
function showEmailLI()
{
$this->out->elementStart('li');
@ -119,8 +119,8 @@ class WhitelistInviteForm extends Form
$this->out->text('@');
if (count($this->whitelist) == 1) {
$this->out->element(
'span',
array('class' => 'email_invite'),
'span',
array('class' => 'email_invite'),
$this->whitelist[0]
);
$this->out->hidden('domain[]', $this->whitelist[0]);
@ -134,14 +134,15 @@ class WhitelistInviteForm extends Form
$this->showMultiControls();
$this->out->elementEnd('li');
}
function showMultiControls()
{
$this->out->element(
'a',
array(
'class' => 'remove_row',
'href' => 'javascript://',
'href' => 'javascript://',
'style' => 'display: none;'
),
'-'
);
@ -150,21 +151,14 @@ class WhitelistInviteForm extends Form
'a',
array(
'class' => 'add_row',
'href' => 'javascript://',
'href' => 'javascript://',
'style' => 'display: none;'
),
'+'
// TRANS: Link description to action to add another item to a list.
_m('Add another item')
);
}
function getUsersDomain()
{
$user = common_current_user();
assert(!empty($user));
}
/**
* Action elements
*
@ -172,13 +166,13 @@ class WhitelistInviteForm extends Form
*/
function formActions()
{
// TRANS: Send button for inviting friends
$this->out->submit(
'send',
// TRANS: Send button for inviting friends.
_m('BUTTON','Send'), 'submit form_action-primary',
// TRANS: Submit button title.
'send',
_('Send')
// TRANS: Submit button title.
_m('Send invitations.')
);
}
}

View File

@ -107,7 +107,11 @@ class EmailregisterAction extends Action
$this->invitation = Invitation::staticGet('code', $this->code);
if (empty($this->invitation)) {
if (!empty($this->invitation)) {
if (!empty($this->invitation->registered_user_id)) {
throw new ClientException(_m('Invitation already used.'), 403);
}
} else {
$this->confirmation = Confirm_address::staticGet('code', $this->code);
@ -133,6 +137,9 @@ class EmailregisterAction extends Action
} else {
$this->invitation = Invitation::staticGet('code', $this->code);
if (!empty($this->invitation)) {
if (!empty($this->invitation->registered_user_id)) {
throw new ClientException(_m('Invitation already used.'), 403);
}
$this->state = self::CONFIRMINVITE;
} else {
$this->state = self::CONFIRMREGISTER;
@ -283,10 +290,15 @@ class EmailregisterAction extends Action
$nickname = $this->nicknameFromEmail($email);
try {
$this->user = User::register(array('nickname' => $nickname,
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true));
$fields = array('nickname' => $nickname,
'email' => $email,
'password' => $this->password1,
'email_confirmed' => true);
if (!empty($this->invitation)) {
$fields['code'] = $this->invitation->code;
}
$this->user = User::register($fields);
} catch (ClientException $e) {
$this->error = $e->getMessage();
$nickname = $this->nicknameFromEmail($email);
@ -306,18 +318,8 @@ class EmailregisterAction extends Action
// Re-init language env in case it changed (not yet, but soon)
common_init_language();
if (!empty($this->invitation)) {
$inviter = User::staticGet('id', $this->invitation->user_id);
if (!empty($inviter)) {
Subscription::start($inviter->getProfile(),
$this->user->getProfile());
}
$this->invitation->delete();
} else if (!empty($this->confirmation)) {
if (!empty($this->confirmation)) {
$this->confirmation->delete();
} else {
throw new Exception('No confirmation thing.');
}
Event::handle('EndRegistrationTry', array($this));

View File

@ -27,7 +27,7 @@ $helptext = <<<END_OF_REGISTEREMAILUSER_HELP
cancelemailregistration.php [options] <email address>
Options:
-d --dryrun Don't actually delete the email registration and confirmation code
-d --dryrun Do not actually delete the email registration and confirmation code
Cancel an email registration code

View File

@ -119,7 +119,7 @@
height: 16px;
width: 16px;
overflow: hidden;
background-image: url('../../../theme/rebase/images/icons/icons-01.gif');
background-image: url('../../../theme/base/images/icons/icons-01.gif');
background-repeat: no-repeat;
}

View File

@ -328,7 +328,7 @@ class ExtendedProfileWidget extends Form
if (!empty($field['company'])) {
$this->out->element('div', 'field', $field['company']);
// TRANS: Field label in experience area of extended profile (when did one start a position).
// TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->element(
'div',
@ -336,7 +336,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start'])
)
);
// TRANS: Field label in experience area of extended profile (when did one end a position).
// TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->element(
'div',
@ -376,7 +376,7 @@ class ExtendedProfileWidget extends Form
isset($field['company']) ? $field['company'] : null
);
// TRANS: Field label in experience edit area of extended profile (when did one start at a company).
// TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->input(
$id . '-start',
@ -384,7 +384,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
);
// TRANS: Field label in experience edit area of extended profile (when did one terminate at a company).
// TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->input(
@ -416,13 +416,13 @@ class ExtendedProfileWidget extends Form
$this->out->element('div', 'label', _m('Institution'));
if (!empty($field['school'])) {
$this->out->element('div', 'field', $field['school']);
// TRANS: Field label in education area of extended profile.
// TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree'));
$this->out->element('div', 'field', $field['degree']);
// TRANS: Field label in education area of extended profile.
$this->out->element('div', 'label', _m('Description'));
$this->out->element('div', 'field', $field['description']);
// TRANS: Field label in education area of extended profile (when did one start an education).
// TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->element(
'div',
@ -430,7 +430,7 @@ class ExtendedProfileWidget extends Form
date('j M Y', strtotime($field['start'])
)
);
// TRANS: Field label in education area of extended profile (when did one end a education).
// TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->element(
'div',
@ -460,7 +460,7 @@ class ExtendedProfileWidget extends Form
isset($field['school']) ? $field['school'] : null
);
// TRANS: Field label in education edit area of extended profile.
// TRANS: Field label in extended profile for specifying an academic degree.
$this->out->element('div', 'label', _m('Degree'));
$this->out->input(
$id . '-degree',
@ -477,7 +477,7 @@ class ExtendedProfileWidget extends Form
isset($field['description']) ? $field['description'] : null
);
// TRANS: Field label in education edit area of extended profile (when did one start an education).
// TRANS: Field label in extended profile (when did one start a position or education).
$this->out->element('div', 'label', _m('Start'));
$this->out->input(
$id . '-start',
@ -486,7 +486,7 @@ class ExtendedProfileWidget extends Form
isset($field['start']) ? date('j M Y', strtotime($field['start'])) : null
);
// TRANS: Field label in education edit area of extended profile (when did one end an education).
// TRANS: Field label in extended profile (when did one end a position or education).
$this->out->element('div', 'label', _m('End'));
$this->out->input(
$id . '-end',

View File

@ -277,10 +277,7 @@ class MobileProfilePlugin extends WAP20Plugin
$action->elementStart('div', array('id' => 'header'));
$this->_showLogo($action);
$this->_showPrimaryNav($action);
if (common_logged_in()) {
$action->showNoticeForm();
}
$action->showPrimaryNav();
$action->elementEnd('div');
return false;
@ -305,91 +302,6 @@ class MobileProfilePlugin extends WAP20Plugin
$action->elementEnd('address');
}
function _showPrimaryNav($action)
{
$user = common_current_user();
$action->elementStart('ul', array('id' => 'site_nav_global_primary'));
if ($user) {
$action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
// TRANS: Menu item in mobile profile to go to start page of site.
_m('Home'));
$action->menuItem(common_local_url('profilesettings'),
// TRANS: Menu item in mobile profile to go to user account settings.
_m('Account'));
$action->menuItem(common_local_url('oauthconnectionssettings'),
// TRANS: Menu item in mobile profile to connect to other services.
_m('Connect'));
if ($user->hasRight(Right::CONFIGURESITE)) {
$action->menuItem(common_local_url('siteadminpanel'),
// TRANS: Menu item in mobile profile to manage site settings.
_m('Admin'),
_m('Change site configuration'), false, 'nav_admin');
}
if (common_config('invite', 'enabled')) {
$action->menuItem(common_local_url('invite'),
// TRANS: Menu item in mobile profile to invite other people.
_m('Invite'));
}
$action->menuItem(common_local_url('logout'),
// TRANS: Menu item in mobile profile log the current user off.
_m('Logout'));
} else {
if (!common_config('site', 'closed')) {
$action->menuItem(common_local_url('register'),
// TRANS: Menu item in mobile profile to register with the site.
_m('Register'));
}
$action->menuItem(common_local_url('login'),
// TRANS: Menu item in mobile profile to log in.
_m('Login'));
}
if ($user || !common_config('site', 'private')) {
$action->menuItem(common_local_url('peoplesearch'),
// TRANS: Menu item in mobile profile to search the site.
_m('Search'));
}
$action->elementEnd('ul');
}
function onStartShowNoticeFormData($form)
{
if (!$this->serveMobile) {
return true;
}
$form->out->element('textarea', array('id' => 'notice_data-text',
'cols' => 15,
'rows' => 4,
'name' => 'status_textarea'),
($form->content) ? $form->content : '');
$contentLimit = Notice::maxContent();
if ($contentLimit > 0) {
$form->out->element('div', array('class' => 'count'),
$contentLimit);
}
if (common_config('attachments', 'uploads')) {
if ($this->mobileFeatures['inputfiletype']) {
$form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
// TRANS: Field label in mobile profile to attach a file to a status.
$form->out->element('label', array('for' => 'notice_data-attach'), _m('Attach'));
$form->out->element('input', array('id' => 'notice_data-attach',
'type' => 'file',
'name' => 'attach',
// TRANS: Field title in mobile profile to attach a file to a status.
'title' => _m('Attach a file.')));
}
}
if ($form->action) {
$form->out->hidden('notice_return-to', $form->action, 'returnto');
}
$form->out->hidden('notice_in-reply-to', $form->inreplyto, 'inreplyto');
return false;
}
function onStartShowAside($action)
{
if ($this->serveMobile) {
@ -397,8 +309,18 @@ class MobileProfilePlugin extends WAP20Plugin
}
}
function onStartShowLocalNavBlock($action)
{
if ($this->serveMobile) {
// @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->element('a', array('href' => '#', 'id' => 'navtoggle'), 'Show Navigation');
return true;
}
}
function onEndShowScripts($action)
{
// @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n
$action->inlineScript('
$(function() {
$("#mobile-toggle-disable").click(function() {
@ -411,6 +333,12 @@ class MobileProfilePlugin extends WAP20Plugin
window.location.reload();
return false;
});
$("#navtoggle").click(function () {
$("#site_nav_local_views").fadeToggle();
var text = $("#navtoggle").text();
$("#navtoggle").text(
text == "Show Navigation" ? "Hide Navigation" : "Show Navigation");
});
});'
);
}

View File

@ -327,7 +327,8 @@ class OStatusPlugin extends Plugin
return false;
} catch (Exception $e) {
// TRANS: Error message in OStatus plugin.
// TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$err = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
}
@ -360,7 +361,8 @@ class OStatusPlugin extends Plugin
return $this->filter(array($oprofile->localProfile()));
} catch (Exception $e) {
// TRANS: Error message in OStatus plugin.
// TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->msg = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
return array();
}

View File

@ -77,7 +77,8 @@ class OStatusGroupAction extends OStatusSubAction
// TRANS: Field label.
_m('Join group'),
$this->profile_uri,
// TRANS: Tooltip for field label "Join group".
// TRANS: Tooltip for field label "Join group". Do not translate the "example.net"
// TRANS: domain name in the URL, as it is an official standard domain name for examples.
_m("OStatus group's address, like http://example.net/group/nickname."));
$this->elementEnd('li');
$this->elementEnd('ul');

View File

@ -228,14 +228,16 @@ class OStatusSubAction extends Action
} else if (Validate::uri($this->profile_uri)) {
$this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);
} else {
// TRANS: Error text.
// TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid address format.', __FILE__);
return false;
}
return true;
} catch (FeedSubBadURLException $e) {
// TRANS: Error text.
// TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug('Invalid URL or could not reach server.', __FILE__);
} catch (FeedSubBadResponseException $e) {
@ -260,7 +262,8 @@ class OStatusSubAction extends Action
common_debug('Not a recognized feed type.', __FILE__);
} catch (Exception $e) {
// Any new ones we forgot about
// TRANS: Error text.
// TRANS: Error message in OStatus plugin. Do not translate the domain names example.com
// TRANS: and example.net, as these are official standard domain names for use in examples.
$this->error = _m("Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.");
common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);
}

View File

@ -74,7 +74,7 @@ class OStatusTagAction extends OStatusInitAction
// TRANS: Field label.
$this->input('profile', _m('Profile Account'), $this->profile,
// TRANS: Field title.
_m('Your account id (i.e. user@identi.ca).'));
_m('Your account id (for example user@identi.ca).'));
$this->elementEnd('li');
$this->elementEnd('ul');
$this->submit('submit', $submit);

View File

@ -414,6 +414,14 @@ address .poweredby {
margin-right: 8px;
}
.notice .addressees:before {
content: '\25B8';
}
.notice .addressees:empty:before {
content: none;
}
.fn {
overflow: hidden;
}

View File

@ -1057,7 +1057,7 @@ background-color:rgba(200, 200, 200, 0.300);
background-color: #f2f2f2;
}
.form_notice input.submit, .form_settings input.submit, .form_settings input.cancel {
.form_notice input.submit, .form_settings input.submit, .form_settings input.cancel, #form_invite input.submit {
height: 1.9em;
padding: 0px 10px;
color:#fff;
@ -1075,7 +1075,7 @@ background-color:rgba(200, 200, 200, 0.300);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9d63', endColorstr='#FB6104',GradientType=0 );
}
.form_notice input.submit:hover, .form_settings input.submit:hover, .form_settings input.cancel:hover {
.form_notice input.submit:hover, .form_settings input.submit:hover, .form_settings input.cancel:hover, #form_invite input.submit:hover {
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6);
background: #ff9d63;
background: -moz-linear-gradient(top, #FB6104 , #fc8035);
@ -1128,6 +1128,78 @@ background-color:rgba(200, 200, 200, 0.300);
padding-top: 25px;
}
#invite #content p {
margin-bottom: 15px;
}
#invite #content ul {
list-style-type: none;
margin-bottom: 25px;
margin-left: 25px;
}
#invite #content li {
background: url(../images/resultset_next.png) no-repeat 0px 3px;
padding-left: 20px;
margin-bottom: 10px;
}
#invite #content #form_invite ul, #invite #content #form_invite li {
margin-left: 0px;
padding-left: 0px;
background: none;
}
#form_invite input[type=text], #form_invite textarea {
width: 250px;
padding: 5px;
border: 1px solid #a6a6a6;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
}
#form_invite textarea {
clear: left;
width: 508px;
height: 48px;
}
#form_invite a.add_row, #form_invite a.remove_row {
display: block;
height: 16px;
width: 16px;
overflow: hidden;
background-image: url('../../base/images/icons/icons-01.gif');
background-repeat: no-repeat;
}
#form_invite a.remove_row {
background-position: 0px -1252px;
display: inline-block;
position: relative;
top: 4px;
left: 10px;
line-height: 4em;
}
#form_invite a.add_row {
clear: both;
position: relative;
top: 10px;
background-position: 0px -1186px;
width: 120px;
padding-left: 20px;
line-height: 1.2em;
}
#form_invite label[for=personal] {
display: block;
margin-top: 25px;
}
#content thead th {
text-align:left;
@ -1339,6 +1411,11 @@ ul.bookmark-tags a:hover {
padding: 10px;
}
.onboard_iframe #wrap {
width: auto;
background: none;
}
.onboard_welcome p {
margin-bottom: 10px;
}

View File

@ -10,36 +10,41 @@ body {
padding: 0;
min-width:0;
max-width:100%;
width: auto;
border: none;
}
#header {
width: 96%;
padding: 0 2%;
padding-top: 20px;
}
.user_in #header {
padding-top: 40px;
width: 100%;
padding: 0;
}
address {
margin:1em 0 0 0;
float:left;
width:100%;
float:left;
margin: 0px;
width: auto;
left: 0px;
}
address img {
float: left;
background: #fff;
padding: 2px 2px 2px 6px;
}
address img + .fn {
display:block;
margin-top:1em;
margin-right: 10px;
clear: left;
float:left;
display:block;
margin-top: 8px;
clear: left;
float: left;
color: #000;
margin-left: 6px;
}
#site_nav_global_primary {
margin:0;
width: 100%;
padding: 4px 0;
padding: 2px 0;
height: auto;
position:absolute;
top:0;
@ -47,11 +52,16 @@ float:left;
font-size: 1em;
letter-spacing: 0em;
border-top: none;
-webkit-border-top-right-radius: 0px;
-moz-border-radius-topright: 0px;
border-top-right-radius: 0px;
height: 24px;
line-height: 16px;
}
#site_nav_global_primary li {
margin-left:0;
margin-right:0px;
margin-right: 2px;
float:left;
font-size:0.9em;
padding: 2px 4px;
@ -59,96 +69,100 @@ float:left;
height: auto;
}
#site_nav_global_primary li a {
height: auto;
#site_nav_global_primary li:last-child {
margin-right: 0px;
}
.form_notice {
float: left;
margin-left: 0px;
width: 300px;
padding: 4px;
}
#form_notice-direct.form_notice {
padding-top: 10px;
}
.form_notice textarea {
width: 210px;
height: 50px;
padding: 4px;
}
#notice_text-count {
position:absolute;
bottom:2px;
left: 175px;
font-size: 0.8em;
z-index:9;
}
#form_notice-direct.form_notice #notice_text-count {
left: 0px;
}
/*input type=file no good in
iPhone/iPod Touch, Android, Opera Mini Simulator
*/
.form_notice #notice_text-count + label,
.form_notice label[for="notice_data-attach"] {
display:none;
}
.form_notice input.notice_data-attach {
position:static;
clear:both;
width:65%;
height:auto;
display:block;
z-index:9;
padding:0;
margin:0;
background:none;
opacity:1;
}
.form_notice #notice_action-submit {
text-align: center;
left: 230px;
top: 32px;
width: 70px;
font-size: 0.8em;
}
#form_notice-direct.form_notice #notice_action-submit {
top: 62px;
}
#site_nav_local_views {
height: auto;
font-size: 0.9em;
line-height: 2em;
margin-bottom: 0px;
padding-left: 4px;
background: none;
}
#site_nav_local_views li {
margin-right: 6px;
}
#site_nav_local_views a {
background-color: #7080aa;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
margin-right: 2px;
margin-bottom: 2px;
#site_nav_global_primary a {
padding: 2px 4px;
height: 20px;
}
#core {
width: 100%;
margin: 0;
border-left: none;
border-right: none;
}
#aside_primary_wrapper {
background: none;
}
#content_wrapper {
right: 0px;
border: none;
}
#site_nav_local_views_wrapper {
right: 0px;
border: none;
}
#navtoggle {
float: right;
padding: 2px 6px;
text-decoration: none;
}
#site_nav_local_views {
height: auto;
font-size: 1em;
line-height: 2em;
margin-bottom: 0px;
padding: 10px 0px 10px 6px;
background: none;
left: 0px;
width: 100%;
display: none;
}
#site_nav_local_views h3 {
color: #333;
font-size: 1em;
margin-bottom: 0px;
}
#site_nav_local_views li {
margin-right: 6px;
margin-bottom: 0px;
clear: left;
}
#site_nav_local_views li li {
float: left;
clear: none;
margin-bottom: 6px;
}
#site_nav_local_views a {
color: #fff;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);;
background: #364a84;
background: -moz-linear-gradient(top, #7b8dbb , #364a84);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7b8dbb), color-stop(100%,#364a84));
font-size: 0.9em;
width: auto;
}
#site_nav_local_views a:hover {
background: #7b8dbb;
background: -moz-linear-gradient(top, #364a84 , #7b8dbb);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#364a84), color-stop(100%,#7b8dbb));
}
#login #site_nav_local_views, #register #site_nav_local_views, #openidlogin #site_nav_local_views {
display: block;
margin-top: 25px;
}
#login #navtoggle, #register #navtoggle, #openidlogin #navtoggle {
display: none;
}
#login #site_nav_local_views li, #register #site_nav_local_views li, #openidlogin #site_nav_local_views li {
float: left;
clear: none;
margin-bottom: 6px;
}
#content {
@ -156,6 +170,11 @@ opacity:1;
padding: 10px 2%;
margin: 0;
min-height: auto;
left: 0px;
}
#content h1 {
clear: left;
}
#footer {
@ -163,6 +182,178 @@ opacity:1;
padding: 10px 4px 4px 4px;
}
.input_forms {
display: block;
width: 102%;
top: -10px;
left: -2%;
padding-left: 2%;
padding-right: 0;
}
#input_form_nav li a {
padding: 0px 4px 1px 4px;
margin-right: 6px;
}
.input_form {
clear: left;
width: 100%;
padding-bottom: 0px;
}
#input_form_status, #input_form_direct {
padding-bottom: 40px;
}
.form_notice_placeholder .placeholder {
width: 290px;
margin-bottom: 20px;
}
.form_notice {
float: left;
margin-left: 0px;
width: 300px;
padding: 4px 0px;
}
#form_notice-direct.form_notice {
padding-top: 0px;
}
.form_notice textarea, #form_notice-direct.form_notice textarea {
width: 292px;
height: 36px;
padding: 4px 4px 16px 4px;
font-size: 1em;
}
.form_notice .count {
position: absolute;
top: 44px;
left: 270px;
}
#form_notice-direct.form_notice .count {
top: 70px;
left: 270px;
}
/*input type=file no good in
iPhone/iPod Touch, Android, Opera Mini Simulator
*/
.form_notice .notice_data-attach, .form_notice .notice_data-geo_wrap label, .form_notice .notice_data-geo_wrap input {
display:none;
}
.checkbox-wrapper {
margin-left: 0px;
clear: left;
float: left;
width: 200px;
}
.form_notice .checkbox-wrapper {
display: inline;
margin-left: 0px;
}
.checkbox-wrapper label.checkbox {
display: none;
}
.checkbox-wrapper #notice_private {
display: inline;
margin-top: 10px;
margin-left: 20px;
}
.form_notice .checkbox-wrapper #notice_private {
margin-left: 0px;
}
.checkbox-wrapper:before {
content: "Send privately?";
}
.input_form fieldset fieldset {
width: 300px;
}
.input_form .form_settings li input {
width: 292px;
}
.input_form .form_settings li textarea {
width: 292px;
}
.bookmarkform-thumbnail {
display: none;
}
.input_form .form_settings .submit {
font-size: 1em;
margin: 10px 0;
clear: left;
float: left;
}
.form_notice #notice_action-submit {
text-align: center;
left: 0px;
top: 192px;
width: 80px;
font-size: 1em;
}
#form_notice-direct.form_notice #notice_action-submit {
top: 148px;
}
.threaded-replies {
width: 80%;
margin-left: 59px;
}
#content .notice .threaded-replies .notice {
width: 95%;
}
.threaded-replies .placeholder {
margin: 10px;
width: 92%;
}
.threaded-replies .form_notice {
margin-bottom: 10px;
}
.threaded-replies .form_notice textarea {
width: 220px;
}
.threaded-replies .form_notice .count {
left: 205px;
top: 53px;
}
.threaded-replies .form_notice #notice_action-submit {
position: relative;
top: 0;
bottom: 0px;
left: 0;
margin-top: 10px;
}
.threaded-replies .form_notice .error,
.threaded-replies .form_notice .success,
.threaded-replies .form_notice .notice-status {
width: 210px;
}
.form_settings fieldset {
margin-bottom:7px;
@ -195,10 +386,52 @@ float:none;
.form_settings .form_data p.form_guide {
width:auto;
margin-left:0;
margin-left:0 !important;
}
#settings_design_color .form_data {
width: auto;
margin-right: 0;
}
.form_settings input.checkbox, .form_settings input.radio {
left: 0px;
}
.form_settings label.checkbox, .form_settings label.radio {
left: -10px;
}
.notice .addressees:before {
content: '\003E';
}
.notice .addressees:empty:before {
content: none;
}
.user_in .notice div.entry-content {
max-width: 150px;
}
ul.qna-dummy {
width: 80%;
}
.qna-dummy-placeholder input {
width: 92%;
}
.question #qna-answer, .qna-full-question #qna-answer {
width: 220px;
}
.threaded-replies #qna-answer-submit {
float: left;
clear: left;
position: relative;
top: 0;
bottom: 0px;
left: 0;
margin-top: 10px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 990 B