Bug #22729 » rtehtmlarea_bugfix_14494_follow_up_2_trunk.patch
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail) | ||
---|---|---|
public $RTEdivStyle;
|
||
// Relative path to this extension. It ends with "/"
|
||
public $extHttpPath;
|
||
public $backPath = '';
|
||
// TYPO3 site url
|
||
public $siteURL;
|
||
// TYPO3 host url
|
||
... | ... | |
* INIT THE EDITOR-SETTINGS
|
||
* =======================================
|
||
*/
|
||
// Set backPath
|
||
$this->backPath = $this->isFrontendEditActive() ? '' : $this->TCEform->backPath;
|
||
// Get the path to this extension:
|
||
$this->extHttpPath = $this->TCEform->backPath . t3lib_extMgm::extRelPath($this->ID);
|
||
$this->extHttpPath = $this->backPath . ($this->isFrontendEditActive() ? t3lib_extMgm::siteRelPath($this->ID) : t3lib_extMgm::extRelPath($this->ID));
|
||
// Get the site URL
|
||
$this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
|
||
// Get the host URL
|
||
... | ... | |
if ($this->is_FE()) {
|
||
return ($GLOBALS['TSFE']->absRefPrefix ? $GLOBALS['TSFE']->absRefPrefix : '') . t3lib_div::createVersionNumberedFilename($relativeFilename);
|
||
} else {
|
||
return t3lib_div::createVersionNumberedFilename('../' . $this->TCEform->backPath . $relativeFilename);
|
||
$filename = t3lib_div::createVersionNumberedFilename('../' . $this->backPath . $relativeFilename);
|
||
if ($this->isFrontendEditActive()) {
|
||
$filename = preg_replace('/^..\//', '', $filename);
|
||
}
|
||
return $filename;
|
||
}
|
||
}
|
||
/**
|
||
... | ... | |
} else {
|
||
if ($compress) {
|
||
$compressor = t3lib_div::makeInstance('t3lib_compressor');
|
||
$filename = $compressor->compressJsFile('../' . $this->TCEform->backPath . $relativeFilename);
|
||
$filename = $compressor->compressJsFile('../' . $this->backPath . $relativeFilename);
|
||
} else {
|
||
$filename = t3lib_div::createVersionNumberedFilename('../' . $this->TCEform->backPath . $relativeFilename);
|
||
$filename = t3lib_div::createVersionNumberedFilename('../' . $this->backPath . $relativeFilename);
|
||
}
|
||
if ($this->isFrontendEditActive()) {
|
||
$filename = preg_replace('/^..\//', '', $filename);
|
||
}
|
||
}
|
||
return $filename;
|
||
}
|
||
... | ... | |
list($extKey,$local) = explode('/',substr($filename,4),2);
|
||
$newFilename = '';
|
||
if (strcmp($extKey,'') && t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
|
||
$newFilename = ($this->is_FE() ? t3lib_extMgm::siteRelPath($extKey) : $this->TCEform->backPath . t3lib_extMgm::extRelPath($extKey)) . $local;
|
||
$newFilename = ($this->is_FE() ? t3lib_extMgm::siteRelPath($extKey) : $this->backPath . t3lib_extMgm::extRelPath($extKey)) . $local;
|
||
}
|
||
} elseif (substr($filename,0,1) != '/') {
|
||
$newFilename = ($this->is_FE() ? '' : '../' . $this->TCEform->backPath) . $filename;
|
||
$newFilename = ($this->is_FE() ? '' : ($this->isFrontendEditActive() ? '' : '../') . $this->backPath) . $filename;
|
||
} else {
|
||
$newFilename = ($this->is_FE() ? '' : '../' . $this->TCEform->backPath) . substr($filename, 1);
|
||
$newFilename = ($this->is_FE() ? '' : ($this->isFrontendEditActive() ? '' : '../') . $this->backPath) . substr($filename, 1);
|
||
}
|
||
return $newFilename;
|
||
}
|
||
... | ... | |
*/
|
||
function is_FE() {
|
||
global $TSFE;
|
||
return is_object($TSFE) && is_array($this->LOCAL_LANG) && !strstr($this->elementId,'TSFE_EDIT');
|
||
return is_object($GLOBALS['TSFE']) && !$this->isFrontendEditActive();
|
||
}
|
||
|
||
/**
|
||
* Checks whether frontend editing is active.
|
||
*
|
||
* @return boolean
|
||
*/
|
||
public function isFrontendEditActive() {
|
||
return is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->beUserLogin && ($GLOBALS['BE_USER']->frontendEdit instanceof t3lib_frontendedit);
|
||
}
|
||
/**
|
||
* Client Browser Information
|
typo3/sysext/rtehtmlarea/extensions/SpellChecker/class.tx_rtehtmlarea_spellchecker.php (copie de travail) | ||
---|---|---|
RTEarea['.$RTEcounter.'].buttons.'. $button .'.spellCheckerMode = "' . $spellCheckerMode .'";
|
||
RTEarea['.$RTEcounter.'].buttons.'. $button .'.enablePersonalDicts = ' . ($enablePersonalDicts ? 'true' : 'false') .';';
|
||
$registerRTEinJavascriptString .= '
|
||
RTEarea['.$RTEcounter.'].buttons.'. $button .'.path = "' . ($this->htmlAreaRTE->is_FE() ? ($GLOBALS['TSFE']->absRefPrefix ? $GLOBALS['TSFE']->absRefPrefix : '') . 'index.php?eID=rtehtmlarea_spellchecker' : $this->htmlAreaRTE->TCEform->backPath . 'ajax.php?ajaxID=rtehtmlarea::spellchecker') . '";';
|
||
RTEarea['.$RTEcounter.'].buttons.'. $button .'.path = "' . (($this->htmlAreaRTE->is_FE() || $this->htmlAreaRTE->isFrontendEditActive()) ? ($GLOBALS['TSFE']->absRefPrefix ? $GLOBALS['TSFE']->absRefPrefix : '') . 'index.php?eID=rtehtmlarea_spellchecker' : $this->htmlAreaRTE->backPath . 'ajax.php?ajaxID=rtehtmlarea::spellchecker') . '";';
|
||
}
|
||
return $registerRTEinJavascriptString;
|
||
}
|
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (copie de travail) | ||
---|---|---|
var docHeader = Ext.get('typo3-docheader');
|
||
if (docHeader) {
|
||
size.height -= docHeader.getHeight();
|
||
docHeader.dom = null;
|
||
}
|
||
docHeader.dom = null;
|
||
return size;
|
||
}
|
||
}
|
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php (copie de travail) | ||
---|---|---|
// Get the path to this extension:
|
||
$this->extHttpPath = t3lib_extMgm::siteRelPath($this->ID);
|
||
// Get the site URL
|
||
$this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
|
||
$this->siteURL = $GLOBALS['TSFE']->absRefPrefix ? $GLOBALS['TSFE']->absRefPrefix : '';
|
||
// Get the host URL
|
||
$this->hostURL = '';
|
||
// Element ID + pid
|
||
... | ... | |
// Preloading the pageStyle and including RTE skin stylesheets
|
||
$this->addPageStyle();
|
||
$this->addSkin();
|
||
$pageRenderer->addCssFile($this->hostURL . '/t3lib/js/extjs/ux/resize.css');
|
||
$pageRenderer->addCssFile($this->siteURL . 't3lib/js/extjs/ux/resize.css');
|
||
// Loading JavaScript files and code
|
||
$pageRenderer->loadExtJs();
|
||
$pageRenderer->enableExtJSQuickTips();
|
||
if (!$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts']) {
|
||
$pageRenderer->enableExtJsDebug();
|
||
}
|
||
$pageRenderer->addJsFile($this->hostURL . '/t3lib/js/extjs/ux/ext.resizable.js');
|
||
$pageRenderer->addJsFile($this->siteURL . 't3lib/js/extjs/ux/ext.resizable.js');
|
||
if ($this->TCEform->RTEcounter == 1) {
|
||
$this->TCEform->additionalJS_pre['rtehtmlarea-loadJScode'] = $this->loadJScode($this->TCEform->RTEcounter);
|
||
}
|
||
... | ... | |
$pageRenderer->addCssFile($href, $relation, 'screen', $title);
|
||
}
|
||
/**
|
||
* Return true if we are in the FE, but not in the FE editing feature of BE.
|
||
*
|
||
* @return boolean
|
||
*/
|
||
function is_FE() {
|
||
return true;
|
||
}
|
||
/**
|
||
* Return the JS-Code for copy the HTML-Code from the editor in the hidden input field.
|
||
* This is for submit function from the form.
|
||
*
|
- « Previous
- 1
- 2
- 3
- Next »