[Xerte-dev] Re: wizard files and modules

Pat @ Pgogy xerte at pgogywebstuff.com
Sun May 12 12:31:41 BST 2013


Do you still need swf object?

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

> I think we're running into a few version/library problems which is causing it...
> 
> So Fay's code is using v2.2 of SWFObject but the editor is using v1.5
> 
> Also, the flash preview isn't using either, it appears to be using rloObject.js to create the Flash...
> 
> 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 11:27
> To: For Xerte technical developers
> Subject: [Xerte-dev] Re: wizard files and modules
> 
> I don't know. I thought it is needed to display swf's inside the content.
> Fay should know the definitive answer to that.
> 
> But that doesn't help when the preview is flash...
> 
> Tom
> 
> Op 12-5-2013 12:04, Smith, John schreef:
>> 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 p



More information about the Xerte-dev mailing list