[Xerte-dev] Re: wizard files and modules

Smith, John J.J.Smith at gcu.ac.uk
Sun May 12 11:04:04 BST 2013


Ok i've partly solved it...

Is this line needed in preview.php?

<script type="text/javascript" src="%TEMPLATEPATH%common_html5/js/swfobject.js"></script>

Taking it out solves the issue for me...

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk [xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders [reijnders at tor.nl]
Sent: 12 May 2013 10:52
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules

Confirmed... ( I liked Zen of Blakes 7...:-) )

Op 12-5-2013 11:41, Smith, John schreef:

so now if you replace preview.php with the attached file which does nothing but is valid XHTML then I don't see the problem any more so it must be the preview page... there are a lot of XHTML Transitional errors in edit.php and a couple on preview but i've fixed these now and still not working...

Can either of you confirm that using this preview.php file remeve the issue from the editor?

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Pat @ Pgogy  [xerte at pgogywebstuff.com<mailto:xerte at pgogywebstuff.com>]
Sent: 12 May 2013 10:25
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules

Has this mostly happened post the upload successful button was added?

I think the button click event isn't firing properly in flash?

When I last did a lot of flash stuff, Firefox always went wrong on the object's depth properties

On 12 May 2013, at 09:52, "Smith, John" <J.J.Smith at gcu.ac.uk><mailto:J.J.Smith at gcu.ac.uk> wrote:



So the plot thickens... As you know I couldn't reproduce this on Friday and it seems that it was because of what I was doing...

When the editor window was opening I was MOVING the window so that I could see the workspace too and it seems that this change of focus from the Flash to the actual window was in some way doing something to the problem but this morning I was able to reproduce the problem this morning though because I wasn't doing anything to the window after clicking preview...

