update to 1.0.1
This commit is contained in:
parent
a41c6139a7
commit
fb2e264928
75
README.md
75
README.md
|
@ -1,36 +1,41 @@
|
||||||
# TinyMCE for OXID eShop CE 4.6 - 4.7
|
# TinyMCE 3.5.8 for OXID eShop CE 4.6+
|
||||||
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL.
|
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL.
|
||||||
More information here :http://www.tinymce.com/
|
More information here: http://www.tinymce.com/
|
||||||
and here: https://github.com/tinymce
|
and here: https://github.com/tinymce
|
||||||
|
|
||||||
|
## module version 1.0.1 from 2012-12-19
|
||||||
## INSTALLATION
|
### changelog
|
||||||
### upload over ftp/ssh:
|
* destroying smarty tags fixed
|
||||||
copy the content of the "copy_this" folder into the shop root directory
|
* tinyMCE 3.5.8 update
|
||||||
**if you are uploading files via ftp, switch to the binary transfer mode**
|
* module settings for relative urls and editor height added
|
||||||
### ssh shell + git client:
|
|
||||||
navigate into the modules directory and create a "hdi" directory with a "vendormetadata.php" file inside it (can be empty yet)
|
## INSTALLATION
|
||||||
clone remote git repo and switch to the "module" branch.
|
### upload over ftp/ssh:
|
||||||
this commands works for debian and centos:
|
copy the content of the "copy_this" folder into the shop root directory
|
||||||
<pre>mkdir hdi
|
**if you are uploading files via ftp, switch to the binary transfer mode**
|
||||||
cd hdi/
|
### ssh shell + git client:
|
||||||
wget https://raw.github.com/vanilla-thunder/hdi-tinymce/master/copy_this/modules/hdi/vendormetadata.php
|
navigate into the modules directory and create a "hdi" directory with a "vendormetadata.php" file inside it (can be empty yet)
|
||||||
git clone git://github.com/vanilla-thunder/hdi-tinymce.git
|
clone remote git repo and switch to the "module" branch.
|
||||||
cd hdi-tinymce/
|
this commands works for debian and centos:
|
||||||
git checkout module
|
<pre>mkdir hdi
|
||||||
</pre>
|
cd hdi/
|
||||||
|
wget https://raw.github.com/vanilla-thunder/hdi-tinymce/master/copy_this/modules/hdi/vendormetadata.php
|
||||||
|
git clone git://github.com/vanilla-thunder/hdi-tinymce.git
|
||||||
## LICENSE AGREEMENT
|
cd hdi-tinymce/
|
||||||
HDI TinyMCE
|
git checkout module
|
||||||
Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
</pre>
|
||||||
info: info@heiner-direct.com
|
|
||||||
|
|
||||||
This program is free software;
|
## LICENSE AGREEMENT
|
||||||
you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
HDI TinyMCE
|
||||||
either version 3 of the License, or (at your option) any later version.
|
Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
||||||
|
info: info@heiner-direct.com
|
||||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
This program is free software;
|
||||||
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
||||||
|
either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -1,83 +1,84 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* HDI TinyMCE
|
/**
|
||||||
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
* HDI TinyMCE
|
||||||
* info: info@heiner-direct.com
|
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
||||||
*
|
* info: info@heiner-direct.com
|
||||||
* This program is free software;
|
*
|
||||||
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
* This program is free software;
|
||||||
* either version 3 of the License, or (at your option) any later version.
|
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
||||||
*
|
* either version 3 of the License, or (at your option) any later version.
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
*
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
*/
|
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
||||||
$sMetadataVersion = '1.0';
|
*/
|
||||||
$aModule = array(
|
$sMetadataVersion = '1.0';
|
||||||
'id' => 'hdi-tinymce',
|
$aModule = array(
|
||||||
'title' => '<strong style="color:#006a8c;border: 1px solid #e30061;padding: 0 2px;background:white;">HDI</strong> <strong>TinyMCE 3.5.7</strong>',
|
'id' => 'hdi-tinymce',
|
||||||
'description' => 'backend implementation of TinyMCE Editor<br/>visit <a href="http://www.tinymce.com/" target="_blank">http://www.tinymce.com/</a> for more details',
|
'title' => '<strong style="color:#006a8c;border: 1px solid #e30061;padding: 0 2px;background:white;">HDI</strong> <strong>TinyMCE 3.5.8</strong>',
|
||||||
'thumbnail' => 'hdi.png',
|
'description' => 'backend implementation of TinyMCE Editor<br/>visit <a href="http://www.tinymce.com/" target="_blank">http://www.tinymce.com/</a> for more details',
|
||||||
'version' => '3.5.7',
|
'thumbnail' => 'hdi.png',
|
||||||
'author' => 'Marat Bedoev, HEINER DIRECT GmbH & Co. KG',
|
'version' => '1.0.1 (2012-12-19)</dd><dt>newest version</dt><dd><img src="https://raw.github.com/vanilla-thunder/hdi-tinymce/module/version.jpg" /><br/>
|
||||||
'email' => 'info@heiner-direct.com',
|
<a style="display: inline-block; padding: 1px 15px; background: #f0f0f0; border: 1px solid gray" href="https://github.com/vanilla-thunder/hdi-tinymce/" target="_blank">info</a> <a style="display: inline-block; padding: 1px 15px; background: #f0f0f0; border: 1px solid gray" href="https://github.com/vanilla-thunder/hdi-tinymce/archive/master.zip">download</a>',
|
||||||
'url' => 'http://www.heiner-direct.com',
|
'author' => 'Marat Bedoev, HEINER DIRECT GmbH & Co. KG',
|
||||||
'extend' => array(
|
'email' => 'info@heiner-direct.com',
|
||||||
'article_main' => 'hdi/hdi-tinymce/tinymce',
|
'url' => 'http://www.heiner-direct.com',
|
||||||
'category_text' => 'hdi/hdi-tinymce/tinymce',
|
'extend' => array(
|
||||||
'content_main' => 'hdi/hdi-tinymce/tinymce',
|
'article_main' => 'hdi/hdi-tinymce/tinymce',
|
||||||
'newsletter_main' => 'hdi/hdi-tinymce/tinymce',
|
'category_text' => 'hdi/hdi-tinymce/tinymce',
|
||||||
'news_text' => 'hdi/hdi-tinymce/tinymce'
|
'content_main' => 'hdi/hdi-tinymce/tinymce',
|
||||||
),
|
'newsletter_main' => 'hdi/hdi-tinymce/tinymce',
|
||||||
'templates' => array(
|
'news_text' => 'hdi/hdi-tinymce/tinymce'
|
||||||
'tinymce.tpl' => 'hdi/hdi-tinymce/out/tpl/tinymce.tpl',
|
),
|
||||||
),
|
'templates' => array(
|
||||||
'blocks' => array(
|
'tinymce.tpl' => 'hdi/hdi-tinymce/out/tpl/tinymce.tpl',
|
||||||
array('template' => 'bottomnaviitem.tpl', 'block' => 'admin_bottomnaviitem', 'file' => 'admin_bottomnaviitem.tpl')
|
),
|
||||||
),
|
'blocks' => array(
|
||||||
'settings' => array(
|
array('template' => 'bottomnaviitem.tpl', 'block' => 'admin_bottomnaviitem', 'file' => 'admin_bottomnaviitem.tpl')
|
||||||
/* enabling tinyMCE for this classes */
|
),
|
||||||
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_article_main', 'type' => 'bool', 'value' => true, 'position' => 1),
|
'settings' => array(
|
||||||
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_category_text', 'type' => 'bool', 'value' => true, 'position' => 2),
|
/* enabling tinyMCE for this classes */
|
||||||
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_content_main', 'type' => 'bool', 'value' => true, 'position' => 3),
|
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_article_main', 'type' => 'bool', 'value' => true, 'position' => 1),
|
||||||
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_newsletter_main', 'type' => 'bool', 'value' => true, 'position' => 4),
|
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_category_text', 'type' => 'bool', 'value' => true, 'position' => 2),
|
||||||
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_news_text', 'type' => 'bool', 'value' => true, 'position' => 5),
|
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_content_main', 'type' => 'bool', 'value' => true, 'position' => 3),
|
||||||
/* plugins */
|
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_newsletter_main', 'type' => 'bool', 'value' => true, 'position' => 4),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_autolink', 'type' => 'bool', 'value' => true, 'position' => 1),
|
array('group' => 'tinyMceMain', 'name' => 'bTinyMCE_news_text', 'type' => 'bool', 'value' => true, 'position' => 5),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_ists', 'type' => 'bool', 'value' => true, 'position' => 2),
|
/* TinyMCE Settings */
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_pagebreak', 'type' => 'bool', 'value' => true, 'position' => 3),
|
array('group' => 'tinyMceSettings', 'name' => 'sTinyMCE_height', 'type' => 'str', 'value' => '400', 'position' => 1),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_style', 'type' => 'bool', 'value' => true, 'position' => 4),
|
array('group' => 'tinyMceSettings', 'name' => 'bTinyMCE_relative_urls', 'type' => 'bool', 'value' => true, 'position' => 2),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_layer', 'type' => 'bool', 'value' => true, 'position' => 5),
|
/* plugins */
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_table', 'type' => 'bool', 'value' => true, 'position' => 6),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_autolink', 'type' => 'bool', 'value' => true, 'position' => 1),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_save', 'type' => 'bool', 'value' => true, 'position' => 7),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_ists', 'type' => 'bool', 'value' => true, 'position' => 2),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advhr', 'type' => 'bool', 'value' => true, 'position' => 8),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_pagebreak', 'type' => 'bool', 'value' => true, 'position' => 3),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advimage', 'type' => 'bool', 'value' => true, 'position' => 9),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_style', 'type' => 'bool', 'value' => true, 'position' => 4),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advlink', 'type' => 'bool', 'value' => true, 'position' => 10),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_layer', 'type' => 'bool', 'value' => true, 'position' => 5),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_emotions', 'type' => 'bool', 'value' => true, 'position' => 11),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_table', 'type' => 'bool', 'value' => true, 'position' => 6),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_iespell', 'type' => 'bool', 'value' => true, 'position' => 12),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_save', 'type' => 'bool', 'value' => true, 'position' => 7),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_inlinepopups', 'type' => 'bool', 'value' => true, 'position' => 13),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advhr', 'type' => 'bool', 'value' => true, 'position' => 8),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_insertdatetime', 'type' => 'bool', 'value' => true, 'position' => 14),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advimage', 'type' => 'bool', 'value' => true, 'position' => 9),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_preview', 'type' => 'bool', 'value' => true, 'position' => 15),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advlink', 'type' => 'bool', 'value' => true, 'position' => 10),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_media', 'type' => 'bool', 'value' => true, 'position' => 16),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_emotions', 'type' => 'bool', 'value' => true, 'position' => 11),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_searchreplace', 'type' => 'bool', 'value' => true, 'position' => 17),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_iespell', 'type' => 'bool', 'value' => true, 'position' => 12),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_print', 'type' => 'bool', 'value' => true, 'position' => 18),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_inlinepopups', 'type' => 'bool', 'value' => true, 'position' => 13),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_contextmenu', 'type' => 'bool', 'value' => true, 'position' => 19),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_insertdatetime', 'type' => 'bool', 'value' => true, 'position' => 14),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_paste', 'type' => 'bool', 'value' => true, 'position' => 20),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_preview', 'type' => 'bool', 'value' => true, 'position' => 15),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_directionality', 'type' => 'bool', 'value' => true, 'position' => 21),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_media', 'type' => 'bool', 'value' => true, 'position' => 16),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_fullscreen', 'type' => 'bool', 'value' => true, 'position' => 22),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_searchreplace', 'type' => 'bool', 'value' => true, 'position' => 17),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_noneditable', 'type' => 'bool', 'value' => true, 'position' => 23),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_print', 'type' => 'bool', 'value' => true, 'position' => 18),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_visualchars', 'type' => 'bool', 'value' => true, 'position' => 24),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_contextmenu', 'type' => 'bool', 'value' => true, 'position' => 19),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_nonbreaking', 'type' => 'bool', 'value' => true, 'position' => 25),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_paste', 'type' => 'bool', 'value' => true, 'position' => 20),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_xhtmlxtras', 'type' => 'bool', 'value' => true, 'position' => 26),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_directionality', 'type' => 'bool', 'value' => true, 'position' => 21),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_template', 'type' => 'bool', 'value' => true, 'position' => 27),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_fullscreen', 'type' => 'bool', 'value' => true, 'position' => 22),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_wordcount', 'type' => 'bool', 'value' => true, 'position' => 28),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_noneditable', 'type' => 'bool', 'value' => true, 'position' => 23),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advlist', 'type' => 'bool', 'value' => true, 'position' => 29),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_visualchars', 'type' => 'bool', 'value' => true, 'position' => 24),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_autosave', 'type' => 'bool', 'value' => true, 'position' => 30),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_nonbreaking', 'type' => 'bool', 'value' => true, 'position' => 25),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_visualblocks', 'type' => 'bool', 'value' => true, 'position' => 31),
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_xhtmlxtras', 'type' => 'bool', 'value' => true, 'position' => 26),
|
||||||
array('group' => 'tinyMcePlugins', 'name' => 'sTinyMCE_customplugins', 'type' => 'str', 'value' => "", 'position' => 32)
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_template', 'type' => 'bool', 'value' => true, 'position' => 27),
|
||||||
)
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_wordcount', 'type' => 'bool', 'value' => true, 'position' => 28),
|
||||||
);
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_advlist', 'type' => 'bool', 'value' => true, 'position' => 29),
|
||||||
/* to do
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_autosave', 'type' => 'bool', 'value' => true, 'position' => 30),
|
||||||
* - implement relative_url setting into module settings
|
array('group' => 'tinyMcePlugins', 'name' => 'bTinyMCE_visualblocks', 'type' => 'bool', 'value' => true, 'position' => 31),
|
||||||
*
|
array('group' => 'tinyMcePlugins', 'name' => 'sTinyMCE_customplugins', 'type' => 'str', 'value' => "", 'position' => 32)
|
||||||
*/
|
)
|
||||||
|
);
|
|
@ -1,58 +1,61 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HDI MiniBanner
|
* HDI MiniBanner
|
||||||
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
||||||
* info: info@heiner-direct.com
|
* info: info@heiner-direct.com
|
||||||
*
|
*
|
||||||
* This program is free software;
|
* This program is free software;
|
||||||
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
||||||
* either version 3 of the License, or (at your option) any later version.
|
* either version 3 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
$sLangName = 'Deutsch';
|
$sLangName = 'Deutsch';
|
||||||
$aLang = array(
|
$aLang = array(
|
||||||
'charset' => 'UTF-8',
|
'charset' => 'UTF-8',
|
||||||
'SHOP_MODULE_GROUP_tinyMceMain' => '<style type="text/css">.groupExp a.rc b {font-size: medium; color: #ff3600; }.groupExp dt input.txt { width: 400px !important} .groupExp dl { display: block !important; } input.confinput {position: fixed; top: 20px; right: 70px; background: #008B2D; padding: 5px 20px; color: white; border: 1px solid black; cursor:pointer; font-size: 125%; } input.confinput:hover {outline: 3px solid #ff3600;}</style>Moduleinstellungen',
|
'SHOP_MODULE_GROUP_tinyMceMain' => '<style type="text/css">.groupExp a.rc b {font-size: medium; color: #ff3600; }.groupExp dt input.txt { width: 200px !important} .groupExp dl { display: block !important; } input.confinput {position: fixed; top: 20px; right: 70px; background: #008B2D; padding: 5px 20px; color: white; border: 1px solid black; cursor:pointer; font-size: 125%; } input.confinput:hover {outline: 3px solid #ff3600;}</style>Moduleinstellungen',
|
||||||
'SHOP_MODULE_bTinyMCE_article_main' => 'TinyMCE für die Artikelbeschreibung benutzen',
|
'SHOP_MODULE_bTinyMCE_article_main' => 'TinyMCE für die Artikelbeschreibung benutzen',
|
||||||
'SHOP_MODULE_bTinyMCE_category_text' => 'TinyMCE für die Kategorienbeschreibung benutzen',
|
'SHOP_MODULE_bTinyMCE_category_text' => 'TinyMCE für die Kategorienbeschreibung benutzen',
|
||||||
'SHOP_MODULE_bTinyMCE_content_main' => 'TinyMCE für die CMS Seiten benutzen',
|
'SHOP_MODULE_bTinyMCE_content_main' => 'TinyMCE für die CMS Seiten benutzen',
|
||||||
'SHOP_MODULE_bTinyMCE_newsletter_main' => 'TinyMCE für die Newsletter benutzen',
|
'SHOP_MODULE_bTinyMCE_newsletter_main' => 'TinyMCE für die Newsletter benutzen',
|
||||||
'SHOP_MODULE_bTinyMCE_news_text' => 'TinyMCE für die News benutzen',
|
'SHOP_MODULE_bTinyMCE_news_text' => 'TinyMCE für die News benutzen',
|
||||||
'SHOP_MODULE_GROUP_tinyMcePlugins' => 'TinyMCE Plugins</b></a> <a href="http://www.tinymce.com/wiki.php/Plugins" target="_blank" title="mehr Infos"><b>( ? )',
|
'SHOP_MODULE_GROUP_tinyMceSettings' => 'Editor Einxtellungen',
|
||||||
'SHOP_MODULE_bTinyMCE_autolink' => 'autolink',
|
'SHOP_MODULE_sTinyMCE_height'=>'Höhe des Editors (eine reine Zahl ohne Einheiten)',
|
||||||
'SHOP_MODULE_bTinyMCE_ists' => 'ists',
|
'SHOP_MODULE_bTinyMCE_relative_urls'=>'relative Urls verwenden',
|
||||||
'SHOP_MODULE_bTinyMCE_pagebreak' => 'pagebreak',
|
'SHOP_MODULE_GROUP_tinyMcePlugins' => 'TinyMCE Plugins</b></a> <a href="http://www.tinymce.com/wiki.php/Plugins" target="_blank" title="mehr Infos"><b>( ? )',
|
||||||
'SHOP_MODULE_bTinyMCE_style' => 'style',
|
'SHOP_MODULE_bTinyMCE_autolink' => 'autolink',
|
||||||
'SHOP_MODULE_bTinyMCE_layer' => 'layer',
|
'SHOP_MODULE_bTinyMCE_ists' => 'ists',
|
||||||
'SHOP_MODULE_bTinyMCE_table' => 'table',
|
'SHOP_MODULE_bTinyMCE_pagebreak' => 'pagebreak',
|
||||||
'SHOP_MODULE_bTinyMCE_save' => 'save',
|
'SHOP_MODULE_bTinyMCE_style' => 'style',
|
||||||
'SHOP_MODULE_bTinyMCE_advhr' => 'advhr',
|
'SHOP_MODULE_bTinyMCE_layer' => 'layer',
|
||||||
'SHOP_MODULE_bTinyMCE_advimage' => 'advimage',
|
'SHOP_MODULE_bTinyMCE_table' => 'table',
|
||||||
'SHOP_MODULE_bTinyMCE_advlink' => 'advlink',
|
'SHOP_MODULE_bTinyMCE_save' => 'save',
|
||||||
'SHOP_MODULE_bTinyMCE_emotions' => 'emotions',
|
'SHOP_MODULE_bTinyMCE_advhr' => 'advhr',
|
||||||
'SHOP_MODULE_bTinyMCE_iespell' => 'iespell',
|
'SHOP_MODULE_bTinyMCE_advimage' => 'advimage',
|
||||||
'SHOP_MODULE_bTinyMCE_inlinepopups' => 'inlinepopups',
|
'SHOP_MODULE_bTinyMCE_advlink' => 'advlink',
|
||||||
'SHOP_MODULE_bTinyMCE_insertdatetime' => 'insertdatetime',
|
'SHOP_MODULE_bTinyMCE_emotions' => 'emotions',
|
||||||
'SHOP_MODULE_bTinyMCE_preview' => 'preview',
|
'SHOP_MODULE_bTinyMCE_iespell' => 'iespell',
|
||||||
'SHOP_MODULE_bTinyMCE_media' => 'media',
|
'SHOP_MODULE_bTinyMCE_inlinepopups' => 'inlinepopups',
|
||||||
'SHOP_MODULE_bTinyMCE_searchreplace' => 'searchreplace',
|
'SHOP_MODULE_bTinyMCE_insertdatetime' => 'insertdatetime',
|
||||||
'SHOP_MODULE_bTinyMCE_print' => 'print',
|
'SHOP_MODULE_bTinyMCE_preview' => 'preview',
|
||||||
'SHOP_MODULE_bTinyMCE_contextmenu' => 'contextmenu',
|
'SHOP_MODULE_bTinyMCE_media' => 'media',
|
||||||
'SHOP_MODULE_bTinyMCE_paste' => 'paste',
|
'SHOP_MODULE_bTinyMCE_searchreplace' => 'searchreplace',
|
||||||
'SHOP_MODULE_bTinyMCE_directionality' => 'directionality',
|
'SHOP_MODULE_bTinyMCE_print' => 'print',
|
||||||
'SHOP_MODULE_bTinyMCE_fullscreen' => 'fullscreen',
|
'SHOP_MODULE_bTinyMCE_contextmenu' => 'contextmenu',
|
||||||
'SHOP_MODULE_bTinyMCE_noneditable' => 'noneditable',
|
'SHOP_MODULE_bTinyMCE_paste' => 'paste',
|
||||||
'SHOP_MODULE_bTinyMCE_visualchars' => 'visualchars',
|
'SHOP_MODULE_bTinyMCE_directionality' => 'directionality',
|
||||||
'SHOP_MODULE_bTinyMCE_nonbreaking' => 'nonbreaking',
|
'SHOP_MODULE_bTinyMCE_fullscreen' => 'fullscreen',
|
||||||
'SHOP_MODULE_bTinyMCE_xhtmlxtras' => 'xhtmlxtras',
|
'SHOP_MODULE_bTinyMCE_noneditable' => 'noneditable',
|
||||||
'SHOP_MODULE_bTinyMCE_template' => 'template',
|
'SHOP_MODULE_bTinyMCE_visualchars' => 'visualchars',
|
||||||
'SHOP_MODULE_bTinyMCE_wordcount' => 'wordcount',
|
'SHOP_MODULE_bTinyMCE_nonbreaking' => 'nonbreaking',
|
||||||
'SHOP_MODULE_bTinyMCE_advlist' => 'advlist',
|
'SHOP_MODULE_bTinyMCE_xhtmlxtras' => 'xhtmlxtras',
|
||||||
'SHOP_MODULE_bTinyMCE_autosave' => 'autosave',
|
'SHOP_MODULE_bTinyMCE_template' => 'template',
|
||||||
'SHOP_MODULE_bTinyMCE_visualblocks' => 'visualblocks',
|
'SHOP_MODULE_bTinyMCE_wordcount' => 'wordcount',
|
||||||
'SHOP_MODULE_sTinyMCE_customplugins' => 'eigene Plugins'
|
'SHOP_MODULE_bTinyMCE_advlist' => 'advlist',
|
||||||
|
'SHOP_MODULE_bTinyMCE_autosave' => 'autosave',
|
||||||
|
'SHOP_MODULE_bTinyMCE_visualblocks' => 'visualblocks',
|
||||||
|
'SHOP_MODULE_sTinyMCE_customplugins' => 'eigene Plugins'
|
||||||
);
|
);
|
|
@ -1,69 +1,67 @@
|
||||||
<!-- TinyMCE -->
|
<!-- TinyMCE -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var tinyMCE = null;
|
var tinyMCE = null;
|
||||||
function copyLongDescFromTinyMCE( sIdent ) {
|
function copyLongDescFromTinyMCE(sIdent) {
|
||||||
var editor = tinyMCE.get('editor_' + sIdent);
|
var editor = tinyMCE.get('editor_' + sIdent);
|
||||||
if ( tinyMCE && editor ) {
|
if (tinyMCE && editor) {
|
||||||
content = editor.getContent();
|
editor.show();
|
||||||
if (content != null) {
|
content = editor.getContent();
|
||||||
// restore smarty code that has been masked by htmlentities:
|
if (content !== null) {
|
||||||
/*var aSmartyParts = textVal.split( "["+"{" );
|
// restore smarty code that has been masked by htmlentities:
|
||||||
if ( aSmartyParts.length > 1 ) {
|
var aSmartyParts = content.split("[" + "{");
|
||||||
for ( var i=0; i<aSmartyParts.length; i++ ) {
|
|
||||||
aSubParts = aSmartyParts[i].split( "}"+"]" );
|
if (aSmartyParts.length > 1) {
|
||||||
if ( aSubParts.length > 1 )
|
for (var i = 0; i < aSmartyParts.length; i++) {
|
||||||
aSubParts[0] = aSubParts[0].replace( />/g, ">" ).replace( /</g, "<" ).replace( /&/g, "&" ).replace( /"/g, "\"" );
|
aSubParts = aSmartyParts[i].split("}" + "]");
|
||||||
aSmartyParts[i] = aSubParts.join( "}"+"]" );
|
if (aSubParts.length > 1)
|
||||||
}
|
aSubParts[0] = aSubParts[0].replace(/>/gi, ">").replace(/</gi, "<").replace(/&/gi, "&").replace(/"/gi, '"');
|
||||||
textVal = aSmartyParts.join( "["+"{" );
|
aSmartyParts[i] = aSubParts.join("}" + "]");
|
||||||
}*/
|
}
|
||||||
document.getElementsByName( 'editval['+ sIdent + ']' ).item(0).value = content;
|
content = aSmartyParts.join("[" + "{");
|
||||||
return true;
|
}
|
||||||
}
|
document.getElementsByName('editval[' + sIdent + ']').item(0).value = content;
|
||||||
}
|
return true;
|
||||||
|
}
|
||||||
return false;
|
}
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
var origCopyLongDesc = copyLongDesc;
|
|
||||||
copyLongDesc = function( sIdent ) {
|
var origCopyLongDesc = copyLongDesc;
|
||||||
if ( copyLongDescFromTinyMCE( sIdent ) ) return;
|
copyLongDesc = function(sIdent) {
|
||||||
origCopyLongDesc( sIdent );
|
if ( copyLongDescFromTinyMCE( sIdent ) ) return;
|
||||||
}
|
origCopyLongDesc( sIdent );
|
||||||
</script>
|
}
|
||||||
<script type="text/javascript" src="[{$oViewConf->getModuleUrl('hdi-tinymce','tiny_mce/tiny_mce.js') }]"></script>
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript" src="[{$oViewConf->getModuleUrl('hdi-tinymce','tiny_mce/tiny_mce.js') }]"></script>
|
||||||
tinyMCE.init({
|
<script type="text/javascript">
|
||||||
// General options
|
tinyMCE.init({
|
||||||
height : "400",
|
// General options
|
||||||
relative_urls : false,
|
height: '[{$cfg->getConfigParam("sTinyMCE_height")}]',
|
||||||
remove_script_host : false,
|
relative_urls: [{if $cfg->getConfigParam("bTinyMCE_relative_urls") == 1}]true[{else}]false[{/if}],
|
||||||
document_base_url : '[{$oViewConf->getBaseDir()}]',
|
remove_script_host: false,
|
||||||
mode : "textareas",
|
document_base_url: '[{$oViewConf->getBaseDir()}]',
|
||||||
theme : "advanced",
|
mode: "textareas",
|
||||||
plugins : "[{if $cfg->getConfigParam("bTinyMCE_autolink")}]autolink,[{/if}][{if $cfg->getConfigParam("bTinyMCE_lists")}]lists,[{/if}][{if $cfg->getConfigParam("bTinyMCE_pagebreak")}]pagebreak,[{/if}][{if $cfg->getConfigParam("bTinyMCE_style")}]style,[{/if}][{if $cfg->getConfigParam("bTinyMCE_layer")}]layer,[{/if}][{if $cfg->getConfigParam("bTinyMCE_table")}]table,[{/if}][{if $cfg->getConfigParam("bTinyMCE_save")}]save,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advhr")}]advhr,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advimage")}]advimage,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advlink")}]advlink,[{/if}][{if $cfg->getConfigParam("bTinyMCE_emotions")}]emotions,[{/if}][{if $cfg->getConfigParam("bTinyMCE_iespell")}]iespell,[{/if}][{if $cfg->getConfigParam("bTinyMCE_inlinepopups")}]inlinepopups,[{/if}][{if $cfg->getConfigParam("bTinyMCE_insertdatetime")}]insertdatetime,[{/if}][{if $cfg->getConfigParam("bTinyMCE_preview")}]preview,[{/if}][{if $cfg->getConfigParam("bTinyMCE_media")}]media,[{/if}][{if $cfg->getConfigParam("bTinyMCE_searchreplace")}]searchreplace,[{/if}][{if $cfg->getConfigParam("bTinyMCE_print")}]print,[{/if}][{if $cfg->getConfigParam("bTinyMCE_contextmenu")}]contextmenu,[{/if}][{if $cfg->getConfigParam("bTinyMCE_paste")}]paste,[{/if}][{if $cfg->getConfigParam("bTinyMCE_directionality")}]directionality,[{/if}][{if $cfg->getConfigParam("bTinyMCE_fullscreen")}]fullscreen,[{/if}][{if $cfg->getConfigParam("bTinyMCE_noneditable")}]noneditable,[{/if}][{if $cfg->getConfigParam("bTinyMCE_visualchars")}]visualchars,[{/if}][{if $cfg->getConfigParam("bTinyMCE_nonbreaking")}]nonbreaking,[{/if}][{if $cfg->getConfigParam("bTinyMCE_xhtmlxtras")}]xhtmlxtras,[{/if}][{if $cfg->getConfigParam("bTinyMCE_template")}]template,[{/if}][{if $cfg->getConfigParam("bTinyMCE_wordcount")}]wordcount,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advlist")}]advlist,[{/if}][{if $cfg->getConfigParam("bTinyMCE_autosave")}]autosave,[{/if}][{if $cfg->getConfigParam("bTinyMCE_visualblocks")}]visualblocks[{/if}][{if $cfg->getConfigParam("sTinyMCE_customplugins")}][{$cfg->getConfigParam("sTinyMCE_customplugins")}][{/if}]",
|
theme: "advanced",
|
||||||
|
plugins: "[{if $cfg->getConfigParam("bTinyMCE_autolink")}]autolink,[{/if}][{if $cfg->getConfigParam("bTinyMCE_lists")}]lists,[{/if}][{if $cfg->getConfigParam("bTinyMCE_pagebreak")}]pagebreak,[{/if}][{if $cfg->getConfigParam("bTinyMCE_style")}]style,[{/if}][{if $cfg->getConfigParam("bTinyMCE_layer")}]layer,[{/if}][{if $cfg->getConfigParam("bTinyMCE_table")}]table,[{/if}][{if $cfg->getConfigParam("bTinyMCE_save")}]save,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advhr")}]advhr,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advimage")}]advimage,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advlink")}]advlink,[{/if}][{if $cfg->getConfigParam("bTinyMCE_emotions")}]emotions,[{/if}][{if $cfg->getConfigParam("bTinyMCE_iespell")}]iespell,[{/if}][{if $cfg->getConfigParam("bTinyMCE_inlinepopups")}]inlinepopups,[{/if}][{if $cfg->getConfigParam("bTinyMCE_insertdatetime")}]insertdatetime,[{/if}][{if $cfg->getConfigParam("bTinyMCE_preview")}]preview,[{/if}][{if $cfg->getConfigParam("bTinyMCE_media")}]media,[{/if}][{if $cfg->getConfigParam("bTinyMCE_searchreplace")}]searchreplace,[{/if}][{if $cfg->getConfigParam("bTinyMCE_print")}]print,[{/if}][{if $cfg->getConfigParam("bTinyMCE_contextmenu")}]contextmenu,[{/if}][{if $cfg->getConfigParam("bTinyMCE_paste")}]paste,[{/if}][{if $cfg->getConfigParam("bTinyMCE_directionality")}]directionality,[{/if}][{if $cfg->getConfigParam("bTinyMCE_fullscreen")}]fullscreen,[{/if}][{if $cfg->getConfigParam("bTinyMCE_noneditable")}]noneditable,[{/if}][{if $cfg->getConfigParam("bTinyMCE_visualchars")}]visualchars,[{/if}][{if $cfg->getConfigParam("bTinyMCE_nonbreaking")}]nonbreaking,[{/if}][{if $cfg->getConfigParam("bTinyMCE_xhtmlxtras")}]xhtmlxtras,[{/if}][{if $cfg->getConfigParam("bTinyMCE_template")}]template,[{/if}][{if $cfg->getConfigParam("bTinyMCE_wordcount")}]wordcount,[{/if}][{if $cfg->getConfigParam("bTinyMCE_advlist")}]advlist,[{/if}][{if $cfg->getConfigParam("bTinyMCE_autosave")}]autosave,[{/if}][{if $cfg->getConfigParam("bTinyMCE_visualblocks")}]visualblocks[{/if}][{if $cfg->getConfigParam("sTinyMCE_customplugins")}][{$cfg->getConfigParam("sTinyMCE_customplugins")}][{/if}]",
|
||||||
|
// Theme options
|
||||||
// Theme options
|
theme_advanced_buttons1: "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect",
|
||||||
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect",
|
theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
||||||
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
||||||
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks,|,image,insertimage,|,dDesc",
|
||||||
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks,|,image,insertimage,|,dDesc",
|
theme_advanced_toolbar_location: "top",
|
||||||
theme_advanced_toolbar_location : "top",
|
theme_advanced_toolbar_align: "left",
|
||||||
theme_advanced_toolbar_align : "left",
|
theme_advanced_statusbar_location: "bottom",
|
||||||
theme_advanced_statusbar_location : "bottom",
|
theme_advanced_resizing: true,
|
||||||
theme_advanced_resizing : true,
|
// Example content CSS (should be your site CSS)
|
||||||
|
//content_css : "modules/tinymce/style.css",
|
||||||
// Example content CSS (should be your site CSS)
|
|
||||||
//content_css : "modules/tinymce/style.css",
|
// Drop lists for link/image/media/template dialogs
|
||||||
|
//template_external_list_url : "lists/template_list.js",
|
||||||
// Drop lists for link/image/media/template dialogs
|
//external_link_list_url : "lists/link_list.js",
|
||||||
//template_external_list_url : "lists/template_list.js",
|
//external_image_list_url : "lists/image_list.js",
|
||||||
//external_link_list_url : "lists/link_list.js",
|
//media_external_list_url : "lists/media_list.js",
|
||||||
//external_image_list_url : "lists/image_list.js",
|
});
|
||||||
//media_external_list_url : "lists/media_list.js",
|
</script>
|
||||||
});
|
<textarea id='editor_[{$sField}]' style='width:[{$iWidth}]; height:[{$iHeight}];'>[{$sContent}]</textarea>
|
||||||
</script>
|
[{assign var=tinyMCE value=1 }]
|
||||||
<textarea id='editor_[{$sField}]' style='width:[{$iWidth}]; height:[{$iHeight}];'>[{$sContent}]</textarea>
|
<!-- /TinyMCE -->
|
||||||
[{assign var=tinyMCE value=1 }]
|
|
||||||
<!-- /TinyMCE -->
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
|
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;a.onKeyDown.addToTop(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});if(tinyMCE.isIE){return}a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng(true).cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}if(n.nodeType==3){a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f>=2?f-2:0);a.setEnd(n,f>=1?f-1:0);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}var m=a.toString();if(m.charAt(m.length-1)=="."){a.setEnd(n,c-1)}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])&&!/^mailto:/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);i.nodeChanged();if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
|
|
@ -107,8 +107,8 @@
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// Move the selection one character backwards.
|
// Move the selection one character backwards.
|
||||||
r.setStart(endContainer, end - 2);
|
r.setStart(endContainer, end >= 2 ? end - 2 : 0);
|
||||||
r.setEnd(endContainer, end - 1);
|
r.setEnd(endContainer, end >= 1 ? end - 1 : 0);
|
||||||
end -= 1;
|
end -= 1;
|
||||||
|
|
||||||
// Loop until one of the following is found: a blank space, , delimeter, (end-2) >= 0
|
// Loop until one of the following is found: a blank space, , delimeter, (end-2) >= 0
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
tinyMCE.addI18n('en.autosave',{
|
|
||||||
restore_content: "Restore auto-saved content",
|
|
||||||
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
|
|
||||||
});
|
|
|
@ -1,139 +1,139 @@
|
||||||
/**
|
/**
|
||||||
* editor_plugin_src.js
|
* editor_plugin_src.js
|
||||||
*
|
*
|
||||||
* Copyright 2009, Moxiecode Systems AB
|
* Copyright 2009, Moxiecode Systems AB
|
||||||
* Released under LGPL License.
|
* Released under LGPL License.
|
||||||
*
|
*
|
||||||
* License: http://tinymce.moxiecode.com/license
|
* License: http://tinymce.moxiecode.com/license
|
||||||
* Contributing: http://tinymce.moxiecode.com/contributing
|
* Contributing: http://tinymce.moxiecode.com/contributing
|
||||||
*
|
*
|
||||||
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
||||||
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
||||||
*
|
*
|
||||||
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
||||||
* not apart of the newer specifications for HTML and XHTML.
|
* not apart of the newer specifications for HTML and XHTML.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function(tinymce) {
|
(function(tinymce) {
|
||||||
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
||||||
tinymce.onAddEditor.addToTop(function(tinymce, editor) {
|
tinymce.onAddEditor.addToTop(function(tinymce, editor) {
|
||||||
editor.settings.inline_styles = false;
|
editor.settings.inline_styles = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create the legacy ouput plugin
|
// Create the legacy ouput plugin
|
||||||
tinymce.create('tinymce.plugins.LegacyOutput', {
|
tinymce.create('tinymce.plugins.LegacyOutput', {
|
||||||
init : function(editor) {
|
init : function(editor) {
|
||||||
editor.onInit.add(function() {
|
editor.onInit.add(function() {
|
||||||
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
||||||
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
||||||
schema = editor.schema;
|
schema = editor.schema;
|
||||||
|
|
||||||
// Override some internal formats to produce legacy elements and attributes
|
// Override some internal formats to produce legacy elements and attributes
|
||||||
editor.formatter.register({
|
editor.formatter.register({
|
||||||
// Change alignment formats to use the deprecated align attribute
|
// Change alignment formats to use the deprecated align attribute
|
||||||
alignleft : {selector : alignElements, attributes : {align : 'left'}},
|
alignleft : {selector : alignElements, attributes : {align : 'left'}},
|
||||||
aligncenter : {selector : alignElements, attributes : {align : 'center'}},
|
aligncenter : {selector : alignElements, attributes : {align : 'center'}},
|
||||||
alignright : {selector : alignElements, attributes : {align : 'right'}},
|
alignright : {selector : alignElements, attributes : {align : 'right'}},
|
||||||
alignfull : {selector : alignElements, attributes : {align : 'justify'}},
|
alignfull : {selector : alignElements, attributes : {align : 'justify'}},
|
||||||
|
|
||||||
// Change the basic formatting elements to use deprecated element types
|
// Change the basic formatting elements to use deprecated element types
|
||||||
bold : [
|
bold : [
|
||||||
{inline : 'b', remove : 'all'},
|
{inline : 'b', remove : 'all'},
|
||||||
{inline : 'strong', remove : 'all'},
|
{inline : 'strong', remove : 'all'},
|
||||||
{inline : 'span', styles : {fontWeight : 'bold'}}
|
{inline : 'span', styles : {fontWeight : 'bold'}}
|
||||||
|
],
|
||||||
|
italic : [
|
||||||
|
{inline : 'i', remove : 'all'},
|
||||||
|
{inline : 'em', remove : 'all'},
|
||||||
|
{inline : 'span', styles : {fontStyle : 'italic'}}
|
||||||
|
],
|
||||||
|
underline : [
|
||||||
|
{inline : 'u', remove : 'all'},
|
||||||
|
{inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
|
||||||
|
],
|
||||||
|
strikethrough : [
|
||||||
|
{inline : 'strike', remove : 'all'},
|
||||||
|
{inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
|
||||||
],
|
],
|
||||||
italic : [
|
|
||||||
{inline : 'i', remove : 'all'},
|
// Change font size and font family to use the deprecated font element
|
||||||
{inline : 'em', remove : 'all'},
|
fontname : {inline : 'font', attributes : {face : '%value'}},
|
||||||
{inline : 'span', styles : {fontStyle : 'italic'}}
|
fontsize : {
|
||||||
],
|
inline : 'font',
|
||||||
underline : [
|
attributes : {
|
||||||
{inline : 'u', remove : 'all'},
|
size : function(vars) {
|
||||||
{inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
|
return tinymce.inArray(fontSizes, vars.value) + 1;
|
||||||
],
|
}
|
||||||
strikethrough : [
|
}
|
||||||
{inline : 'strike', remove : 'all'},
|
},
|
||||||
{inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
|
|
||||||
],
|
// Setup font elements for colors as well
|
||||||
|
forecolor : {inline : 'font', attributes : {color : '%value'}},
|
||||||
// Change font size and font family to use the deprecated font element
|
hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
|
||||||
fontname : {inline : 'font', attributes : {face : '%value'}},
|
});
|
||||||
fontsize : {
|
|
||||||
inline : 'font',
|
// Check that deprecated elements are allowed if not add them
|
||||||
attributes : {
|
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
||||||
size : function(vars) {
|
schema.addValidElements(name + '[*]');
|
||||||
return tinymce.inArray(fontSizes, vars.value) + 1;
|
});
|
||||||
}
|
|
||||||
}
|
// Add font element if it's missing
|
||||||
},
|
if (!schema.getElementRule("font"))
|
||||||
|
schema.addValidElements("font[face|size|color|style]");
|
||||||
// Setup font elements for colors as well
|
|
||||||
forecolor : {inline : 'font', attributes : {color : '%value'}},
|
// Add the missing and depreacted align attribute for the serialization engine
|
||||||
hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
|
tinymce.each(alignElements.split(','), function(name) {
|
||||||
});
|
var rule = schema.getElementRule(name), found;
|
||||||
|
|
||||||
// Check that deprecated elements are allowed if not add them
|
if (rule) {
|
||||||
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
if (!rule.attributes.align) {
|
||||||
schema.addValidElements(name + '[*]');
|
rule.attributes.align = {};
|
||||||
});
|
rule.attributesOrder.push('align');
|
||||||
|
}
|
||||||
// Add font element if it's missing
|
}
|
||||||
if (!schema.getElementRule("font"))
|
});
|
||||||
schema.addValidElements("font[face|size|color|style]");
|
|
||||||
|
// Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
|
||||||
// Add the missing and depreacted align attribute for the serialization engine
|
editor.onNodeChange.add(function(editor, control_manager) {
|
||||||
tinymce.each(alignElements.split(','), function(name) {
|
var control, fontElm, fontName, fontSize;
|
||||||
var rule = schema.getElementRule(name), found;
|
|
||||||
|
// Find font element get it's name and size
|
||||||
if (rule) {
|
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
||||||
if (!rule.attributes.align) {
|
if (fontElm) {
|
||||||
rule.attributes.align = {};
|
fontName = fontElm.face;
|
||||||
rule.attributesOrder.push('align');
|
fontSize = fontElm.size;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
// Select/unselect the font name in droplist
|
||||||
|
if (control = control_manager.get('fontselect')) {
|
||||||
// Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
|
control.select(function(value) {
|
||||||
editor.onNodeChange.add(function(editor, control_manager) {
|
return value == fontName;
|
||||||
var control, fontElm, fontName, fontSize;
|
});
|
||||||
|
}
|
||||||
// Find font element get it's name and size
|
|
||||||
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
// Select/unselect the font size in droplist
|
||||||
if (fontElm) {
|
if (control = control_manager.get('fontsizeselect')) {
|
||||||
fontName = fontElm.face;
|
control.select(function(value) {
|
||||||
fontSize = fontElm.size;
|
var index = tinymce.inArray(fontSizes, value.fontSize);
|
||||||
}
|
|
||||||
|
return index + 1 == fontSize;
|
||||||
// Select/unselect the font name in droplist
|
});
|
||||||
if (control = control_manager.get('fontselect')) {
|
}
|
||||||
control.select(function(value) {
|
});
|
||||||
return value == fontName;
|
});
|
||||||
});
|
},
|
||||||
}
|
|
||||||
|
getInfo : function() {
|
||||||
// Select/unselect the font size in droplist
|
return {
|
||||||
if (control = control_manager.get('fontsizeselect')) {
|
longname : 'LegacyOutput',
|
||||||
control.select(function(value) {
|
author : 'Moxiecode Systems AB',
|
||||||
var index = tinymce.inArray(fontSizes, value.fontSize);
|
authorurl : 'http://tinymce.moxiecode.com',
|
||||||
|
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
|
||||||
return index + 1 == fontSize;
|
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
||||||
});
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
// Register plugin
|
||||||
|
tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
|
||||||
getInfo : function() {
|
})(tinymce);
|
||||||
return {
|
|
||||||
longname : 'LegacyOutput',
|
|
||||||
author : 'Moxiecode Systems AB',
|
|
||||||
authorurl : 'http://tinymce.moxiecode.com',
|
|
||||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
|
|
||||||
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Register plugin
|
|
||||||
tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
|
|
||||||
})(tinymce);
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -566,6 +566,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function pasteRows(rows, before) {
|
function pasteRows(rows, before) {
|
||||||
|
// If we don't have any rows in the clipboard, return immediately
|
||||||
|
if(!rows)
|
||||||
|
return;
|
||||||
|
|
||||||
var selectedRows = getSelectedRows(),
|
var selectedRows = getSelectedRows(),
|
||||||
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
||||||
targetCellCount = targetRow.cells.length;
|
targetCellCount = targetRow.cells.length;
|
||||||
|
|
|
@ -1,237 +1,254 @@
|
||||||
tinyMCEPopup.requireLangPack();
|
tinyMCEPopup.requireLangPack();
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
tinyMCEPopup.resizeToInnerSize();
|
tinyMCEPopup.resizeToInnerSize();
|
||||||
|
|
||||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||||
|
|
||||||
var inst = tinyMCEPopup.editor;
|
var inst = tinyMCEPopup.editor;
|
||||||
var dom = inst.dom;
|
var dom = inst.dom;
|
||||||
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
||||||
|
|
||||||
// Get table row data
|
// Get table row data
|
||||||
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
||||||
var align = dom.getAttrib(trElm, 'align');
|
var align = dom.getAttrib(trElm, 'align');
|
||||||
var valign = dom.getAttrib(trElm, 'valign');
|
var valign = dom.getAttrib(trElm, 'valign');
|
||||||
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
||||||
var className = dom.getAttrib(trElm, 'class');
|
var className = dom.getAttrib(trElm, 'class');
|
||||||
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
||||||
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||||
var id = dom.getAttrib(trElm, 'id');
|
var id = dom.getAttrib(trElm, 'id');
|
||||||
var lang = dom.getAttrib(trElm, 'lang');
|
var lang = dom.getAttrib(trElm, 'lang');
|
||||||
var dir = dom.getAttrib(trElm, 'dir');
|
var dir = dom.getAttrib(trElm, 'dir');
|
||||||
|
|
||||||
selectByValue(formObj, 'rowtype', rowtype);
|
selectByValue(formObj, 'rowtype', rowtype);
|
||||||
|
setActionforRowType(formObj, rowtype);
|
||||||
// Any cells selected
|
|
||||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
// Any cells selected
|
||||||
// Setup form
|
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
||||||
addClassesToList('class', 'table_row_styles');
|
// Setup form
|
||||||
TinyMCE_EditableSelects.init();
|
addClassesToList('class', 'table_row_styles');
|
||||||
|
TinyMCE_EditableSelects.init();
|
||||||
formObj.bgcolor.value = bgcolor;
|
|
||||||
formObj.backgroundimage.value = backgroundimage;
|
formObj.bgcolor.value = bgcolor;
|
||||||
formObj.height.value = height;
|
formObj.backgroundimage.value = backgroundimage;
|
||||||
formObj.id.value = id;
|
formObj.height.value = height;
|
||||||
formObj.lang.value = lang;
|
formObj.id.value = id;
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
formObj.lang.value = lang;
|
||||||
selectByValue(formObj, 'align', align);
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
selectByValue(formObj, 'valign', valign);
|
selectByValue(formObj, 'align', align);
|
||||||
selectByValue(formObj, 'class', className, true, true);
|
selectByValue(formObj, 'valign', valign);
|
||||||
selectByValue(formObj, 'dir', dir);
|
selectByValue(formObj, 'class', className, true, true);
|
||||||
|
selectByValue(formObj, 'dir', dir);
|
||||||
// Resize some elements
|
|
||||||
if (isVisible('backgroundimagebrowser'))
|
// Resize some elements
|
||||||
document.getElementById('backgroundimage').style.width = '180px';
|
if (isVisible('backgroundimagebrowser'))
|
||||||
|
document.getElementById('backgroundimage').style.width = '180px';
|
||||||
updateColor('bgcolor_pick', 'bgcolor');
|
|
||||||
} else
|
updateColor('bgcolor_pick', 'bgcolor');
|
||||||
tinyMCEPopup.dom.hide('action');
|
} else
|
||||||
}
|
tinyMCEPopup.dom.hide('action');
|
||||||
|
}
|
||||||
function updateAction() {
|
|
||||||
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
function updateAction() {
|
||||||
var action = getSelectValue(formObj, 'action');
|
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
||||||
|
var action = getSelectValue(formObj, 'action');
|
||||||
if (!AutoValidator.validate(formObj)) {
|
|
||||||
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
if (!AutoValidator.validate(formObj)) {
|
||||||
return false;
|
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
||||||
}
|
return false;
|
||||||
|
}
|
||||||
tinyMCEPopup.restoreSelection();
|
|
||||||
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
tinyMCEPopup.restoreSelection();
|
||||||
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
||||||
|
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
||||||
// Update all selected rows
|
|
||||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
// Update all selected rows
|
||||||
tinymce.each(tableElm.rows, function(tr) {
|
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
||||||
var i;
|
tinymce.each(tableElm.rows, function(tr) {
|
||||||
|
var i;
|
||||||
for (i = 0; i < tr.cells.length; i++) {
|
|
||||||
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
for (i = 0; i < tr.cells.length; i++) {
|
||||||
updateRow(tr, true);
|
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
||||||
return;
|
updateRow(tr, true);
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
inst.addVisual();
|
|
||||||
inst.nodeChanged();
|
inst.addVisual();
|
||||||
inst.execCommand('mceEndUndoLevel');
|
inst.nodeChanged();
|
||||||
tinyMCEPopup.close();
|
inst.execCommand('mceEndUndoLevel');
|
||||||
return;
|
tinyMCEPopup.close();
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
switch (action) {
|
|
||||||
case "row":
|
switch (action) {
|
||||||
updateRow(trElm);
|
case "row":
|
||||||
break;
|
updateRow(trElm);
|
||||||
|
break;
|
||||||
case "all":
|
|
||||||
var rows = tableElm.getElementsByTagName("tr");
|
case "all":
|
||||||
|
var rows = tableElm.getElementsByTagName("tr");
|
||||||
for (var i=0; i<rows.length; i++)
|
|
||||||
updateRow(rows[i], true);
|
for (var i=0; i<rows.length; i++)
|
||||||
|
updateRow(rows[i], true);
|
||||||
break;
|
|
||||||
|
break;
|
||||||
case "odd":
|
|
||||||
case "even":
|
case "odd":
|
||||||
var rows = tableElm.getElementsByTagName("tr");
|
case "even":
|
||||||
|
var rows = tableElm.getElementsByTagName("tr");
|
||||||
for (var i=0; i<rows.length; i++) {
|
|
||||||
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
for (var i=0; i<rows.length; i++) {
|
||||||
updateRow(rows[i], true, true);
|
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
||||||
}
|
updateRow(rows[i], true, true);
|
||||||
|
}
|
||||||
break;
|
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
inst.addVisual();
|
|
||||||
inst.nodeChanged();
|
inst.addVisual();
|
||||||
inst.execCommand('mceEndUndoLevel');
|
inst.nodeChanged();
|
||||||
tinyMCEPopup.close();
|
inst.execCommand('mceEndUndoLevel');
|
||||||
}
|
tinyMCEPopup.close();
|
||||||
|
}
|
||||||
function updateRow(tr_elm, skip_id, skip_parent) {
|
|
||||||
var inst = tinyMCEPopup.editor;
|
function updateRow(tr_elm, skip_id, skip_parent) {
|
||||||
var formObj = document.forms[0];
|
var inst = tinyMCEPopup.editor;
|
||||||
var dom = inst.dom;
|
var formObj = document.forms[0];
|
||||||
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
var dom = inst.dom;
|
||||||
var rowtype = getSelectValue(formObj, 'rowtype');
|
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
||||||
var doc = inst.getDoc();
|
var rowtype = getSelectValue(formObj, 'rowtype');
|
||||||
|
var doc = inst.getDoc();
|
||||||
// Update row element
|
|
||||||
if (!skip_id)
|
// Update row element
|
||||||
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
if (!skip_id)
|
||||||
|
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
||||||
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
|
||||||
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
||||||
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
||||||
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
||||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
||||||
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
||||||
|
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
||||||
// Clear deprecated attributes
|
|
||||||
dom.setAttrib(tr_elm, 'background', '');
|
// Clear deprecated attributes
|
||||||
dom.setAttrib(tr_elm, 'bgColor', '');
|
dom.setAttrib(tr_elm, 'background', '');
|
||||||
dom.setAttrib(tr_elm, 'height', '');
|
dom.setAttrib(tr_elm, 'bgColor', '');
|
||||||
|
dom.setAttrib(tr_elm, 'height', '');
|
||||||
// Set styles
|
|
||||||
tr_elm.style.height = getCSSSize(formObj.height.value);
|
// Set styles
|
||||||
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
tr_elm.style.height = getCSSSize(formObj.height.value);
|
||||||
|
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
||||||
if (formObj.backgroundimage.value != "")
|
|
||||||
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
if (formObj.backgroundimage.value != "")
|
||||||
else
|
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
||||||
tr_elm.style.backgroundImage = '';
|
else
|
||||||
|
tr_elm.style.backgroundImage = '';
|
||||||
// Setup new rowtype
|
|
||||||
if (curRowType != rowtype && !skip_parent) {
|
// Setup new rowtype
|
||||||
// first, clone the node we are working on
|
if (curRowType != rowtype && !skip_parent) {
|
||||||
var newRow = tr_elm.cloneNode(1);
|
// first, clone the node we are working on
|
||||||
|
var newRow = tr_elm.cloneNode(1);
|
||||||
// next, find the parent of its new destination (creating it if necessary)
|
|
||||||
var theTable = dom.getParent(tr_elm, "table");
|
// next, find the parent of its new destination (creating it if necessary)
|
||||||
var dest = rowtype;
|
var theTable = dom.getParent(tr_elm, "table");
|
||||||
var newParent = null;
|
var dest = rowtype;
|
||||||
for (var i = 0; i < theTable.childNodes.length; i++) {
|
var newParent = null;
|
||||||
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
for (var i = 0; i < theTable.childNodes.length; i++) {
|
||||||
newParent = theTable.childNodes[i];
|
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
||||||
}
|
newParent = theTable.childNodes[i];
|
||||||
|
}
|
||||||
if (newParent == null) {
|
|
||||||
newParent = doc.createElement(dest);
|
if (newParent == null) {
|
||||||
|
newParent = doc.createElement(dest);
|
||||||
if (theTable.firstChild.nodeName == 'CAPTION')
|
|
||||||
inst.dom.insertAfter(newParent, theTable.firstChild);
|
if (theTable.firstChild.nodeName == 'CAPTION')
|
||||||
else
|
inst.dom.insertAfter(newParent, theTable.firstChild);
|
||||||
theTable.insertBefore(newParent, theTable.firstChild);
|
else
|
||||||
}
|
theTable.insertBefore(newParent, theTable.firstChild);
|
||||||
|
}
|
||||||
// append the row to the new parent
|
|
||||||
newParent.appendChild(newRow);
|
// append the row to the new parent
|
||||||
|
newParent.appendChild(newRow);
|
||||||
// remove the original
|
|
||||||
tr_elm.parentNode.removeChild(tr_elm);
|
// remove the original
|
||||||
|
tr_elm.parentNode.removeChild(tr_elm);
|
||||||
// set tr_elm to the new node
|
|
||||||
tr_elm = newRow;
|
// set tr_elm to the new node
|
||||||
}
|
tr_elm = newRow;
|
||||||
|
}
|
||||||
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
|
||||||
}
|
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
||||||
|
}
|
||||||
function changedBackgroundImage() {
|
|
||||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
function changedBackgroundImage() {
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||||
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
|
||||||
|
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
|
||||||
}
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
|
}
|
||||||
function changedStyle() {
|
|
||||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
function changedStyle() {
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||||
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
if (st['background-image'])
|
|
||||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
if (st['background-image'])
|
||||||
else
|
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
||||||
formObj.backgroundimage.value = '';
|
else
|
||||||
|
formObj.backgroundimage.value = '';
|
||||||
if (st['height'])
|
|
||||||
formObj.height.value = trimSize(st['height']);
|
if (st['height'])
|
||||||
|
formObj.height.value = trimSize(st['height']);
|
||||||
if (st['background-color']) {
|
|
||||||
formObj.bgcolor.value = st['background-color'];
|
if (st['background-color']) {
|
||||||
updateColor('bgcolor_pick','bgcolor');
|
formObj.bgcolor.value = st['background-color'];
|
||||||
}
|
updateColor('bgcolor_pick','bgcolor');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function changedSize() {
|
|
||||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
function changedSize() {
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||||
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
var height = formObj.height.value;
|
|
||||||
if (height != "")
|
var height = formObj.height.value;
|
||||||
st['height'] = getCSSSize(height);
|
if (height != "")
|
||||||
else
|
st['height'] = getCSSSize(height);
|
||||||
st['height'] = "";
|
else
|
||||||
|
st['height'] = "";
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
|
||||||
}
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
|
}
|
||||||
function changedColor() {
|
|
||||||
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
function changedColor() {
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
||||||
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
st['background-color'] = formObj.bgcolor.value;
|
|
||||||
|
st['background-color'] = formObj.bgcolor.value;
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
|
||||||
}
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
|
}
|
||||||
tinyMCEPopup.onInit.add(init);
|
|
||||||
|
function changedRowType() {
|
||||||
|
var formObj = document.forms[0];
|
||||||
|
var rowtype = getSelectValue(formObj, 'rowtype');
|
||||||
|
|
||||||
|
setActionforRowType(formObj, rowtype);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setActionforRowType(formObj, rowtype) {
|
||||||
|
if (rowtype === "tbody") {
|
||||||
|
formObj.action.disabled = false;
|
||||||
|
} else {
|
||||||
|
selectByValue(formObj, 'action', "row");
|
||||||
|
formObj.action.disabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tinyMCEPopup.onInit.add(init);
|
||||||
|
|
|
@ -1,501 +1,501 @@
|
||||||
tinyMCEPopup.requireLangPack();
|
tinyMCEPopup.requireLangPack();
|
||||||
|
|
||||||
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
||||||
|
|
||||||
function insertTable() {
|
function insertTable() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||||
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
||||||
var html = '', capEl, elm;
|
var html = '', capEl, elm;
|
||||||
var cellLimit, rowLimit, colLimit;
|
var cellLimit, rowLimit, colLimit;
|
||||||
|
|
||||||
tinyMCEPopup.restoreSelection();
|
tinyMCEPopup.restoreSelection();
|
||||||
|
|
||||||
if (!AutoValidator.validate(formObj)) {
|
if (!AutoValidator.validate(formObj)) {
|
||||||
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
elm = dom.getParent(inst.selection.getNode(), 'table');
|
elm = dom.getParent(inst.selection.getNode(), 'table');
|
||||||
|
|
||||||
// Get form data
|
// Get form data
|
||||||
cols = formObj.elements['cols'].value;
|
cols = formObj.elements['cols'].value;
|
||||||
rows = formObj.elements['rows'].value;
|
rows = formObj.elements['rows'].value;
|
||||||
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
||||||
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
||||||
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
||||||
align = getSelectValue(formObj, "align");
|
align = getSelectValue(formObj, "align");
|
||||||
frame = getSelectValue(formObj, "tframe");
|
frame = getSelectValue(formObj, "tframe");
|
||||||
rules = getSelectValue(formObj, "rules");
|
rules = getSelectValue(formObj, "rules");
|
||||||
width = formObj.elements['width'].value;
|
width = formObj.elements['width'].value;
|
||||||
height = formObj.elements['height'].value;
|
height = formObj.elements['height'].value;
|
||||||
bordercolor = formObj.elements['bordercolor'].value;
|
bordercolor = formObj.elements['bordercolor'].value;
|
||||||
bgcolor = formObj.elements['bgcolor'].value;
|
bgcolor = formObj.elements['bgcolor'].value;
|
||||||
className = getSelectValue(formObj, "class");
|
className = getSelectValue(formObj, "class");
|
||||||
id = formObj.elements['id'].value;
|
id = formObj.elements['id'].value;
|
||||||
summary = formObj.elements['summary'].value;
|
summary = formObj.elements['summary'].value;
|
||||||
style = formObj.elements['style'].value;
|
style = formObj.elements['style'].value;
|
||||||
dir = formObj.elements['dir'].value;
|
dir = formObj.elements['dir'].value;
|
||||||
lang = formObj.elements['lang'].value;
|
lang = formObj.elements['lang'].value;
|
||||||
background = formObj.elements['backgroundimage'].value;
|
background = formObj.elements['backgroundimage'].value;
|
||||||
caption = formObj.elements['caption'].checked;
|
caption = formObj.elements['caption'].checked;
|
||||||
|
|
||||||
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
||||||
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
||||||
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
||||||
|
|
||||||
// Validate table size
|
// Validate table size
|
||||||
if (colLimit && cols > colLimit) {
|
if (colLimit && cols > colLimit) {
|
||||||
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
||||||
return false;
|
return false;
|
||||||
} else if (rowLimit && rows > rowLimit) {
|
} else if (rowLimit && rows > rowLimit) {
|
||||||
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
||||||
return false;
|
return false;
|
||||||
} else if (cellLimit && cols * rows > cellLimit) {
|
} else if (cellLimit && cols * rows > cellLimit) {
|
||||||
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update table
|
// Update table
|
||||||
if (action == "update") {
|
if (action == "update") {
|
||||||
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
||||||
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
||||||
|
|
||||||
if (!isCssSize(border)) {
|
if (!isCssSize(border)) {
|
||||||
dom.setAttrib(elm, 'border', border);
|
dom.setAttrib(elm, 'border', border);
|
||||||
} else {
|
} else {
|
||||||
dom.setAttrib(elm, 'border', '');
|
dom.setAttrib(elm, 'border', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (border == '') {
|
if (border == '') {
|
||||||
dom.setStyle(elm, 'border-width', '');
|
dom.setStyle(elm, 'border-width', '');
|
||||||
dom.setStyle(elm, 'border', '');
|
dom.setStyle(elm, 'border', '');
|
||||||
dom.setAttrib(elm, 'border', '');
|
dom.setAttrib(elm, 'border', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
dom.setAttrib(elm, 'align', align);
|
dom.setAttrib(elm, 'align', align);
|
||||||
dom.setAttrib(elm, 'frame', frame);
|
dom.setAttrib(elm, 'frame', frame);
|
||||||
dom.setAttrib(elm, 'rules', rules);
|
dom.setAttrib(elm, 'rules', rules);
|
||||||
dom.setAttrib(elm, 'class', className);
|
dom.setAttrib(elm, 'class', className);
|
||||||
dom.setAttrib(elm, 'style', style);
|
dom.setAttrib(elm, 'style', style);
|
||||||
dom.setAttrib(elm, 'id', id);
|
dom.setAttrib(elm, 'id', id);
|
||||||
dom.setAttrib(elm, 'summary', summary);
|
dom.setAttrib(elm, 'summary', summary);
|
||||||
dom.setAttrib(elm, 'dir', dir);
|
dom.setAttrib(elm, 'dir', dir);
|
||||||
dom.setAttrib(elm, 'lang', lang);
|
dom.setAttrib(elm, 'lang', lang);
|
||||||
|
|
||||||
capEl = inst.dom.select('caption', elm)[0];
|
capEl = inst.dom.select('caption', elm)[0];
|
||||||
|
|
||||||
if (capEl && !caption)
|
if (capEl && !caption)
|
||||||
capEl.parentNode.removeChild(capEl);
|
capEl.parentNode.removeChild(capEl);
|
||||||
|
|
||||||
if (!capEl && caption) {
|
if (!capEl && caption) {
|
||||||
capEl = elm.ownerDocument.createElement('caption');
|
capEl = elm.ownerDocument.createElement('caption');
|
||||||
|
|
||||||
if (!tinymce.isIE)
|
if (!tinymce.isIE)
|
||||||
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
||||||
|
|
||||||
elm.insertBefore(capEl, elm.firstChild);
|
elm.insertBefore(capEl, elm.firstChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (width && inst.settings.inline_styles) {
|
if (width && inst.settings.inline_styles) {
|
||||||
dom.setStyle(elm, 'width', width);
|
dom.setStyle(elm, 'width', width);
|
||||||
dom.setAttrib(elm, 'width', '');
|
dom.setAttrib(elm, 'width', '');
|
||||||
} else {
|
} else {
|
||||||
dom.setAttrib(elm, 'width', width, true);
|
dom.setAttrib(elm, 'width', width, true);
|
||||||
dom.setStyle(elm, 'width', '');
|
dom.setStyle(elm, 'width', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove these since they are not valid XHTML
|
// Remove these since they are not valid XHTML
|
||||||
dom.setAttrib(elm, 'borderColor', '');
|
dom.setAttrib(elm, 'borderColor', '');
|
||||||
dom.setAttrib(elm, 'bgColor', '');
|
dom.setAttrib(elm, 'bgColor', '');
|
||||||
dom.setAttrib(elm, 'background', '');
|
dom.setAttrib(elm, 'background', '');
|
||||||
|
|
||||||
if (height && inst.settings.inline_styles) {
|
if (height && inst.settings.inline_styles) {
|
||||||
dom.setStyle(elm, 'height', height);
|
dom.setStyle(elm, 'height', height);
|
||||||
dom.setAttrib(elm, 'height', '');
|
dom.setAttrib(elm, 'height', '');
|
||||||
} else {
|
} else {
|
||||||
dom.setAttrib(elm, 'height', height, true);
|
dom.setAttrib(elm, 'height', height, true);
|
||||||
dom.setStyle(elm, 'height', '');
|
dom.setStyle(elm, 'height', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (background != '')
|
if (background != '')
|
||||||
elm.style.backgroundImage = "url('" + background + "')";
|
elm.style.backgroundImage = "url('" + background + "')";
|
||||||
else
|
else
|
||||||
elm.style.backgroundImage = '';
|
elm.style.backgroundImage = '';
|
||||||
|
|
||||||
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
||||||
if (width != '')
|
if (width != '')
|
||||||
elm.style.width = getCSSSize(width);
|
elm.style.width = getCSSSize(width);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (bordercolor != "") {
|
if (bordercolor != "") {
|
||||||
elm.style.borderColor = bordercolor;
|
elm.style.borderColor = bordercolor;
|
||||||
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
||||||
elm.style.borderWidth = cssSize(border);
|
elm.style.borderWidth = cssSize(border);
|
||||||
} else
|
} else
|
||||||
elm.style.borderColor = '';
|
elm.style.borderColor = '';
|
||||||
|
|
||||||
elm.style.backgroundColor = bgcolor;
|
elm.style.backgroundColor = bgcolor;
|
||||||
elm.style.height = getCSSSize(height);
|
elm.style.height = getCSSSize(height);
|
||||||
|
|
||||||
inst.addVisual();
|
inst.addVisual();
|
||||||
|
|
||||||
// Fix for stange MSIE align bug
|
// Fix for stange MSIE align bug
|
||||||
//elm.outerHTML = elm.outerHTML;
|
//elm.outerHTML = elm.outerHTML;
|
||||||
|
|
||||||
inst.nodeChanged();
|
inst.nodeChanged();
|
||||||
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
||||||
|
|
||||||
// Repaint if dimensions changed
|
// Repaint if dimensions changed
|
||||||
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
||||||
inst.execCommand('mceRepaint');
|
inst.execCommand('mceRepaint');
|
||||||
|
|
||||||
tinyMCEPopup.close();
|
tinyMCEPopup.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new table
|
// Create new table
|
||||||
html += '<table';
|
html += '<table';
|
||||||
|
|
||||||
html += makeAttrib('id', id);
|
html += makeAttrib('id', id);
|
||||||
if (!isCssSize(border)) {
|
if (!isCssSize(border)) {
|
||||||
html += makeAttrib('border', border);
|
html += makeAttrib('border', border);
|
||||||
}
|
}
|
||||||
|
|
||||||
html += makeAttrib('cellpadding', cellpadding);
|
html += makeAttrib('cellpadding', cellpadding);
|
||||||
html += makeAttrib('cellspacing', cellspacing);
|
html += makeAttrib('cellspacing', cellspacing);
|
||||||
html += makeAttrib('data-mce-new', '1');
|
html += makeAttrib('data-mce-new', '1');
|
||||||
|
|
||||||
if (width && inst.settings.inline_styles) {
|
if (width && inst.settings.inline_styles) {
|
||||||
if (style)
|
if (style)
|
||||||
style += '; ';
|
style += '; ';
|
||||||
|
|
||||||
// Force px
|
// Force px
|
||||||
if (/^[0-9\.]+$/.test(width))
|
if (/^[0-9\.]+$/.test(width))
|
||||||
width += 'px';
|
width += 'px';
|
||||||
|
|
||||||
style += 'width: ' + width;
|
style += 'width: ' + width;
|
||||||
} else
|
} else
|
||||||
html += makeAttrib('width', width);
|
html += makeAttrib('width', width);
|
||||||
|
|
||||||
/* if (height) {
|
/* if (height) {
|
||||||
if (style)
|
if (style)
|
||||||
style += '; ';
|
style += '; ';
|
||||||
|
|
||||||
style += 'height: ' + height;
|
style += 'height: ' + height;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
//html += makeAttrib('height', height);
|
//html += makeAttrib('height', height);
|
||||||
//html += makeAttrib('bordercolor', bordercolor);
|
//html += makeAttrib('bordercolor', bordercolor);
|
||||||
//html += makeAttrib('bgcolor', bgcolor);
|
//html += makeAttrib('bgcolor', bgcolor);
|
||||||
html += makeAttrib('align', align);
|
html += makeAttrib('align', align);
|
||||||
html += makeAttrib('frame', frame);
|
html += makeAttrib('frame', frame);
|
||||||
html += makeAttrib('rules', rules);
|
html += makeAttrib('rules', rules);
|
||||||
html += makeAttrib('class', className);
|
html += makeAttrib('class', className);
|
||||||
html += makeAttrib('style', style);
|
html += makeAttrib('style', style);
|
||||||
html += makeAttrib('summary', summary);
|
html += makeAttrib('summary', summary);
|
||||||
html += makeAttrib('dir', dir);
|
html += makeAttrib('dir', dir);
|
||||||
html += makeAttrib('lang', lang);
|
html += makeAttrib('lang', lang);
|
||||||
html += '>';
|
html += '>';
|
||||||
|
|
||||||
if (caption) {
|
if (caption) {
|
||||||
if (!tinymce.isIE)
|
if (!tinymce.isIE)
|
||||||
html += '<caption><br data-mce-bogus="1"/></caption>';
|
html += '<caption><br data-mce-bogus="1"/></caption>';
|
||||||
else
|
else
|
||||||
html += '<caption></caption>';
|
html += '<caption></caption>';
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var y=0; y<rows; y++) {
|
for (var y=0; y<rows; y++) {
|
||||||
html += "<tr>";
|
html += "<tr>";
|
||||||
|
|
||||||
for (var x=0; x<cols; x++) {
|
for (var x=0; x<cols; x++) {
|
||||||
if (!tinymce.isIE)
|
if (!tinymce.isIE)
|
||||||
html += '<td><br data-mce-bogus="1"/></td>';
|
html += '<td><br data-mce-bogus="1"/></td>';
|
||||||
else
|
else
|
||||||
html += '<td></td>';
|
html += '<td></td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "</tr>";
|
html += "</tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
html += "</table>";
|
html += "</table>";
|
||||||
|
|
||||||
// Move table
|
// Move table
|
||||||
if (inst.settings.fix_table_elements) {
|
if (inst.settings.fix_table_elements) {
|
||||||
var patt = '';
|
var patt = '';
|
||||||
|
|
||||||
inst.focus();
|
inst.focus();
|
||||||
inst.selection.setContent('<br class="_mce_marker" />');
|
inst.selection.setContent('<br class="_mce_marker" />');
|
||||||
|
|
||||||
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
||||||
if (patt)
|
if (patt)
|
||||||
patt += ',';
|
patt += ',';
|
||||||
|
|
||||||
patt += n + ' ._mce_marker';
|
patt += n + ' ._mce_marker';
|
||||||
});
|
});
|
||||||
|
|
||||||
tinymce.each(inst.dom.select(patt), function(n) {
|
tinymce.each(inst.dom.select(patt), function(n) {
|
||||||
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
||||||
});
|
});
|
||||||
|
|
||||||
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
||||||
} else
|
} else
|
||||||
inst.execCommand('mceInsertContent', false, html);
|
inst.execCommand('mceInsertContent', false, html);
|
||||||
|
|
||||||
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
||||||
var tdorth = dom.select('td,th', node);
|
var tdorth = dom.select('td,th', node);
|
||||||
|
|
||||||
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
|
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
|
||||||
if (tinymce.isIE && node.nextSibling == null) {
|
if (tinymce.isIE && node.nextSibling == null) {
|
||||||
if (inst.settings.forced_root_block)
|
if (inst.settings.forced_root_block)
|
||||||
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
|
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
|
||||||
else
|
else
|
||||||
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
|
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// IE9 might fail to do this selection
|
// IE9 might fail to do this selection
|
||||||
inst.selection.setCursorLocation(tdorth[0], 0);
|
inst.selection.setCursorLocation(tdorth[0], 0);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
dom.setAttrib(node, 'data-mce-new', '');
|
dom.setAttrib(node, 'data-mce-new', '');
|
||||||
});
|
});
|
||||||
|
|
||||||
inst.addVisual();
|
inst.addVisual();
|
||||||
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
||||||
|
|
||||||
tinyMCEPopup.close();
|
tinyMCEPopup.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeAttrib(attrib, value) {
|
function makeAttrib(attrib, value) {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var valueElm = formObj.elements[attrib];
|
var valueElm = formObj.elements[attrib];
|
||||||
|
|
||||||
if (typeof(value) == "undefined" || value == null) {
|
if (typeof(value) == "undefined" || value == null) {
|
||||||
value = "";
|
value = "";
|
||||||
|
|
||||||
if (valueElm)
|
if (valueElm)
|
||||||
value = valueElm.value;
|
value = valueElm.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == "")
|
if (value == "")
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
// XML encode it
|
// XML encode it
|
||||||
value = value.replace(/&/g, '&');
|
value = value.replace(/&/g, '&');
|
||||||
value = value.replace(/\"/g, '"');
|
value = value.replace(/\"/g, '"');
|
||||||
value = value.replace(/</g, '<');
|
value = value.replace(/</g, '<');
|
||||||
value = value.replace(/>/g, '>');
|
value = value.replace(/>/g, '>');
|
||||||
|
|
||||||
return ' ' + attrib + '="' + value + '"';
|
return ' ' + attrib + '="' + value + '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
tinyMCEPopup.resizeToInnerSize();
|
tinyMCEPopup.resizeToInnerSize();
|
||||||
|
|
||||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||||
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
||||||
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
||||||
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
||||||
|
|
||||||
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
||||||
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
||||||
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
||||||
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var elm = dom.getParent(inst.selection.getNode(), "table");
|
var elm = dom.getParent(inst.selection.getNode(), "table");
|
||||||
|
|
||||||
// Hide advanced fields that isn't available in the schema
|
// Hide advanced fields that isn't available in the schema
|
||||||
tinymce.each("summary id rules dir style frame".split(" "), function(name) {
|
tinymce.each("summary id rules dir style frame".split(" "), function(name) {
|
||||||
var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
|
var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
|
||||||
|
|
||||||
if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
|
if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
|
||||||
tr.style.display = 'none';
|
tr.style.display = 'none';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
action = tinyMCEPopup.getWindowArg('action');
|
action = tinyMCEPopup.getWindowArg('action');
|
||||||
|
|
||||||
if (!action)
|
if (!action)
|
||||||
action = elm ? "update" : "insert";
|
action = elm ? "update" : "insert";
|
||||||
|
|
||||||
if (elm && action != "insert") {
|
if (elm && action != "insert") {
|
||||||
var rowsAr = elm.rows;
|
var rowsAr = elm.rows;
|
||||||
var cols = 0;
|
var cols = 0;
|
||||||
for (var i=0; i<rowsAr.length; i++)
|
for (var i=0; i<rowsAr.length; i++)
|
||||||
if (rowsAr[i].cells.length > cols)
|
if (rowsAr[i].cells.length > cols)
|
||||||
cols = rowsAr[i].cells.length;
|
cols = rowsAr[i].cells.length;
|
||||||
|
|
||||||
cols = cols;
|
cols = cols;
|
||||||
rows = rowsAr.length;
|
rows = rowsAr.length;
|
||||||
|
|
||||||
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
||||||
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
||||||
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
||||||
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
||||||
width = trimSize(getStyle(elm, 'width', 'width'));
|
width = trimSize(getStyle(elm, 'width', 'width'));
|
||||||
height = trimSize(getStyle(elm, 'height', 'height'));
|
height = trimSize(getStyle(elm, 'height', 'height'));
|
||||||
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
||||||
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
||||||
align = dom.getAttrib(elm, 'align', align);
|
align = dom.getAttrib(elm, 'align', align);
|
||||||
frame = dom.getAttrib(elm, 'frame');
|
frame = dom.getAttrib(elm, 'frame');
|
||||||
rules = dom.getAttrib(elm, 'rules');
|
rules = dom.getAttrib(elm, 'rules');
|
||||||
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
||||||
id = dom.getAttrib(elm, 'id');
|
id = dom.getAttrib(elm, 'id');
|
||||||
summary = dom.getAttrib(elm, 'summary');
|
summary = dom.getAttrib(elm, 'summary');
|
||||||
style = dom.serializeStyle(st);
|
style = dom.serializeStyle(st);
|
||||||
dir = dom.getAttrib(elm, 'dir');
|
dir = dom.getAttrib(elm, 'dir');
|
||||||
lang = dom.getAttrib(elm, 'lang');
|
lang = dom.getAttrib(elm, 'lang');
|
||||||
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||||
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
||||||
|
|
||||||
orgTableWidth = width;
|
orgTableWidth = width;
|
||||||
orgTableHeight = height;
|
orgTableHeight = height;
|
||||||
|
|
||||||
action = "update";
|
action = "update";
|
||||||
formObj.insert.value = inst.getLang('update');
|
formObj.insert.value = inst.getLang('update');
|
||||||
}
|
}
|
||||||
|
|
||||||
addClassesToList('class', "table_styles");
|
addClassesToList('class', "table_styles");
|
||||||
TinyMCE_EditableSelects.init();
|
TinyMCE_EditableSelects.init();
|
||||||
|
|
||||||
// Update form
|
// Update form
|
||||||
selectByValue(formObj, 'align', align);
|
selectByValue(formObj, 'align', align);
|
||||||
selectByValue(formObj, 'tframe', frame);
|
selectByValue(formObj, 'tframe', frame);
|
||||||
selectByValue(formObj, 'rules', rules);
|
selectByValue(formObj, 'rules', rules);
|
||||||
selectByValue(formObj, 'class', className, true, true);
|
selectByValue(formObj, 'class', className, true, true);
|
||||||
formObj.cols.value = cols;
|
formObj.cols.value = cols;
|
||||||
formObj.rows.value = rows;
|
formObj.rows.value = rows;
|
||||||
formObj.border.value = border;
|
formObj.border.value = border;
|
||||||
formObj.cellpadding.value = cellpadding;
|
formObj.cellpadding.value = cellpadding;
|
||||||
formObj.cellspacing.value = cellspacing;
|
formObj.cellspacing.value = cellspacing;
|
||||||
formObj.width.value = width;
|
formObj.width.value = width;
|
||||||
formObj.height.value = height;
|
formObj.height.value = height;
|
||||||
formObj.bordercolor.value = bordercolor;
|
formObj.bordercolor.value = bordercolor;
|
||||||
formObj.bgcolor.value = bgcolor;
|
formObj.bgcolor.value = bgcolor;
|
||||||
formObj.id.value = id;
|
formObj.id.value = id;
|
||||||
formObj.summary.value = summary;
|
formObj.summary.value = summary;
|
||||||
formObj.style.value = style;
|
formObj.style.value = style;
|
||||||
formObj.dir.value = dir;
|
formObj.dir.value = dir;
|
||||||
formObj.lang.value = lang;
|
formObj.lang.value = lang;
|
||||||
formObj.backgroundimage.value = background;
|
formObj.backgroundimage.value = background;
|
||||||
|
|
||||||
updateColor('bordercolor_pick', 'bordercolor');
|
updateColor('bordercolor_pick', 'bordercolor');
|
||||||
updateColor('bgcolor_pick', 'bgcolor');
|
updateColor('bgcolor_pick', 'bgcolor');
|
||||||
|
|
||||||
// Resize some elements
|
// Resize some elements
|
||||||
if (isVisible('backgroundimagebrowser'))
|
if (isVisible('backgroundimagebrowser'))
|
||||||
document.getElementById('backgroundimage').style.width = '180px';
|
document.getElementById('backgroundimage').style.width = '180px';
|
||||||
|
|
||||||
// Disable some fields in update mode
|
// Disable some fields in update mode
|
||||||
if (action == "update") {
|
if (action == "update") {
|
||||||
formObj.cols.disabled = true;
|
formObj.cols.disabled = true;
|
||||||
formObj.rows.disabled = true;
|
formObj.rows.disabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function changedSize() {
|
function changedSize() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
|
|
||||||
/* var width = formObj.width.value;
|
/* var width = formObj.width.value;
|
||||||
if (width != "")
|
if (width != "")
|
||||||
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
||||||
else
|
else
|
||||||
st['width'] = "";*/
|
st['width'] = "";*/
|
||||||
|
|
||||||
var height = formObj.height.value;
|
var height = formObj.height.value;
|
||||||
if (height != "")
|
if (height != "")
|
||||||
st['height'] = getCSSSize(height);
|
st['height'] = getCSSSize(height);
|
||||||
else
|
else
|
||||||
st['height'] = "";
|
st['height'] = "";
|
||||||
|
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCssSize(value) {
|
function isCssSize(value) {
|
||||||
return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
|
return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function cssSize(value, def) {
|
function cssSize(value, def) {
|
||||||
value = tinymce.trim(value || def);
|
value = tinymce.trim(value || def);
|
||||||
|
|
||||||
if (!isCssSize(value)) {
|
if (!isCssSize(value)) {
|
||||||
return parseInt(value, 10) + 'px';
|
return parseInt(value, 10) + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
function changedBackgroundImage() {
|
function changedBackgroundImage() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
|
|
||||||
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
||||||
|
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changedBorder() {
|
function changedBorder() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
|
|
||||||
// Update border width if the element has a color
|
// Update border width if the element has a color
|
||||||
if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
|
if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
|
||||||
st['border-width'] = cssSize(formObj.border.value);
|
st['border-width'] = cssSize(formObj.border.value);
|
||||||
else {
|
else {
|
||||||
if (!formObj.border.value) {
|
if (!formObj.border.value) {
|
||||||
st['border'] = '';
|
st['border'] = '';
|
||||||
st['border-width'] = '';
|
st['border-width'] = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changedColor() {
|
function changedColor() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
|
|
||||||
st['background-color'] = formObj.bgcolor.value;
|
st['background-color'] = formObj.bgcolor.value;
|
||||||
|
|
||||||
if (formObj.bordercolor.value != "") {
|
if (formObj.bordercolor.value != "") {
|
||||||
st['border-color'] = formObj.bordercolor.value;
|
st['border-color'] = formObj.bordercolor.value;
|
||||||
|
|
||||||
// Add border-width if it's missing
|
// Add border-width if it's missing
|
||||||
if (!st['border-width'])
|
if (!st['border-width'])
|
||||||
st['border-width'] = cssSize(formObj.border.value, 1);
|
st['border-width'] = cssSize(formObj.border.value, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
formObj.style.value = dom.serializeStyle(st);
|
formObj.style.value = dom.serializeStyle(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changedStyle() {
|
function changedStyle() {
|
||||||
var formObj = document.forms[0];
|
var formObj = document.forms[0];
|
||||||
var st = dom.parseStyle(formObj.style.value);
|
var st = dom.parseStyle(formObj.style.value);
|
||||||
|
|
||||||
if (st['background-image'])
|
if (st['background-image'])
|
||||||
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
||||||
else
|
else
|
||||||
formObj.backgroundimage.value = '';
|
formObj.backgroundimage.value = '';
|
||||||
|
|
||||||
if (st['width'])
|
if (st['width'])
|
||||||
formObj.width.value = trimSize(st['width']);
|
formObj.width.value = trimSize(st['width']);
|
||||||
|
|
||||||
if (st['height'])
|
if (st['height'])
|
||||||
formObj.height.value = trimSize(st['height']);
|
formObj.height.value = trimSize(st['height']);
|
||||||
|
|
||||||
if (st['background-color']) {
|
if (st['background-color']) {
|
||||||
formObj.bgcolor.value = st['background-color'];
|
formObj.bgcolor.value = st['background-color'];
|
||||||
updateColor('bgcolor_pick','bgcolor');
|
updateColor('bgcolor_pick','bgcolor');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (st['border-color']) {
|
if (st['border-color']) {
|
||||||
formObj.bordercolor.value = st['border-color'];
|
formObj.bordercolor.value = st['border-color'];
|
||||||
updateColor('bordercolor_pick','bordercolor');
|
updateColor('bordercolor_pick','bordercolor');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tinyMCEPopup.onInit.add(init);
|
tinyMCEPopup.onInit.add(init);
|
||||||
|
|
|
@ -1,158 +1,158 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>{#table_dlg.row_title}</title>
|
<title>{#table_dlg.row_title}</title>
|
||||||
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||||
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
||||||
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
||||||
<script type="text/javascript" src="../../utils/validate.js"></script>
|
<script type="text/javascript" src="../../utils/validate.js"></script>
|
||||||
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
||||||
<script type="text/javascript" src="js/row.js"></script>
|
<script type="text/javascript" src="js/row.js"></script>
|
||||||
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body id="tablerow" style="display: none" role="application">
|
<body id="tablerow" style="display: none" role="application">
|
||||||
<form onsubmit="updateAction();return false;" action="#">
|
<form onsubmit="updateAction();return false;" action="#">
|
||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
||||||
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel_wrapper">
|
<div class="panel_wrapper">
|
||||||
<div id="general_panel" class="panel current">
|
<div id="general_panel" class="panel current">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{#table_dlg.general_props}</legend>
|
<legend>{#table_dlg.general_props}</legend>
|
||||||
|
|
||||||
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
||||||
<td class="col2">
|
<td class="col2">
|
||||||
<select id="rowtype" name="rowtype" class="mceFocus">
|
<select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
|
||||||
<option value="thead">{#table_dlg.thead}</option>
|
<option value="thead">{#table_dlg.thead}</option>
|
||||||
<option value="tbody">{#table_dlg.tbody}</option>
|
<option value="tbody">{#table_dlg.tbody}</option>
|
||||||
<option value="tfoot">{#table_dlg.tfoot}</option>
|
<option value="tfoot">{#table_dlg.tfoot}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="align">{#table_dlg.align}</label></td>
|
<td><label for="align">{#table_dlg.align}</label></td>
|
||||||
<td class="col2">
|
<td class="col2">
|
||||||
<select id="align" name="align">
|
<select id="align" name="align">
|
||||||
<option value="">{#not_set}</option>
|
<option value="">{#not_set}</option>
|
||||||
<option value="center">{#table_dlg.align_middle}</option>
|
<option value="center">{#table_dlg.align_middle}</option>
|
||||||
<option value="left">{#table_dlg.align_left}</option>
|
<option value="left">{#table_dlg.align_left}</option>
|
||||||
<option value="right">{#table_dlg.align_right}</option>
|
<option value="right">{#table_dlg.align_right}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="valign">{#table_dlg.valign}</label></td>
|
<td><label for="valign">{#table_dlg.valign}</label></td>
|
||||||
<td class="col2">
|
<td class="col2">
|
||||||
<select id="valign" name="valign">
|
<select id="valign" name="valign">
|
||||||
<option value="">{#not_set}</option>
|
<option value="">{#not_set}</option>
|
||||||
<option value="top">{#table_dlg.align_top}</option>
|
<option value="top">{#table_dlg.align_top}</option>
|
||||||
<option value="middle">{#table_dlg.align_middle}</option>
|
<option value="middle">{#table_dlg.align_middle}</option>
|
||||||
<option value="bottom">{#table_dlg.align_bottom}</option>
|
<option value="bottom">{#table_dlg.align_bottom}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="styleSelectRow">
|
<tr id="styleSelectRow">
|
||||||
<td><label for="class">{#class_name}</label></td>
|
<td><label for="class">{#class_name}</label></td>
|
||||||
<td class="col2">
|
<td class="col2">
|
||||||
<select id="class" name="class" class="mceEditableSelect">
|
<select id="class" name="class" class="mceEditableSelect">
|
||||||
<option value="" selected="selected">{#not_set}</option>
|
<option value="" selected="selected">{#not_set}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="height">{#table_dlg.height}</label></td>
|
<td><label for="height">{#table_dlg.height}</label></td>
|
||||||
<td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
<td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="advanced_panel" class="panel">
|
<div id="advanced_panel" class="panel">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{#table_dlg.advanced_props}</legend>
|
<legend>{#table_dlg.advanced_props}</legend>
|
||||||
|
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
||||||
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for="style">{#table_dlg.style}</label></td>
|
<td><label for="style">{#table_dlg.style}</label></td>
|
||||||
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
||||||
<td>
|
<td>
|
||||||
<select id="dir" name="dir" style="width: 200px">
|
<select id="dir" name="dir" style="width: 200px">
|
||||||
<option value="">{#not_set}</option>
|
<option value="">{#not_set}</option>
|
||||||
<option value="ltr">{#table_dlg.ltr}</option>
|
<option value="ltr">{#table_dlg.ltr}</option>
|
||||||
<option value="rtl">{#table_dlg.rtl}</option>
|
<option value="rtl">{#table_dlg.rtl}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
||||||
<td>
|
<td>
|
||||||
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
||||||
<td>
|
<td>
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
||||||
<td id="backgroundimagebrowsercontainer"> </td>
|
<td id="backgroundimagebrowsercontainer"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
||||||
<td>
|
<td>
|
||||||
<span role="group" aria-labelledby="bgcolor_label">
|
<span role="group" aria-labelledby="bgcolor_label">
|
||||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
||||||
<td id="bgcolor_pickcontainer"> </td>
|
<td id="bgcolor_pickcontainer"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mceActionPanel">
|
<div class="mceActionPanel">
|
||||||
<div>
|
<div>
|
||||||
<select id="action" name="action">
|
<select id="action" name="action">
|
||||||
<option value="row">{#table_dlg.row_row}</option>
|
<option value="row">{#table_dlg.row_row}</option>
|
||||||
<option value="odd">{#table_dlg.row_odd}</option>
|
<option value="odd">{#table_dlg.row_odd}</option>
|
||||||
<option value="even">{#table_dlg.row_even}</option>
|
<option value="even">{#table_dlg.row_even}</option>
|
||||||
<option value="all">{#table_dlg.row_all}</option>
|
<option value="all">{#table_dlg.row_all}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" id="insert" name="insert" value="{#update}" />
|
<input type="submit" id="insert" name="insert" value="{#update}" />
|
||||||
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,55 +1,54 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
/**
|
* HDI TinyMCE
|
||||||
* HDI TinyMCE
|
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
||||||
* Copyright (C) 2012 HEINER DIRECT GmbH & Co. KG
|
* info: info@heiner-direct.com
|
||||||
* info: info@heiner-direct.com
|
*
|
||||||
*
|
* This program is free software;
|
||||||
* This program is free software;
|
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
||||||
* you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;
|
* either version 3 of the License, or (at your option) any later version.
|
||||||
* either version 3 of the License, or (at your option) any later version.
|
*
|
||||||
*
|
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
||||||
* You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>
|
*/
|
||||||
*/
|
class tinyMCE extends tinyMCE_parent {
|
||||||
class tinyMCE extends tinyMCE_parent {
|
|
||||||
|
protected function _generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet = null) {
|
||||||
protected function _generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet = null) {
|
$myConfig = $this->getConfig();
|
||||||
$myConfig = $this->getConfig();
|
$sConfigParam = "bTinyMCE_" . $this->getClassName();
|
||||||
$sConfigParam = "bTinyMCE_" . $this->getClassName();
|
|
||||||
|
//check if tinyMCE is active for this calss
|
||||||
//check if tinyMCE is active for this calss
|
if ($myConfig->getConfigParam($sConfigParam) === true) {
|
||||||
if ($myConfig->getConfigParam($sConfigParam) === true) {
|
$oViewConf = $this->_aViewData["oViewConf"];
|
||||||
$oViewConf = $this->_aViewData["oViewConf"];
|
$smarty = oxUtilsView::getInstance()->getSmarty();
|
||||||
$smarty = oxUtilsView::getInstance()->getSmarty();
|
|
||||||
|
//$sEditor = $smarty->fetch($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl");
|
||||||
//$sEditor = $smarty->fetch($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl");
|
|
||||||
|
if ($oObject) {
|
||||||
if ($oObject) {
|
$sInitialValue = '';
|
||||||
$sInitialValue = '';
|
if ($oObject->$sField instanceof oxField) {
|
||||||
if ($oObject->$sField instanceof oxField) {
|
$sInitialValue = $oObject->$sField->getRawValue();
|
||||||
$sInitialValue = $oObject->$sField->getRawValue();
|
} else {
|
||||||
} else {
|
$sInitialValue = $oObject->$sField->value;
|
||||||
$sInitialValue = $oObject->$sField->value;
|
}
|
||||||
}
|
//$oObject->$sField = new oxField(str_replace('[{$shop->currenthomedir}]', $myConfig->getCurrentShopURL(), $sInitialValue), oxField::T_RAW);
|
||||||
//$oObject->$sField = new oxField(str_replace('[{$shop->currenthomedir}]', $myConfig->getCurrentShopURL(), $sInitialValue), oxField::T_RAW);
|
$smarty->assign( "sField", $sField);
|
||||||
$smarty->assign( "sField", $sField);
|
$smarty->assign( "iWidth", (strpos($iWidth, '%') === false) ? $iWidth . 'px' : $iWidth);
|
||||||
$smarty->assign( "iWidth", (strpos($iWidth, '%') === false) ? $iWidth . 'px' : $iWidth);
|
$smarty->assign( "iHeight", "80%");
|
||||||
$smarty->assign( "iHeight", "80%");
|
//$smarty->assign( "iHeight", (strpos($iHeight, '%') === false) ? $iHeight . 'px' : $iHeight);
|
||||||
//$smarty->assign( "iHeight", (strpos($iHeight, '%') === false) ? $iHeight . 'px' : $iHeight);
|
$smarty->assign( "sContent", $this->_getEditValue($oObject, $sField));
|
||||||
$smarty->assign( "sContent", $this->_getEditValue($oObject, $sField));
|
|
||||||
|
//var_dump($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl");
|
||||||
//var_dump($myConfig->getModulesDir()."hdi/hdi-tinymce/test.tpl");
|
$smarty->assign( "cfg", $myConfig);
|
||||||
$smarty->assign( "cfg", $myConfig);
|
$smarty->assign( "oViewConf", $this->_aViewData["oViewConf"]);
|
||||||
$smarty->assign( "oViewConf", $this->_aViewData["oViewConf"]);
|
$sEditor = $smarty->fetch("tinymce.tpl");
|
||||||
$sEditor = $smarty->fetch("tinymce.tpl");
|
}
|
||||||
}
|
return $sEditor;
|
||||||
return $sEditor;
|
} else {
|
||||||
} else {
|
//returning default textarea or whatever
|
||||||
//returning default textarea or whatever
|
return parent::_generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet);
|
||||||
return parent::_generateTextEditor($iWidth, $iHeight, $oObject, $sField, $sStylesheet);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue