jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Author Topic: TinyMCE and JCE  (Read 31829 times)

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
TinyMCE and JCE
« on: August 22, 2012, 04:09:56 pm »

I have problems because I use JCE instead of TinyMCE. Any plans to support it?
Logged

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #1 on: August 22, 2012, 04:25:51 pm »

Oh, by the way, when I changed to TinyMCE, the same error appears (looking in the console:

// Code:
//If we have a tinyMCE Editor
      if (tinyMCE) {

// Console error
Uncaught ReferenceError: tinyMCE is not defined
    
Is like the javascript object is not being passed.  Im using Joomla 2.5.4
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #2 on: August 22, 2012, 04:33:53 pm »

Hmm I tried JCE but it didn't worked in com_content... but I get the error in jdiction so I will try to find the problem.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #3 on: August 22, 2012, 05:01:04 pm »

Hmm funny after reloading and using another browser it displays the JCE, and jdiction worked out of the box...

Do you still have this problem?
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #4 on: August 22, 2012, 05:44:48 pm »

Sorry, no luck

Tested on Firefox and Chrome, last versions. I´ll check later and I´ll let you know :)


Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #5 on: August 22, 2012, 05:57:22 pm »


I changed the template to prevent the javascript error, but the Editor should work anyway... maybe you could send me username and password as pm.

Please test the attached file, path:
administrator\components\com_jdiction\views\translation\tmpl\form.php
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #6 on: August 22, 2012, 07:14:00 pm »

Can´t do, but I´ll be happy to answer the info you need

What browser are you using? I can try it.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #7 on: August 22, 2012, 07:22:22 pm »

I use Opera and tested chrome on jdiction.org and it works for me...

maybe you could debug the javascript code ;-)

but first could you send me a screenshot what you see in the translation window.
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #8 on: August 22, 2012, 07:45:18 pm »

Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #9 on: August 22, 2012, 07:49:14 pm »

Did you created your own component?

Which version of jdiction have you installed.

Is this screenshot from com_content?

Could you paste the source of the iframe?

Edit: you should upgrade to Joomla 2.5.6 there are some strange database changes...
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #10 on: August 22, 2012, 07:55:31 pm »


Iframe:

Quote
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-es" lang="es-es" dir="ltr" slick-uniqueid="3"><head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="Joomla! - Open Source Content Management">
  <title>Migracion de 1.5 a 1.7 - Administración</title>
  <link href="/joomla_17_migracion/administrator/templates/bluestork/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
  <link rel="stylesheet" href="/joomla_17_migracion/administrator/components/com_jdiction/assets/style.css" type="text/css">
  <link rel="stylesheet" href="templates/system/css/system.css" type="text/css">
  <link rel="stylesheet" href="templates/bluestork/css/template.css" type="text/css">
  <script src="/joomla_17_migracion/media/system/js/mootools-core.js" type="text/javascript"></script>
  <script src="/joomla_17_migracion/media/system/js/core.js" type="text/javascript"></script>
  <script src="/joomla_17_migracion/media/system/js/mootools-more.js" type="text/javascript"></script>
  <script src="/joomla_17_migracion/media/system/js/validate.js" type="text/javascript"></script>
  <script src="/joomla_17_migracion/media/system/js/tabs.js" type="text/javascript"></script>
  <script type="text/javascript">
window.addEvent('domready', function() {
         $$('.hasTip').each(function(el) {
            var title = el.get('title');
            if (title) {
               var parts = title.split('::', 2);
               el.store('tip:title', parts[0]);
               el.store('tip:text', parts[1]);
            }
         });
         var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false});
      });
   window.addEvent('domready', function(){
                  $$('dl#language-tabs.tabs').each(function(tabs){
                     new JTabs(tabs, {useStorage: true,titleSelector: 'dt.tabs',descriptionSelector: 'dd.tabs'});
                  });
               });
  </script>

   </head>
   <body class="contentpane">
      
