forked from GNUsocial/gnu-social
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
This commit is contained in:
commit
2bad1d0cd9
@ -83,6 +83,11 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
function prepare($argarray)
|
function prepare($argarray)
|
||||||
{
|
{
|
||||||
$this->args =& common_copy_args($argarray);
|
$this->args =& common_copy_args($argarray);
|
||||||
|
|
||||||
|
if ($this->boolean('ajax')) {
|
||||||
|
StatusNet::setAjax(true);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,11 @@ class ErrorAction extends InfoAction
|
|||||||
|
|
||||||
function showPage()
|
function showPage()
|
||||||
{
|
{
|
||||||
if ($this->minimal) {
|
if (StatusNet::isAjax()) {
|
||||||
|
$this->extraHeaders();
|
||||||
|
$this->ajaxErrorMsg();
|
||||||
|
exit();
|
||||||
|
} if ($this->minimal) {
|
||||||
// Even more minimal -- we're in a machine API
|
// Even more minimal -- we're in a machine API
|
||||||
// and don't want to flood the output.
|
// and don't want to flood the output.
|
||||||
$this->extraHeaders();
|
$this->extraHeaders();
|
||||||
@ -94,4 +98,27 @@ class ErrorAction extends InfoAction
|
|||||||
function showNoticeForm()
|
function showNoticeForm()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show an Ajax-y error message
|
||||||
|
*
|
||||||
|
* Goes back to the browser, where it's shown in a popup.
|
||||||
|
*
|
||||||
|
* @param string $msg Message to show
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
|
||||||
|
function ajaxErrorMsg()
|
||||||
|
{
|
||||||
|
$this->startHTML('text/xml;charset=utf-8', true);
|
||||||
|
$this->elementStart('head');
|
||||||
|
// TRANS: Page title after an AJAX error occurs on the send notice page.
|
||||||
|
$this->element('title', null, _('Ajax Error'));
|
||||||
|
$this->elementEnd('head');
|
||||||
|
$this->elementStart('body');
|
||||||
|
$this->element('p', array('id' => 'error'), $this->message);
|
||||||
|
$this->elementEnd('body');
|
||||||
|
$this->elementEnd('html');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ class StatusNet
|
|||||||
{
|
{
|
||||||
protected static $have_config;
|
protected static $have_config;
|
||||||
protected static $is_api;
|
protected static $is_api;
|
||||||
|
protected static $is_ajax;
|
||||||
protected static $plugins = array();
|
protected static $plugins = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -230,6 +231,16 @@ class StatusNet
|
|||||||
self::$is_api = $mode;
|
self::$is_api = $mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isAjax()
|
||||||
|
{
|
||||||
|
return self::$is_ajax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAjax($mode)
|
||||||
|
{
|
||||||
|
self::$is_ajax = $mode;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build default configuration array
|
* Build default configuration array
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -1144,5 +1144,38 @@ table.profile_list tr.alt {
|
|||||||
font-size: 0em;
|
font-size: 0em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Event specific styles */
|
||||||
|
|
||||||
|
#form_event_rsvp #new_rsvp_data {
|
||||||
|
display: inline;
|
||||||
|
margin: 10px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#form_event_rsvp input.submit {
|
||||||
|
height: 1.6em;
|
||||||
|
padding: 0px 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
color:#fff;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 1.1em;
|
||||||
|
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);
|
||||||
|
border: 1px solid #d7621c;
|
||||||
|
border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
background: #FB6104;
|
||||||
|
background: -moz-linear-gradient(top, #ff9d63 , #FB6104);
|
||||||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff9d63), color-stop(100%,#FB6104));
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9d63', endColorstr='#FB6104',GradientType=0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
#form_event_rsvp .notice input.submit:hover {
|
||||||
|
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6);
|
||||||
|
background: #ff9d63;
|
||||||
|
background: -moz-linear-gradient(top, #FB6104 , #fc8035);
|
||||||
|
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FB6104), color-stop(100%,#fc8035));
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FB6104', endColorstr='#fc8035',GradientType=0 );
|
||||||
|
}
|
||||||
|
|
||||||
}/*end of @media screen, projection, tv*/
|
}/*end of @media screen, projection, tv*/
|
||||||
|
Loading…
Reference in New Issue
Block a user