Project

General

Profile

Feature #22000 » 13313_followup3.diff

Administrator Admin, 2010-01-27 14:41

View differences:

t3lib/config_default.php (working copy)
'BackendLogin::getChallenge' => 'typo3/classes/class.ajaxlogin.php:AjaxLogin->getChallenge',
'WorkspaceMenu::toggleWorkspacePreview' => 'typo3/classes/class.workspaceselector.php:WorkspaceSelector->toggleWorkspacePreview',
'WorkspaceMenu::setWorkspace' => 'typo3/classes/class.workspaceselector.php:WorkspaceSelector->setWorkspace',
'ExtDirect::getAPI' => 't3lib/extjs/class.t3lib_extjs_extdirectapi.php:t3lib_ExtJs_ExtDirectAPI->getAPI',
'ExtDirect::route' => 't3lib/extjs/class.t3lib_extjs_extdirectrouter.php:t3lib_ExtJs_ExtDirectRouter->route',
'ExtDirect::getAPI' => 't3lib/extjs/class.t3lib_extjs_extdirectapi.php:t3lib_extjs_ExtDirectApi->getAPI',
'ExtDirect::route' => 't3lib/extjs/class.t3lib_extjs_extdirectrouter.php:t3lib_extjs_ExtDirectRouter->route',
),
'ExtDirect' => array(), // array of key value pairs (provider -> location:className) that holds the classes for the ExtDirect functionality
'XCLASS' => array(), // See 'Inside TYPO3' document for more information.
),
'FE' => array( // Configuration for the TypoScript frontend (FE). Nothing here relates to the administration backend!
......
'frontendEditingController' => array(
'default' => 't3lib/class.t3lib_frontendedit.php:t3lib_frontendedit'
)
)
),
'ExtDirect' => array(), // array of key value pairs (provider -> location:className) that holds the classes for the ExtDirect functionality
),
'EXTCONF' => array( // Here you may add manually set configuration options for your extensions. Eg. $TYPO3_CONF_VARS['EXTCONF']['my_extension_key']['my_option'] = 'my_value';
// '--key--' => array()
t3lib/extjs/class.t3lib_extjs_extdirectrouter.php (working copy)
* @author Stefan Galinski <stefan.galinski@gmail.com>
* @package TYPO3
*/
class t3lib_ExtJs_ExtDirectRouter {
class t3lib_extjs_ExtDirectRouter {
/**
* Dispatches the incoming calls to methods about the ExtDirect API.
*
......
protected function processRpc($singleRequest, $namespace) {
try {
$endpointName = $namespace . '.' . $singleRequest->action;
// theoretically this can never happen, because of an javascript error on
// the client side due the missing namespace/endpoint
if (!isset($GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect'][$endpointName])) {
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect'][$endpointName])) {
throw new t3lib_error_Exception('ExtDirect: Call to undefined endpoint: ' . $endpointName);
}
......
);
$endpointObject = t3lib_div::getUserObj(
$GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect'][$endpointName],
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect'][$endpointName],
FALSE
);
$response['result'] = call_user_func_array(
array($endpointObject, $singleRequest->method),
is_array($singleRequest->data) ? $singleRequest->data : array()
t3lib/extjs/class.t3lib_extjs_extdirectapi.php (working copy)
* @author Stefan Galinski <stefan.galinski@gmail.com>
* @package TYPO3
*/
class t3lib_ExtJs_ExtDirectAPI {
class t3lib_extjs_ExtDirectApi {
/**
* Parses the ExtDirect configuration array "$GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect']"
* and feeds the given typo3ajax instance with the resulting informations. The get parameter
......
$filterNamespace = t3lib_div::_GET('namespace');
$javascriptNamespaces = array();
if (is_array($GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['ExtDirect'] as $javascriptName => $className) {
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ExtDirect'] as $javascriptName => $className) {
$splittedJavascriptName = explode('.', $javascriptName);
$javascriptObjectName = array_pop($splittedJavascriptName);
$javascriptNamespace = implode('.', $splittedJavascriptName);
......
$javascriptNamespaces[$javascriptNamespace]['actions'][$javascriptObjectName][] = array(
'name' => $methodName,
'len' => $numberOfParameters
);
);
}
}
}
......
if (typeof Ext.app.ExtDirectAPI != "object") {
Ext.app.ExtDirectAPI = {};
}
if (Object.extend === undefined) {
Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}
}
';
$ajaxObj->setContent($javascriptNamespaces);
(6-6/6)