[Xerte-dev] Re: google doc + page type order

Julian Tenney Julian.Tenney at nottingham.ac.uk
Tue May 29 10:10:44 BST 2012


Done that so it positions next to the menu, nice one,

[cid:image003.png at 01CD3D83.4F81A900]

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 29 May 2012 09:46
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order

Good idea, or put it next to the menu,

From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders
Sent: 28 May 2012 22:02
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order

Also, the Interactivity menu is too long now (it goes over the preview)

Put the preview (menuHint) on the other side?

[cid:image004.png at 01CD3D83.4F81A900]

Op 28-5-2012 22:43, Tom Reijnders schreef:
Julian,

It's because you push i (the newnode name) on the sortArray. A bit surprising that the sortOn is working, as there is no attribute menuItem to sort on.

Then you insert the menu's in the order of there newNodes names, and that causes some anomalies.

Also, the orginal code had a provision for that case when the menuItem attribute was not set, and that will not work with your original code. Don't know whether that will ever happen, but I changed that part too:
var sortArray = new Array();
    for (var i in wizard.nfoObject.wizard[nodeType].newNodes){
        if (wizard.nfoObject.wizard[i].menuItem != undefined){
            sortArray.push({menuItem:wizard.nfoObject.wizard[i].menuItem, node:i});
        }
        else
        {
            sortArray.push({menuItem:i, node:i});
        }
    }
    sortArray.sortOn("menuItem", Array.CASEINSENSITIVE);
    // dump array
    //var str="";
    //for (var n = 0; n < sortArray.length; n++){
    //    i = sortArray[n].node;
    //    str += i + ", " + wizard.nfoObject.wizard[i].menuItem + "\n";
    //}
    mdm.Prompt(str);
    for (var n = 0; n < sortArray.length; n++){
        i = sortArray[n].node;
        //for (var i in wizard.nfoObject.wizard[nodeType].newNodes){
         if (wizard.nfoObject.wizard[i].menu != undefined){
            insertMenu[wizard.nfoObject.wizard[i].menu].addMenuItem({label:wizard.nfoObject.wizard[i].menuItem != undefined ? wizard.nfoObject.wizard[i].menuItem : i, icon:wizard.nfoObject.wizard[i].icon, data: i, thumb: wizard.nfoObject.wizard[i].thumb, hint: wizard.nfoObject.wizard[i].hint});
        } else {
            insertMenu.addMenuItem({label:wizard.nfoObject.wizard[i].menuItem != undefined ? wizard.nfoObject.wizard[i].menuItem : i, icon:wizard.nfoObject.wizard[i].icon, data: i, thumb: wizard.nfoObject.wizard[i].thumb, hint: wizard.nfoObject.wizard[i].hint});
        }
    }

Op 28-5-2012 17:53, Julian Tenney schreef:
Not sure what I'm doing wrong here, and I've spent all afternoon trying to figure it out: this approach, building an array of ovbjects first,t then sorting them, then looping over it to drive the menu building more or less works, but a few items don't appear in a-z order, and I have no idea why not.               I've checked the code in for now, take a look by all means, but I'll have another look tomorrow,


var sortArray = new Array();
       for (var i in wizard.nfoObject.wizard[nodeType].newNodes[0]){

              if (wizard.nfoObject.wizard[i].menuItem != undefined){
                     sortArray.push(i);
              }
       }
       sortArray.sortOn('menuItem' );

       for (var n = 0; n < sortArray.length; n++){

              i = sortArray[n];

       //for (var i in wizard.nfoObject.wizard[nodeType].newNodes){
              if (wizard.nfoObject.wizard[i].menu != undefined){
                     insertMenu[wizard.nfoObject.wizard[i].menu].addMenuItem({label:wizard.nfoObject.wizard[i].menuItem != undefined ? wizard.nfoObject.wizard[i].menuItem : i, icon:wizard.nfoObject.wizard[i].icon, data: i, thumb: wizard.nfoObject.wizard[i].thumb, hint: wizard.nfoObject.wizard[i].hint});
              } else {
                     insertMenu.addMenuItem({label:wizard.nfoObject.wizard[i].menuItem != undefined ? wizard.nfoObject.wizard[i].menuItem : i, icon:wizard.nfoObject.wizard[i].icon, data: i, thumb: wizard.nfoObject.wizard[i].thumb, hint: wizard.nfoObject.wizard[i].hint});
              }
       }

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] On Behalf Of Tom Reijnders
Sent: 28 May 2012 13:34
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order

I don't do that, you did in the wizard (at least that's how I understand the code, makeInsertMenu(nodeType)) or am I looking in the wrong place? I didn't touch that code.

Op 28-5-2012 14:30, Julian Tenney schreef:
You're building it off the order of the nodes in the xwd?

I don't know either, but they do come out reversed.

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] On Behalf Of Tom Reijnders
Sent: 28 May 2012 13:29
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order

I thought I did that (or at least in the order of the newNodes, which strictly speaking is not alphabetical but close (the name of the xwd is not the name of the menu)

However, even doing that, the meu comes out in reverse order, and I like to understand why before fixing things.


Op 28-5-2012 14:25, Julian Tenney schreef:
The insert menu is fine like that, can we sort the child menus to be A-Z?

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] On Behalf Of Tom Reijnders
Sent: 28 May 2012 12:27
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order

The page order is determined by the order in which the newNodes appear in the data.xwd (template.xwd). The builder (at the moment) does that in the order it encounters the files on disk. I tried to order on the xwds but somehow the menu is still not ordered the way I would expect.

Not sure what to do about it.

And yes the builder is ready, we use it all the time.

Tom

Op 28-5-2012 13:10, Ron Mitchell schreef:
Hi all
a quick update re the issues listed in the Google doc

Jonathan - thanks for updating the Google doc. I've moved all the issues that you've indicated as closed to the fixed sheet. I know you've committed some updated files to the Xerte svn so I assume you'll be updating the XOT svn with the same files at some point? I'll watch the rss feed for any updates and update the test install when those updates are notified by the feed.

All -  at the moment there are 4 issues remaining in the tests and issues sheet. I think most of these are minor but can't recall if we've discussed the order of page types in each category and if there's a change needed? e.g. at the moment the order of page types within each category doesn't appear to be alphabetical or in the same order as previous versions. I seem to recall the consensus was that the category order is fine now e.g. Text then Media then Navigators etc but for instance at the moment the media category looks like this:
[cid:image005.jpg at 01CD3D83.4F81A900]
Which doesn't appear to be alphabetical but can it be?

Also a related question for Tom I guess - is your xwd builder code ready for this release? Would be great to test that and I think would be especially useful if we can document how admins might add or remove page types and then re-run the builder direct in XOT.

Cheers
Ron


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



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.







--

--



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>

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.






--

--



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>

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.





--

--



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>

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.




--

--



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>

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.




--

--



Tom Reijnders

TOR Informatica

Chopinlaan 27

5242HM Rosmalen

Tel: 073 5226191

Fax: 073 5226196


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120529/78bdbd58/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 73256 bytes
Desc: image003.png
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120529/78bdbd58/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 87839 bytes
Desc: image004.png
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120529/78bdbd58/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.jpg
Type: image/jpeg
Size: 14692 bytes
Desc: image005.jpg
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120529/78bdbd58/attachment-0001.jpg>


More information about the Xerte-dev mailing list