fix small issues
This commit is contained in:
parent
79603ee278
commit
c6496efc62
@ -85,8 +85,10 @@ class Configuration
|
|||||||
$this->options[$optionInstance->getKey()] = $option;
|
$this->options[$optionInstance->getKey()] = $option;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConfig()
|
public function getConfig(): string
|
||||||
{
|
{
|
||||||
|
$sConfig = '';
|
||||||
|
|
||||||
foreach ($this->options as $param => $value) {
|
foreach ($this->options as $param => $value) {
|
||||||
$sConfig .= "$param: $value, ";
|
$sConfig .= "$param: $value, ";
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ namespace O3\TinyMCE\Application\Core\TinyMCE;
|
|||||||
|
|
||||||
use OxidEsales\Eshop\Application\Model\Content;
|
use OxidEsales\Eshop\Application\Model\Content;
|
||||||
use OxidEsales\Eshop\Core\Config;
|
use OxidEsales\Eshop\Core\Config;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\FileException;
|
||||||
use OxidEsales\Eshop\Core\Language;
|
use OxidEsales\Eshop\Core\Language;
|
||||||
use OxidEsales\Eshop\Core\Model\BaseModel;
|
use OxidEsales\Eshop\Core\Model\BaseModel;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
@ -42,6 +43,7 @@ class Loader
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws FileException
|
||||||
*/
|
*/
|
||||||
public function getEditorCode(): string
|
public function getEditorCode(): string
|
||||||
{
|
{
|
||||||
@ -74,7 +76,7 @@ class Loader
|
|||||||
*/
|
*/
|
||||||
protected function contentIsPlain(): bool
|
protected function contentIsPlain(): bool
|
||||||
{
|
{
|
||||||
/** @var BaseModel $oEditObject */
|
/** @var BaseModel|Content $oEditObject */
|
||||||
$oEditObject = $this->getShopConfig()->getActiveView()->getViewDataElement( "edit" );
|
$oEditObject = $this->getShopConfig()->getActiveView()->getViewDataElement( "edit" );
|
||||||
return $oEditObject instanceof Content && $oEditObject->isPlain();
|
return $oEditObject instanceof Content && $oEditObject->isPlain();
|
||||||
}
|
}
|
||||||
@ -109,7 +111,6 @@ class Loader
|
|||||||
$configuration->getConfig(),
|
$configuration->getConfig(),
|
||||||
file_get_contents(__DIR__.'/../../../out/scripts/init.js')
|
file_get_contents(__DIR__.'/../../../out/scripts/init.js')
|
||||||
);
|
);
|
||||||
dumpvar($sInit.PHP_EOL, 1);
|
|
||||||
$smarty = Registry::getUtilsView()->getSmarty();
|
$smarty = Registry::getUtilsView()->getSmarty();
|
||||||
$sSufix = ($smarty->_tpl_vars["__oxid_include_dynamic"]) ? '_dynamic' : '';
|
$sSufix = ($smarty->_tpl_vars["__oxid_include_dynamic"]) ? '_dynamic' : '';
|
||||||
|
|
||||||
@ -123,7 +124,7 @@ dumpvar($sInit.PHP_EOL, 1);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \oxFileException
|
* @throws FileException
|
||||||
*/
|
*/
|
||||||
protected function registerIncludes(): void
|
protected function registerIncludes(): void
|
||||||
{
|
{
|
||||||
|
@ -51,13 +51,5 @@ class ExternalPlugins extends AbstractOption
|
|||||||
);
|
);
|
||||||
|
|
||||||
return '{ '.$list.' }';
|
return '{ '.$list.' }';
|
||||||
|
|
||||||
// plugins for newsletter emails
|
|
||||||
if ( $this->getActiveClassName() === "newsletter_main" ) {
|
|
||||||
$aPlugins["legacyoutput"] = "";
|
|
||||||
$aPlugins["fullpage"] = "fullpage";
|
|
||||||
}
|
|
||||||
|
|
||||||
return 350;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -46,9 +46,7 @@ class Language extends AbstractOption
|
|||||||
"nl" => "nl",
|
"nl" => "nl",
|
||||||
"ru" => "ru"
|
"ru" => "ru"
|
||||||
);
|
);
|
||||||
$sLang = $aLang[ $oLang->getLanguageAbbr( $oLang->getTplLanguage() ) ] ?? "en";
|
return $aLang[ $oLang->getLanguageAbbr( $oLang->getTplLanguage() ) ] ?? "en";
|
||||||
|
|
||||||
return $sLang;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mustQuote(): bool
|
public function mustQuote(): bool
|
||||||
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
||||||
|
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
|
||||||
|
|
||||||
class Promotion extends AbstractOption
|
class Promotion extends AbstractOption
|
||||||
{
|
{
|
||||||
protected string $key = 'promotion';
|
protected string $key = 'promotion';
|
||||||
|
@ -26,7 +26,6 @@ namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
|||||||
use O3\TinyMCE\Application\Core\TinyMCE\PluginList;
|
use O3\TinyMCE\Application\Core\TinyMCE\PluginList;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\PluginInterface;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\PluginInterface;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Quickbars;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Quickbars;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Utils;
|
|
||||||
|
|
||||||
class QuickbarsInsertToolbar extends AbstractOption
|
class QuickbarsInsertToolbar extends AbstractOption
|
||||||
{
|
{
|
||||||
|
@ -23,8 +23,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
||||||
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
|
|
||||||
|
|
||||||
class Selector extends AbstractOption
|
class Selector extends AbstractOption
|
||||||
{
|
{
|
||||||
protected string $key = 'selector';
|
protected string $key = 'selector';
|
||||||
|
@ -24,8 +24,6 @@ declare(strict_types=1);
|
|||||||
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
|
||||||
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
|
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
|
||||||
use OxidEsales\Eshop\Core\UtilsServer;
|
|
||||||
|
|
||||||
class Skin extends AbstractOption
|
class Skin extends AbstractOption
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ class Toolbar extends AbstractOption
|
|||||||
$this->getMultiLineToolbar($toolbarList);
|
$this->getMultiLineToolbar($toolbarList);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getSingleLineToolbar($toolbarList)
|
protected function getSingleLineToolbar($toolbarList): string
|
||||||
{
|
{
|
||||||
$all = [];
|
$all = [];
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ class Toolbar extends AbstractOption
|
|||||||
return $toolbarElements . ' | ' . $pluginToolbarElements;
|
return $toolbarElements . ' | ' . $pluginToolbarElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getMultiLineToolbar($toolbarList)
|
protected function getMultiLineToolbar($toolbarList): string
|
||||||
{
|
{
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ class Toolbar extends AbstractOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pluginList = oxNew(PluginList::class);
|
$pluginList = oxNew(PluginList::class);
|
||||||
$list[] = $pluginToolbarElements = implode(
|
$list[] = implode(
|
||||||
' | ',
|
' | ',
|
||||||
array_filter(
|
array_filter(
|
||||||
array_map(
|
array_map(
|
||||||
|
@ -30,7 +30,6 @@ use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Charmap;
|
|||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Code;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Code;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\FullPage;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\FullPage;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\FullScreen;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\FullScreen;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Hr;
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Image;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Image;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Legacyoutput;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Legacyoutput;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Link;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Link;
|
||||||
@ -38,7 +37,6 @@ use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Lists;
|
|||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Media;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Media;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Nonbreaking;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Nonbreaking;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Pagebreak;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Pagebreak;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Paste;
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Preview;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Preview;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Quickbars;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Quickbars;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Roxy;
|
use O3\TinyMCE\Application\Core\TinyMCE\Plugins\Roxy;
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
|
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Core\Exception\FileException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
class FullScreen extends AbstractPlugin
|
class FullScreen extends AbstractPlugin
|
||||||
@ -39,6 +40,10 @@ class FullScreen extends AbstractPlugin
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|null
|
||||||
|
* @throws FileException
|
||||||
|
*/
|
||||||
public function getScriptPath(): ?string
|
public function getScriptPath(): ?string
|
||||||
{
|
{
|
||||||
return Registry::getConfig()->getActiveView()->getViewConfig()->getModuleUrl(
|
return Registry::getConfig()->getActiveView()->getViewConfig()->getModuleUrl(
|
||||||
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
|
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Core\Exception\FileException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
class Roxy extends AbstractPlugin
|
class Roxy extends AbstractPlugin
|
||||||
@ -32,6 +33,10 @@ class Roxy extends AbstractPlugin
|
|||||||
return 'roxy';
|
return 'roxy';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|null
|
||||||
|
* @throws FileException
|
||||||
|
*/
|
||||||
public function getScriptPath(): ?string
|
public function getScriptPath(): ?string
|
||||||
{
|
{
|
||||||
return Registry::getConfig()->getActiveView()->getViewConfig()->getModuleUrl(
|
return Registry::getConfig()->getActiveView()->getViewConfig()->getModuleUrl(
|
||||||
|
@ -26,15 +26,11 @@ namespace O3\TinyMCE\Application\Core\TinyMCE;
|
|||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Align;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Align;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blockquote;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blockquote;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Color;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Color;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\CopyPaste;
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Font;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Font;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blocks;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blocks;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Indent;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Indent;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Lists;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Lists;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\RemoveFormat;
|
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\RemoveFormat;
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Subscript;
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Superscript;
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Undo;
|
|
||||||
|
|
||||||
class ToolbarList
|
class ToolbarList
|
||||||
{
|
{
|
||||||
|
@ -24,12 +24,14 @@ declare(strict_types=1);
|
|||||||
namespace O3\TinyMCE\Application\Core;
|
namespace O3\TinyMCE\Application\Core;
|
||||||
|
|
||||||
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
|
use O3\TinyMCE\Application\Core\TinyMCE\Loader;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\FileException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
class ViewConfig extends ViewConfig_parent
|
class ViewConfig extends ViewConfig_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
|
* @throws FileException
|
||||||
*/
|
*/
|
||||||
public function loadTinyMce(): string
|
public function loadTinyMce(): string
|
||||||
{
|
{
|
||||||
|
@ -31,6 +31,6 @@ $aLang = array(
|
|||||||
'HELP_SHOP_MODULE_aTinyMCE_classes' => 'für die Benutzung von TinyMCE in eigenen Admin Views muss hier die entsprechende Controllerklasse eingetragen werden, dann wird für jedes Textarea je ein Editor erzeugt',
|
'HELP_SHOP_MODULE_aTinyMCE_classes' => 'für die Benutzung von TinyMCE in eigenen Admin Views muss hier die entsprechende Controllerklasse eingetragen werden, dann wird für jedes Textarea je ein Editor erzeugt',
|
||||||
'SHOP_MODULE_sTinyMCE_apikey' => 'optionaler API-Key aus Ihrer TinyMCE Registrierung',
|
'SHOP_MODULE_sTinyMCE_apikey' => 'optionaler API-Key aus Ihrer TinyMCE Registrierung',
|
||||||
'SHOP_MODULE_aTinyMCE_extjs' => '<h3>Externe JS Abhängigkeiten</h3>',
|
'SHOP_MODULE_aTinyMCE_extjs' => '<h3>Externe JS Abhängigkeiten</h3>',
|
||||||
'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'Komplette URL mit http:// bzw https:// falls der Shop über HTTPS läuft.',
|
'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'Komplette URL mit https://.',
|
||||||
'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Einstellungen & Plugins',
|
'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Einstellungen & Plugins',
|
||||||
);
|
);
|
||||||
|
@ -31,6 +31,6 @@ $aLang = array(
|
|||||||
'HELP_SHOP_MODULE_aTinyMCE_classes' => 'if you want to use TinyMCE for your custom controllers, you need to enter their class names here.',
|
'HELP_SHOP_MODULE_aTinyMCE_classes' => 'if you want to use TinyMCE for your custom controllers, you need to enter their class names here.',
|
||||||
'SHOP_MODULE_sTinyMCE_apikey' => 'optional API key from your TinyMCE registration',
|
'SHOP_MODULE_sTinyMCE_apikey' => 'optional API key from your TinyMCE registration',
|
||||||
'SHOP_MODULE_aTinyMCE_extjs' => '<h3>external JS dependencies</h3> (e.g. for plugins)',
|
'SHOP_MODULE_aTinyMCE_extjs' => '<h3>external JS dependencies</h3> (e.g. for plugins)',
|
||||||
'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'full URL with http:// or https:// if your shop runs with HTTPS.',
|
'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'Full URL with https://.',
|
||||||
'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Settings & Plugins',
|
'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Settings & Plugins',
|
||||||
);
|
);
|
Loading…
Reference in New Issue
Block a user