Bug #25102 » rtehtmlarea_bugfix_17669_trunk.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail) | ||
---|---|---|
RTEarea[editornumber].showTagFreeClasses = ' . (trim($this->thisConfig['showTagFreeClasses'])?'true':'false') . ';
|
||
RTEarea[editornumber].useHTTPS = ' . ((trim(stristr($this->siteURL, 'https')) || $this->thisConfig['forceHTTPS'])?'true':'false') . ';
|
||
RTEarea[editornumber].tceformsNested = ' . (is_object($this->TCEform) && method_exists($this->TCEform, 'getDynNestedStack') ? $this->TCEform->getDynNestedStack(true) : '[]') . ';
|
||
RTEarea[editornumber].dialogueWindows = new Object();
|
||
RTEarea[editornumber].dialogueWindows.defaultPositionFromTop = ' . (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromTop'])? intval($this->thisConfig['dialogueWindows.']['defaultPositionFromTop']) : '100') . ';
|
||
RTEarea[editornumber].dialogueWindows.defaultPositionFromLeft = ' . (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromLeft'])? intval($this->thisConfig['dialogueWindows.']['defaultPositionFromLeft']) : '100') . ';
|
||
RTEarea[editornumber].dialogueWindows.doNotResize = ' . (trim($this->thisConfig['dialogueWindows.']['doNotResize'])?'true':'false') . ';
|
||
RTEarea[editornumber].dialogueWindows.doNotCenter = ' . (trim($this->thisConfig['dialogueWindows.']['doNotCenter'])?'true':'false') . ';';
|
||
RTEarea[editornumber].dialogueWindows = new Object();';
|
||
if (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromTop'])) {
|
||
$configureRTEInJavascriptString .= '
|
||
RTEarea[editornumber].dialogueWindows.positionFromTop = ' . intval($this->thisConfig['dialogueWindows.']['defaultPositionFromTop']) . ';';
|
||
}
|
||
if (isset($this->thisConfig['dialogueWindows.']['defaultPositionFromLeft'])) {
|
||
$configureRTEInJavascriptString .= '
|
||
RTEarea[editornumber].dialogueWindows.positionFromLeft = ' . intval($this->thisConfig['dialogueWindows.']['defaultPositionFromLeft']) . ';';
|
||
}
|
||
// The following properties apply only to the backend
|
||
if (!$this->is_FE()) {
|
||
$configureRTEInJavascriptString .= '
|
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) | ||
---|---|---|
*/
|
||
getWindowDimensions: function (dimensions, buttonId) {
|
||
// Apply default dimensions
|
||
var dialogueWindowDimensions = {
|
||
this.dialogueWindowDimensions = {
|
||
width: 250,
|
||
height: 250,
|
||
top: this.editorConfiguration.dialogueWindows.defaultPositionFromTop,
|
||
left: this.editorConfiguration.dialogueWindows.defaultPositionFromLeft
|
||
height: 250
|
||
};
|
||
// Apply default values as per PageTSConfig
|
||
if (this.editorConfiguration.dialogueWindows) {
|
||
Ext.apply(this.dialogueWindowDimensions, this.editorConfiguration.dialogueWindows);
|
||
}
|
||
// Apply dimensions as per button registration
|
||
if (this.editorConfiguration.buttonsConfig[buttonId]) {
|
||
Ext.apply(dialogueWindowDimensions, this.editorConfiguration.buttonsConfig[buttonId].dimensions);
|
||
Ext.apply(this.dialogueWindowDimensions, this.editorConfiguration.buttonsConfig[buttonId].dimensions);
|
||
}
|
||
// Apply dimensions as per call
|
||
Ext.apply(dialogueWindowDimensions, dimensions);
|
||
Ext.apply(this.dialogueWindowDimensions, dimensions);
|
||
// Overrride dimensions as per PageTSConfig
|
||
var buttonConfiguration = this.editorConfiguration.buttons[this.editorConfiguration.convertButtonId[buttonId]];
|
||
if (buttonConfiguration && buttonConfiguration.dialogueWindow) {
|
||
Ext.apply(dialogueWindowDimensions, buttonConfiguration.dialogueWindow);
|
||
if (buttonConfiguration.dialogueWindow.top) {
|
||
dialogueWindowDimensions.top = buttonConfiguration.dialogueWindow.positionFromTop;
|
||
}
|
||
if (buttonConfiguration.dialogueWindow.left) {
|
||
dialogueWindowDimensions.left = buttonConfiguration.dialogueWindow.positionFromLeft;
|
||
}
|
||
Ext.apply(this.dialogueWindowDimensions, buttonConfiguration.dialogueWindow);
|
||
}
|
||
return dialogueWindowDimensions;
|
||
return this.dialogueWindowDimensions;
|
||
},
|
||
/**
|
||
* Make url from module path
|
||
... | ... | |
// Close the window if the editor changes mode
|
||
this.dialog.mon(this.editor, 'HTMLAreaEventModeChange', this.close, this, {single: true });
|
||
this.saveSelection();
|
||
if (typeof(this.dialogueWindowDimensions) !== 'undefined') {
|
||
this.dialog.setPosition(this.dialogueWindowDimensions.positionFromLeft, this.dialogueWindowDimensions.positionFromTop);
|
||
}
|
||
this.dialog.show();
|
||
this.restoreSelection();
|
||
},
|