Please watch this screencast ( http://screencast.com/t/38tpOLopLs ) and you'll see the button not working in exactly the same way that you all described but then simply resizing the window slightly makes it work again... now it's not a focus issue because simply clicking on the window border or the window header which would change focus away from the Flash wizard doesn't fix it... but resizing does. But only until you preview again and then you need to resize again...

I have no idea why this is happening but will continue to have a play around with various things to see if I can come up with a fix...

Regards,

John Smith | Learning Technologist
Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University
Cowcaddens Road | Glasgow | G4 0BA
________________________________________
From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Tom Reijnders [reijnders at tor.nl<mailto:reijnders at tor.nl>]
Sent: 11 May 2013 12:01
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules

I looked into this further as well, and I've got it working (sort of). The original problem is beyond our control. Something gets changed by showing and closing the preview. I concentrated on the call to popup preview:

Where url is 'preview.php&template_id=4'

getURL("javascript:NewWindow = window.open('"<javascript:NewWindow=window.open('><javascript:NewWindow=window.open('><javascript:NewWindow=window.open('> + url + "','previewwindow','height=" + this.template_height+ ",width=" + this.template_width+ ",linkID=" + tree.selectedNode.attributes.linkID+ "'); NewWindow.focus(); setunload(); void(0);");

What I did:
1. I changed the code to do exactly the same but in a different way:

- From flash call: ExternalInterface.call("openPreview", url, this.template_height, this.template_width);
- Supply javascript function in edit.php that does:

   function openPreview(url, height, width)
   {
       NewWindow = window.open(url, 'previewwindow', 'height=' + height, ',width=' + width);
       NewWindow.focus();
   }

This behaves exactly the same, as in,  it doesn't work. After closing preview, the file browser doesn't pop up any more.

2. So, different approach, without using javascript:

- From flash call: getURL(url, "_blank")

This has as a drawback (or advantage) that the preview is shown in a new window/tab in stead of a popup, and so it ignores/doesn't use the sizes of the window.

BUT it does work!

Is that a viable solution? For firefox only?

Tom

Op 10-5-2013 16:01, Julian Tenney schreef:
Tested the file button, and debugged the FileRef.browse and got Function, so it does exist, before FileRef.browse is called.

Took out all but the void(0) and still failing. Have stripped down the function to this.

I don’t think it is our code. Going for beer.



From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of xerte at pgogywebstuff.com<mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com>
Sent: 10 May 2013 14:58
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules

I'd be cautious of saying it is preview - perhaps it is the file button?

try not setting focus? that seems a possible route?

Pgogy Webstuff http://www.pgogywebstuff.com
Makers of Web things of a fair to middling quality


----- Original Message -----
From:
"For Xerte technical developers" <xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>>

To:
"For Xerte technical developers (xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>)" <xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>>
Cc:

Sent:
Fri, 10 May 2013 14:54:16 +0100
Subject:
[Xerte-dev] Re: wizard files and modules

It boils down to this:


function preview(){




               if(_root.apache!="false"){

                    url = "preview_" + _root.template_id;

               }else{

                    url = "preview.php?template_id=" + _root.template_id;

               }




               saveFile();

               ExternalInterface.call("hideunload");


               getURL("javascript:NewWindow = window.open('"<javascript:NewWindow=window.open('><javascript:NewWindow=window.open('><javascript:NewWindow=window.open('> + url + "','previewwindow','height=" + this.template_height+ ",width=" + this.template_width+ ",linkID=" + tree.selectedNode.attributes.linkID+ "'); NewWindow.focus(); setunload(); void(0);");





}


From: Tenney Julian
Sent: 10 May 2013 14:51
To: 'For Xerte technical developers'
Subject: RE: [Xerte-dev] Re: wizard files and modules


Here be function preview() (I’m guessing you can’t see it? Can you see anything obvious / or anything I can try commenting out / testing to test your theory?)
Probably next week though, I have to go soon,


function preview(){


    if (xerte){

          if (wizard.nfoObject.wizard.runtime != undefined){ //post the xml data into the url specified

               saveFile();

          } else {//play it in Xerte

               //if shift is down, jump straight to this page
               if (Key.isDown(Key.SHIFT)){
                    if (tree.selectedNode.attributes.linkID == undefined){
                          tree.selectedNode.attributes.linkID = 'PG' + new Date().getTime();
                    }
                    //set the linkID in _level0 of the runtime (it is deleted after onInit is fired)
                    mdm.Forms.preview.callFunction("setLinkID", tree.selectedNode.attributes.linkID, "|");
               }
               saveFile();

               this.mode = 'preview';


               //show the preview form
               mdm.form_show("preview");
               mdm.form_restore("preview");

               //fire up the piece
               mdm.form_callfunction("preview", "setMode", mode, "|");
               mdm.form_callfunction("preview", "jumpFile", wizard.rloFile, "|");
          }


    } else { //this is toolkits - play or post?

          if (wizard.nfoObject.wizard.runtime != undefined){

               //hardcoded in here for now - this is a bit messy, needa better way of handling multiple runtimes with all the security etc
               if (wizard.nfoObject.wizard.runtime == 'preview_site.php'){

                    if(_root.apache!="false"){

                          url = "preview_" + _root.template_id;

                    }else{

                          url = "preview.php?template_id=" + _root.template_id;

                    }

                    saveFile();

                    ExternalInterface.call("hideunload");


                    getURL("javascript:NewWindow = window.open('"<javascript:NewWindow=window.open('><javascript:NewWindow=window.open('><javascript:NewWindow=window.open('> + url + "','previewwindow','scrollbars=yes'); NewWindow.focus(); setunload(); void(0);");

               } else {

                    saveFile();

                    wizard.createEmptyMovieClip('getURLHelper', 9999);
                    wizard.getURLHelper.data = KOData.format();
                    wizard.getURLHelper.getURL(wizard.nfoObject.wizard.runtime, "_blank", "POST");

               }

          } else {

               if (Key.isDown(Key.CONTROL)){ //play the html5 version

                    if(_root.apache!="false"){

                          url = "preview_" + _root.template_id + "&engine=other";

                    }else{

                          url = "preview.php?template_id=" + _root.template_id + "&engine=other";

                    }

               } else {

                    if(_root.apache!="false"){

                          url = "preview_" + _root.template_id;

                    }else{

                          url = "preview.php?template_id=" + _root.template_id;

                    }
               }


               //if shift is down, jump straight to this page
               if (Key.isDown(Key.SHIFT)){
                    if (tree.selectedNode.attributes.linkID == undefined){
                          tree.selectedNode.attributes.linkID = 'PG' + new Date().getTime();
                    }

                    if(_root.apache!="false"){

                          url += '_' + tree.selectedNode.attributes.linkID;

                    }else{

                          url += '&linkID=' + tree.selectedNode.attributes.linkID;

                    }
               }
               saveFile();

               ExternalInterface.call("hideunload");


               getURL("javascript:NewWindow = window.open('"<javascript:NewWindow=window.open('><javascript:NewWindow=window.open('><javascript:NewWindow=window.open('> + url + "','previewwindow','height=" + this.template_height+ ",width=" + this.template_width+ ",linkID=" + tree.selectedNode.attributes.linkID+ "'); NewWindow.focus(); setunload(); void(0);");

          }
    }
}


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of xerte at pgogywebstuff.com<mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com>
Sent: 10 May 2013 14:38
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


Windows 7
Firefox 20.1.0
Preview button doesn't work for anything once you've previewed
Flash Player 11.7

Fine in Chrome
No Joy in FF

have commented out all of the JS

So I'm guessing it is in the engine somewhere for FF - possible close event firing too soon?

I'd put some fscommand("console.log") into the wizard.

Pgogy Webstuff http://www.pgogywebstuff.com
Makers of Web things of a fair to middling quality



----- Original Message -----
From:
"For Xerte technical developers" <xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>>


To:
"For Xerte technical developers" <xerte-dev at listsnottingham.ac.uk<mailto:xerte-dev at listsnottingham.ac.uk><mailto:xerte-dev at listsnottingham.ac.uk><mailto:xerte-dev at listsnottingham.ac.uk>>
Cc:


Sent:
Fri, 10 May 2013 14:00:36 +0100
Subject:
[Xerte-dev] Re: wizard files and modules
More specifically 64bit Windows 7


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 10 May 2013 13:58
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


Difference is Windows 7 – everything else the same and I see the problem in both.


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Fay Cross
Sent: 10 May 2013 13:57
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


Windows XP
Firefox 20.0.1
Flash 11.7.700.169


Can’t recreate problem in XOT or Bootstrap, XAMPP or Nottingham install


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottinghamac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk>] On Behalf Of Julian Tenney
Sent: 10 May 2013 13:52
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


It’s like doing the Guardian crossword…


It would be good if everyone can test with the latest firefox and report back


Create a project in Xerte Online Toolkit and Bootstrap
Add a media thing, upload some, press play button in bottom right, close play window, upload media again
Fails in Bootstrap?
Fails in Xerte Online Toolkit?
Flash player version?


If you don’t close the preview window it continues to work OK.




From: xerte-dev-bounces at lists.nottingham.acuk<mailto:xerte-dev-bounces at lists.nottingham.acuk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders
Sent: 10 May 2013 13:40
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


What you have to realise, is that the files LOOK the same, and have the same name, but they ARE different.
Op 10-5-2013 14:33, Julian Tenney schreef:
Probably before I realised that we had the same files in lots of different places

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of xerte at pgogywebstuff.com<mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com><mailto:xerte at pgogywebstuff.com>
Sent: 10 May 2013 13:28
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules

http://code.google.com/p/xerteonlinetoolkits/source/diff?spec=svn885&r=840&format=side&path=/trunk/modules/xerte/edit.php

You might not built the structures, but you set the path



Pgogy Webstuff http://www.pgogywebstuff.com
Makers of Web things of a fair to middling quality


----- Original Message -----
From:
"For Xerte technical developers" <xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>>

To:
"For Xerte technical developers" <xerte-dev at lists.nottingham.ac.uk<mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk><mailto:xerte-dev at lists.nottingham.ac.uk>>
Cc:

Sent:
Fri, 10 May 2013 13:11:19 +0100
Subject:
[Xerte-dev] Re: wizard files and modules
Nope, the wizard.swf file. I did not build the structures that contain modules/Xerte and modules/site, and I did not duplicate all the files that are in there.


From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk><mailto:xerte-dev-bounces at lists.nottingham.acuk><mailto:xerte-dev-bounces at lists.nottingham.acuk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders
Sent: 10 May 2013 13:09
To: For Xerte technical developers
Subject: [Xerte-dev] Re: wizard files and modules


Hmmm... you did that yourself when you fixed the onbeforeunload=function{}(); on April 25....
As far as I can tell you copied the editphp from site over to xerte.
Op 10-5-2013 14:03, Julian Tenney schreef:
OK, now I am really confused.

When I use a xerte online template, the wizard comes from modules/site/engine, not the wizard in modules/Xerte/engine.

Any more cryptic pathing issues set up just for fun?

Sheesh.



_______________________________________________

Xerte-dev mailing list

Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk>

http://lists.nottingham.acuk/mailman/listinfo/xerte-dev<http://listsnottingham.ac.uk/mailman/listinfo/xerte-dev><http://listsnottingham.ac.uk/mailman/listinfo/xerte-dev>


--

--



Tom Reijnders

TOR Informatica

Chopinlaan 27

5242HM Rosmalen

Tel: 073 5226191

Fax: 073 5226196







_______________________________________________

Xerte-dev mailing list

Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk>

http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev



--

--



Tom Reijnders

TOR Informatica

Chopinlaan 27

5242HM Rosmalen

Tel: 073 5226191

Fax: 073 5226196







_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk><mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev



--
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196






Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.



_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.



This message has been checked for viruses but the contents of an attachment

may still contain software viruses which could damage your computer system:

you are advised to perform your own checks. Email communications with the

University of Nottingham may be monitored as permitted by UK legislation.





_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk<mailto:Xerte-dev at lists.nottingham.ac.uk>
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev



--
--

Tom Reijnders
TOR Informatica
Chopinlaan 27
5242HM Rosmalen
Tel: 073 5226191
Fax: 073 5226196






Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html



More information about the Xerte-dev mailing list