<div id="system-message-container">
</div>
         <fieldset>
      <div class="fltrt">
         <button type="button" onclick="Joomla.submitform('translation.apply', $('component-form'));">
            Guardar</button>
         <button type="button" onclick="Joomla.submitform('translation.save', $('component-form'));">
            Guardar y cerrar</button>
         <button type="button" onclick="window.parent.SqueezeBox.close();">
            Cancelar</button>
      </div>
      <div class="configuration">
         Artículos Translate      </div>
   </fieldset>
   <script type="text/javascript">
   Joomla.submitbutton = function(task)
   {
      if (document.formvalidator.isValid(document.id('component-form'))) {
         $$('input[type!=hidden], textarea, select')
         Joomla.submitform(task, document.getElementById('component-form'));
      }
   }
   
   window.addEvent('domready', function() {
      $$('input[type!=hidden], textarea, select').setStyle('border-color', 'green');
      $$('input[type!=hidden], textarea, select').addEvent('change', function() {
         jdiction_checkStatus(this.value, $(this.id+'_status').title, this.id, this);
      });
      //If we have a tinyMCE Editor
      if (typeof tinyMCE != 'undefined') {
       tinyMCE.onAddEditor.add(function(mgr,ed) {
            ed.onChange.add(function(ed, e) {
               jdiction_checkStatus(ed.getContent(), $(ed.id+'_status').title, ed.id, $(ed.id+'_tbl'));
            });
         });
      }
   });
   
   function jdiction_checkStatus(newvalue, oldvalue, id,  marker) {
      if (newvalue != oldvalue) {
         marker.setStyle('border', '1px solid orange');
         $(id+'_status').value="changed";
      } else {
         marker.setStyle('border', '1px solid green');
         $(id+'_status').value="unchanged";
      }
   }
   function jdiction_removeContent(id, marker) {
      marker.setStyle('border', '1px solid red');
      $(id+'_status').value="remove";
      if ($(id+'_tbl')) { //Editor
         if (typeof tinymce != 'undefined') {
            tinymce.get(id).setContent('');
         }
      } else {
         $(id).value = '';
      }
   }
   function jdiction_copyContent(text, id) {
      
      if ($(id+'_tbl')) { //Editor
         if (typeof tinymce != 'undefined') {
            jdiction_checkStatus(tinymce.get(id).getContent(), text, id, $(id+'_tbl'));
            tinymce.get(id).setContent(text);
         }
      } else {
         jdiction_checkStatus(text, $(id).value, id,  $(id));
         $(id).value = text;
      }
   }

</script>
<style>
.info_img {
   float: left;
   cursor: pointer;
   padding: 4px 2px 2px 2px;
}
</style>
<form action="/joomla_17_migracion/administrator/index.php?option=com_jdiction" id="component-form" method="post" name="adminForm" autocomplete="off" class="form-validate">

   <dl class="tabs" id="language-tabs"><dt style="display:none;"></dt><dd style="display:none;"></dd><dt class="tabs language-tab-de closed" style="cursor: pointer; "><span><h3><a href="javascript:void(0);">Deutch</a></h3></span></dt><dt class="tabs language-tab-en-GB open" style="cursor: pointer; "><span><h3><a href="javascript:void(0);">English (UK)</a></h3></span></dt></dl><div class="current"><dd class="tabs" style="display: none; ">        <ul class="config-option-list">
                </ul>
    <div class="clr"></div>
    </dd><dd class="tabs" style="display: block; ">        <ul class="config-option-list">
                </ul>
    <div class="clr"></div>
    </dd></div>   <div>
      <input type="hidden" name="jd_id" value="13">
      <input type="hidden" name="jd_option" value="com_content">
      <input type="hidden" name="jd_view" value="article">
      <input type="hidden" name="jd_layout" value="edit">
      <input type="hidden" name="task" value="">
      <input type="hidden" name="tmpl" value="component">
      <input type="hidden" name="layout" value="popup">      
      <input type="hidden" name="08b648e65591fb0940b0329ab47c96c9" value="1">   </div>
</form>
   

</body></html>



Im going to update to 2.5.6, maybe that´ll fix it.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #11 on: August 22, 2012, 07:59:59 pm »

maybe because this is not a problem of the JCE it seams to be a problem loading the form...

Paste you check the content of JPATH_SITE /libraries/jdiction/tables/content.xml
Logged
Joomla! 5.0 Release Manager
Vote at JED

Finarfin

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: TinyMCE and JCE
« Reply #12 on: August 22, 2012, 08:07:40 pm »

Hey, the update fixed it! :D soooo 2.5.4, seems bad, 2.5.6, seems nice :P (Im using JCE, by the way)


Hope to see this module in production mode :P I´ll let you know if I find more "bugs"

Cheers!
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1688
    • View Profile
Re: TinyMCE and JCE
« Reply #13 on: August 22, 2012, 08:09:26 pm »

I'm using it already in production on some client sites, not 0.7.9.1 but 0.7...
0.8 will be ready this or next week.
Logged
Joomla! 5.0 Release Manager
Vote at JED