Project

General

Profile

Feature #24812 » 17312_v1.diff

Administrator Admin, 2011-01-25 20:31

View differences:

t3lib/js/extjs/components/pagetree/javascript/contextmenu.js (Arbeitskopie)
this.pageTree.commandProvider[item.callbackAction](
item.parentMenu.node,
item.parentMenu.pageTree
item.parentMenu.pageTree,
item
);
}
}
......
'text': contextMenuConfiguration[singleAction]['label'],
'icon': contextMenuConfiguration[singleAction]['icon'],
'iconCls': contextMenuConfiguration[singleAction]['class'],
'callbackAction': contextMenuConfiguration[singleAction]['callbackAction']
'callbackAction': contextMenuConfiguration[singleAction]['callbackAction'],
'customAttributes': contextMenuConfiguration[singleAction]['customAttributes']
};
component.itemTpl = Ext.menu.Item.prototype.itemTpl = new Ext.XTemplate(
t3lib/js/extjs/components/pagetree/javascript/actions.js (Arbeitskopie)
},
/**
* Opens a configured url inside the content frame
*
* @param {Ext.tree.TreeNode} node
* @param {TYPO3.Components.PageTree.Tree} tree
* @param {Object} contextItem
* @return {void}
*/
openCustomUrlInContentFrame: function(node, tree, contextItem) {
console.log(contextItem);
if (!contextItem.customAttributes || !contextItem.customAttributes.contentUrl) {
return;
}
node.select();
TYPO3.Backend.ContentContainer.setUrl(
contextItem.customAttributes.contentUrl.replace('###ID###', node.attributes.nodeData.id)
);
},
/**
* Updates the title of a node
*
* @param {Ext.tree.TreeNode} node
t3lib/contextmenu/class.t3lib_contextmenu_abstractdataprovider.php (Arbeitskopie)
} else {
$action->setType('action');
$action->setCallbackAction($actionConfiguration['callbackAction']);
if (is_array($actionConfiguration['customAttributes.'])) {
$action->setCustomAttributes($actionConfiguration['customAttributes.']);
}
}
$action->setLabel($label);
t3lib/contextmenu/class.t3lib_contextmenu_action.php (Arbeitskopie)
protected $childActions = NULL;
/**
* Custom Action Attributes
*
* @var array
*/
protected $customAttributes = array();
/**
* Returns the label
*
* @return string
......
}
/**
* Sets the custom attributes
*
* @param array $customAttributes
* @return void
*/
public function setCustomAttributes(array $customAttributes) {
$this->customAttributes = $customAttributes;
}
/**
* Returns the custom attributes
*
* @return array
*/
public function getCustomAttributes() {
return $this->customAttributes;
}
/**
* Returns the action as an array
*
* @return array
......
'class' => $this->getClass(),
'callbackAction' => $this->getCallbackAction(),
'type' => $this->getType(),
'customAttributes' => $this->getCustomAttributes()
);
$arrayRepresentation['childActions'] = '';
(1-1/2)