Thanks for good words.
As I understood it is required to extend actions menu on 'new look' view.
Unfortunately there is no direct and documented way to do it for now. We suppose to add this possibility in future.
var renderContent = function ($contentElement, context) {
//$contentElement is jquery content element for my red control and context contains entity type and entity id
$contentElement.append('This is my content for ' + context.entity.type + ' #' +
context.entity.id);
};
var renderHeader = function ($headerElement, context) {
//$headerElement is jquery header element for my red control and context contains entity type and entity id
$('.ui-label', $headerElement).css({ "color":'red' });
};
//Append my controls to user story view
tau.mashups.addDependency('tp/userStory/view')
.addMashup(function (view) {
view.addTab('Red Tab', renderContent, renderHeader)
.addBlock('Red Block', renderContent, renderHeader);
});
//Append my controls to bug view
tau.mashups.addDependency('tp/bug/view')
.addMashup(function (view) {
view.addTab('Red Tab', renderContent, renderHeader)
.addBlock('Red Block', renderContent, renderHeader);
});
var onViewRendered = function($element, context) {
//I don't need the switcher to old look since I fell in love with new one :)
$element.find('.tau-look-switcher').hide(); //find and hide switcher to old look
};
tau.mashups.addDependency('tp/userStory/view')
.addMashup(function (view) {
//sign up here on render event for user story view
view.onRender(onViewRendered);
});