This topic is locked
[SOLVED]

 Innova problem with Full Screen

11/13/2010 6:23:10 AM
PHPRunner General questions
J
jacekq author

Hi,
I like Innova very much, so I'm using it as the basic editor for textareas...
Some time ago PHPR stuff has changed the implementation of innova putting it into <iframes> so it was not possible to use Full Screen mode or Preview Window (take a look at the buttons of innova).
Up to PHPR5.3 I was able to do some changes in commonfunctions.php and innova.php to make innova working fine for me.
Now, in PHPR5.3, something has been changed, so I am able to do the same changes (in commonfunctions.php and innova.php) and have Full Screen Mode, but returned textarea value is always empty! It is loaded with an initial value from database, I can also edit it but when I submit, the $_POST[] of textarea is always blank!
I suspect some kind of nasty javascript filtering which works only when innova is in <iframe>.

Pls help me with this.
Best regards,

Jacek

J
jacekq author 11/18/2010

Hi,
I've done intensive search and found that the javascript file responsible for filtering is 'RunnerControls.js'.

There is special function that checks INNOVA field supposing that it is inside iframe.

I don't know javascript too much so for this moment I'm not able to change that founction.

Here is the proper code (in my opinion):



Runner.controls.RTEInnova = Runner.extend(Runner.controls.RTEField, {

constructor: function (cfg) {

Runner.controls.RTEInnova.superclass.constructor.call(this, cfg);

this.useRTE = cfg.useRTE ? cfg.useRTE : false;

this.iframeElem = $('#' + this.iframeElemId);

if ($.browser.safari && Runner.pages.PageSettings.getTableData(this.tName, "pageMode", 0) == 2) {

src = this.iframeElem.attr('src');

this.iframeElem.attr('src', "");

this.iframeElem.attr('src', src);

}

if (this.useRTE == "INNOVA") this.innerIframeId = 'idContentoEdit' + this.goodFieldName + '_' + this.id;

},

getValue: function () {

var val;

if (this.iframeElem) {

if (this.useRTE == 'INNOVA') val = this.iframeElem.contents().find('#' + this.innerIframeId).contents().find('body').html();

else val = this.iframeElem.contents().find('#' + this.iframeElemId).contents().find('body').html();

if (val) val = val.trim();

if (val == '
') val = '';

return val;

}

else return false;

},

setValue: function (val) {

if (this.useRTE == 'INNOVA') this.iframeElem.contents().find('#' + this.innerIframeId).contents().find('body').html(val);

else this.iframeElem.contents().find('#' + this.iframeElemId).contents().find('body').html(val);

}

});


If you could help me with this I would be happy...
Jacek