Feature #32309 » cardLayout.diff
typo3/js/extjs/iframepanel.js | ||
---|---|---|
return this.body.dom.src;
|
||
},
|
||
getModuleWrapper: function() {
|
||
return this.findParentBy(
|
||
function(container, component) {
|
||
if(container.id === 'typo3-contentContainerWrapper') {
|
||
return true;
|
||
}
|
||
}
|
||
);
|
||
},
|
||
setUrl: function(source) {
|
||
var wrapper;
|
||
this.setMask();
|
||
this.body.dom.src = source;
|
||
// go up the object tree and ensure, that the frame gets visible
|
||
wrapper = this.getModuleWrapper();
|
||
if(wrapper) {
|
||
if(wrapper.get('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule)) {
|
||
wrapper.getLayout().setActiveItem('typo3-card-' + TYPO3.ModuleMenu.App.loadedModule);
|
||
} else {
|
||
wrapper.getLayout().setActiveItem(this.id);
|
||
}
|
||
}
|
||
},
|
||
resetUrl: function() {
|
typo3/js/extjs/viewportConfiguration.js | ||
---|---|---|
Ext.ns('TYPO3');
|
||
/**
|
||
* The Cards Configuration for the BE Module Cards
|
||
*
|
||
* New items need to be appended here
|
||
* cards id needs to be prepended with typo3-card- the rest of the id is the
|
||
* be module name as passed it is normally in TYPO3
|
||
* Cards shouldn't be simple iframes for performance reasons
|
||
*
|
||
* @author Kay Strobach <typo3@kay-strobach.de>
|
||
*/
|
||
TYPO3.Viewport.ContentCards = {
|
||
// Add a card to either the config or if already rendered to the wrapper
|
||
addContentCard: function(name,config) {
|
||
config.id = 'typo3-card-' + name;
|
||
if (Ext.ready) {
|
||
Ext.getCmp('typo3-contentContainerWrapper').add(config);
|
||
} else {
|
||
this.cards.push(config);
|
||
}
|
||
},
|
||
cards: [
|
||
{
|
||
id: 'typo3-contentContainer',
|
||
border: false,
|
||
xtype: 'iframePanel',
|
||
name: 'content'
|
||
}, {
|
||
//id:'typo3-card-tools_txextdevevalM1',
|
||
id: 'typo3-card-web_list',
|
||
html: 'extdeval',
|
||
setUrl: function() {
|
||
TYPO3.Flashmessage.display(
|
||
1,
|
||
'function called',
|
||
'you fired the setUrl event of extdeval'
|
||
);
|
||
}
|
||
}, {
|
||
id: 'typo3-card-tools_txreportsM1',
|
||
html: 'i´m the report card'
|
||
}
|
||
]
|
||
};
|
||
/**
|
||
* The backend viewport configuration
|
||
*
|
||
* @author Stefan Galinski <stefan.galinski@gmail.com>
|
||
... | ... | |
border: false,
|
||
hidden: true,
|
||
floatable: true,
|
||
xtime: 'iframePanel',
|
||
xtype: 'iframePanel',
|
||
width: 5
|
||
},
|
||
{
|
||
id: 'typo3-contentContainer',
|
||
id: 'typo3-contentContainerWrapper',
|
||
region: 'center',
|
||
anchor: '100% 100%',
|
||
border: false,
|
||
xtype: 'iframePanel',
|
||
name: 'content'
|
||
xtype: 'panel',
|
||
layout: 'card',
|
||
activeItem: 0,
|
||
items: TYPO3.Viewport.ContentCards.cards
|
||
}
|
||
]
|
||
},
|
typo3/js/modulemenu.js | ||
---|---|---|
TYPO3.Backend.NavigationContainer.hide();
|
||
TYPO3.Backend.NavigationDummy.show();
|
||
}
|
||
this.openInContentFrame(record.originalLink, params);
|
||
this.loadedModule = mod;
|
||
this.highlightModuleMenuItem(mod);
|
||
this.openInContentFrame(record.originalLink, params);
|
||
// compatibility
|
||
top.currentSubScript = record.originalLink;
|
||
... | ... | |
},
|
||
openInContentFrame: function(url, params) {
|
||
var relatedCard, urlToLoad;
|
||
if (top.nextLoadModuleUrl) {
|
||
TYPO3.Backend.ContentContainer.setUrl(top.nextLoadModuleUrl);
|
||
top.nextLoadModuleUrl = '';
|
||
} else {
|
||
TYPO3.Backend.ContentContainer.setUrl(url + (params ? (url.indexOf('?') !== -1 ? '&' : '?') + params : ''));
|
||
relatedCard = Ext.getCmp('typo3-contentContainerWrapper').get('typo3-card-' + this.loadedModule);
|
||
urlToLoad = url + (params ? (url.indexOf('?') !== -1 ? '&' : '?') + params : '')
|
||
if(relatedCard) {
|
||
if (typeof relatedCard.setUrl === 'function') {
|
||
relatedCard.setUrl(urlToLoad);
|
||
}
|
||
Ext.getCmp('typo3-contentContainerWrapper').getLayout().setActiveItem('typo3-card-' + this.loadedModule);
|
||
} else {
|
||
TYPO3.Backend.ContentContainer.setUrl(urlToLoad);
|
||
Ext.getCmp('typo3-contentContainerWrapper').getLayout().setActiveItem('typo3-card-' + this.loadedModule);
|
||
}
|
||
}
|
||
},
|
||