Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2007-01-23 05:09:27

sukceso
New member
Registered: 2007-01-23
Posts: 3

Dialogs as CSS layers/IFRAMEs

Hi,

I'm wondering if there is a setting to open the dialogs (e.g. create link, insert image) in a CSS layer instead in a separate browser window? If not, has anybody tried to do this and eventually some code changes on how to achieve this?

Thank you very much

Stefan

Offline

#2 2007-01-23 07:22:11

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Dialogs as CSS layers/IFRAMEs

No, unfortunately this is not possible at the moment. I'd like to see that, too smile

Offline

#3 2007-01-23 10:53:39

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

I'm currently working on doing the same thing, though it has meant me having to edit every plugin I want to use sad


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#4 2007-01-23 14:16:00

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Dialogs as CSS layers/IFRAMEs

Could you open a ticket and share the code when you are ready?

Offline

#5 2007-01-23 17:16:17

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

I've actually just had a thought that would make the conversion so much quicker, and would sort of be a temporary way of doing it.....rather than have it in a floating DIV it can be in a floating (probably borderless) IFRAME instead - this means the plugins need little or no editing, and can instead trigger the contents of the IFRAME with a change of the style.display property.


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#6 2007-01-23 17:26:43

sukceso
New member
Registered: 2007-01-23
Posts: 3

Re: Dialogs as CSS layers/IFRAMEs

That's along the lines I thought it should work. Create an IFRAME (perhaps inside a DIV) and trigger the "visibility" CSS attribute as soon as the dialog is opened (and set it back to "hidden" if it is closed). Resizing should also be easy by changing the CSS attributes.
As soon as you have something, please let me know, I would be very interested in such a solution.

Offline

#7 2007-01-23 17:42:51

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

So far not had much luck with the IFRAME method, I was trying to bypass the use of popup.js though that stops the _insertImage() prototype from being fired when clicking OK (was using InsertImage module as a test case). I'm going to have a go at rewriting popup.js to use the IFRAME, though I'm not looking forward to it - I think it's all going to go wrong.


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#8 2007-01-23 18:13:02

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

The problem I'm getting is the close functions....it doesn't know where Dialog is. I've tried window.parent.Dialog and Xinha.Dialog but to no avail, any suggestions?


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#9 2007-01-23 18:39:38

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Dialogs as CSS layers/IFRAMEs

window.top.Dialog should be it

Maybe you have a look at this (rather old) branch that has some work in this direction http://xinha.python-hosting.com/browser … w-dialogs/

Offline

#10 2007-01-23 18:49:30

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

yay! it worked big_smile thanks ray....also noticed a few minutes ago that niko is already working on these (see ticket #572) - oops!


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#11 2007-01-23 18:50:32

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

ray wrote:

window.top.Dialog should be it

Maybe you have a look at this (rather old) branch that has some work in this direction http://xinha.python-hosting.com/browser … w-dialogs/

yeah I noticed that as a comment to one of the tickets shortly after posting :s   oops!

Last edited by jedi58 (2007-01-23 18:50:48)


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#12 2007-01-23 18:57:27

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

Okay, it works first time one's used without a problem - subsequent ones don't, they seem to automatically call the _return() method as they flicker there for an instant....sooooo close!


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#13 2007-01-23 19:58:06

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Dialogs as CSS layers/IFRAMEs

jedi58 wrote:

niko is already working

is working is maybe not quite the right tense. This branch is a year old sad

Offline

#14 2007-01-24 03:26:47

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

oh sad

I'm going to try and finish what I've started anyway as I want to see it working smile


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#15 2007-01-24 03:59:23

sukceso
New member
Registered: 2007-01-23
Posts: 3

Re: Dialogs as CSS layers/IFRAMEs

@jedi58: sounds great! As soon as you have something, just let me know. If you hit a point where you don't have an idea on how to solve it, just let me know, perhaps I can help looking into it.
Having the dialogs as layer I think would be a great improvement of Xinha! :-)

Offline

#16 2007-02-01 15:15:19

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

I've uploaded a version of Xinha to some webspace with what progress I was able to make:

http://www.newearthonline.co.uk/dev/doc.php

unfortunately I'm still not able to figure out why it only works the first time sad


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#17 2007-02-01 15:16:44

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

oh, btw i've only implemented it for InsertImage and CreateLink


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

#18 2007-02-05 09:11:27

jedi58
Xinha Authority
From: Leicester, UK
Registered: 2007-01-14
Posts: 113
Website

Re: Dialogs as CSS layers/IFRAMEs

any suggestions what I might have got wrong?


David G. Paul
[url]http://www.newearthonline.co.uk[/url]

Offline

Board footer

Powered by FluxBB