Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Apr 25, 2023
1 parent bad757d commit 3683b2d
Show file tree
Hide file tree
Showing 407 changed files with 3,390 additions and 111,380 deletions.
6 changes: 3 additions & 3 deletions app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public function __construct()

$this->_formScripts[] = "
function toggleEditor() {
if (tinyMCE.getInstanceById('block_content') == null) {
tinyMCE.execCommand('mceAddControl', false, 'block_content');
if (tinymce.get('block_content') === null) {
tinymce.init({selector: 'textarea#block_content', branding: false, promotion: false, plugins: 'lists advlist directionality image link media nonbreaking preview quickbars'});
} else {
tinyMCE.execCommand('mceRemoveControl', false, 'block_content');
tinymce.get('block_content').remove();
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ protected function _prepareLayout()

$this->_formScripts[] = "
function toggleEditor() {
if (tinyMCE.getInstanceById('page_content') == null) {
tinyMCE.execCommand('mceAddControl', false, 'page_content');
if (tinymce.get('page_content') === null) {
tinymce.init({selector: 'textarea#page_content', branding: false, promotion: false, plugins: 'lists advlist directionality image link media nonbreaking preview quickbars'});
} else {
tinyMCE.execCommand('mceRemoveControl', false, 'page_content');
tinymce.get('page_content').remove();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ var catalogWysiwygEditor = {
if (dialogWindow.options.firedElementId) {
wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
wysiwygObj.turnOff();
if (tinyMCE.get(wysiwygObj.id)) {
$(dialogWindow.options.firedElementId).value = tinyMCE.get(wysiwygObj.id).getContent();
if (tinymce.get(wysiwygObj.id)) {
$(dialogWindow.options.firedElementId).value = tinymce.get(wysiwygObj.id).getContent();
} else {
if ($(dialogWindow.options.firedElementId+'_editor')) {
$(dialogWindow.options.firedElementId).value = $(dialogWindow.options.firedElementId+'_editor').value;
Expand All @@ -93,8 +93,8 @@ var catalogWysiwygEditor = {

//destroy the instance of editor
wysiwygObj = eval('wysiwyg'+dialogWindow.options.firedElementId+'_editor');
if (tinyMCE.get(wysiwygObj.id)) {
tinyMCE.execCommand('mceRemoveControl', true, wysiwygObj.id);
if (tinymce.get(wysiwygObj.id)) {
tinymce.get(wysiwygObj.id).remove();
}

dialogWindow.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ var queueControl = {
queueForm.submit();
},
preview: function() {
if (this.isEditor() && tinyMCE.get(this.id)) {
tinyMCE.triggerSave();
if (this.isEditor() && tinymce.get(this.id)) {
tinymce.triggerSave();
$('preview_text').value = $(this.id).value;
tinyMCE.triggerSave();
tinymce.triggerSave();
} else {
$('preview_text').value = $(this.id).value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
$('change_flag_element').value = '1';
}
if(this.isEditor()) {
tinyMCE.triggerSave();
tinymce.triggerSave();
}
templateForm.submit();
return false;
Expand All @@ -129,7 +129,7 @@
$('save_as_flag').value = '1';

if(this.isEditor()) {
tinyMCE.triggerSave();
tinymce.triggerSave();
}
templateForm.submit();
return false;
Expand All @@ -141,10 +141,10 @@
} else {
$('preview_type').value = 2;
}
if (this.isEditor() && tinyMCE.get(this.id)) {
tinyMCE.triggerSave();
if (this.isEditor() && tinymce.get(this.id)) {
tinymce.triggerSave();
$('preview_text').value = $(this.id).value;
tinyMCE.triggerSave();
tinymce.triggerSave();
} else {
$('preview_text').value = $(this.id).value;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<?php endif ?>

<?php if ($this->getCanLoadTinyMce()): // TinyMCE is broken when loaded through index.php?>
<script type="text/javascript" src="<?php echo $this->getJsUrl() ?>tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo $this->getJsUrl() ?>tinymce/tinymce.min.js"></script>
<?php endif ?>

<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@
} else {
$('preview_type').value = 2;
}
if (typeof tinyMCE == 'undefined' || !tinyMCE.getInstanceById('template_text')) {
if (typeof tinymce == 'undefined' || !tinymce.get('template_text')) {
$('preview_text').value = $('template_text').value;
} else {
$('preview_text').value = tinyMCE.getInstanceById('template_text').getHTML();
$('preview_text').value = tinymce.get('template_text').getContent();
}

if ($('template_styles') != undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
case 'wysiwyg': ?>
<span class="form_row">
<label for="<?php echo $element->getHtmlId() ?>"><?php echo $element->getLabel() ?>:</label>
<script type="text/javascript" src="<?php echo Mage::getBaseUrl('js') ?>tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="<?php echo Mage::getBaseUrl('js') ?>tinymce/tinymce.min.js"></script>
<script type="text/javascript">
//<![CDATA[
tinyMCE.init({
Expand Down
20 changes: 1 addition & 19 deletions js/mage/adminhtml/wysiwyg/tiny_mce/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,16 @@ tinyMceWysiwygSetup.prototype =
this.id = htmlId;
this.config = config;
varienGlobalEvents.attachEventHandler('tinymceChange', this.onChangeContent.bind(this));
this.notifyFirebug();
if(typeof tinyMceEditors == 'undefined') {
tinyMceEditors = $H({});
}
tinyMceEditors.set(this.id, this);
},

notifyFirebug: function() {
if (firebugEnabled() && $('fb' + this.id) == undefined) {
var noticeHtml = '<ul class="messages message-firebug" id="fb' + this.id + '"><li class="notice-msg">';
noticeHtml+= '<ul><li>';
noticeHtml+= '<b>' + this.config.firebug_warning_title + ':</b> ';
noticeHtml+= this.config.firebug_warning_text;
noticeHtml+= ' <a id="hidefb' + this.id + '" href="">' + this.config.firebug_warning_anchor + '</a>';
noticeHtml+= '</li></ul>';
noticeHtml+= '</li></ul>';
$('buttons' + this.id).insert({before: noticeHtml});
Event.observe($('hidefb' + this.id), "click", function(e) {
$('fb' + this.id).remove();
Event.stop(e);
}.bind(this));
}
},

setup: function(mode)
{
if (this.config.widget_plugin_src) {
tinymce.PluginManager.load('magentowidget', this.config.widget_plugin_src);
//tinymce.PluginManager.load('magentowidget', this.config.widget_plugin_src);
}

if (this.config.plugins) {
Expand Down
Loading

0 comments on commit 3683b2d

Please sign in to comment.