[Xerte-dev] Re: google doc + page type order
Ron Mitchell
ronm at mitchellmedia.co.uk
Tue May 29 10:54:26 BST 2012
Haven't seen any XOT updates today?
From: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Tom Reijnders
Sent: 29 May 2012 10:23
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order
Uploading new xerte-beta.exe as we speak.
Did you commit the wizard.swf to xot as well, than we can cross out that
problem from the google doc... :-)
Tom
Op 29-5-2012 11:11, Julian Tenney schreef:
Thanks, that's added too,
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 21:43
To: For Xerte technical developers
Subject: [Xerte-dev] Re: google doc + page type order
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.nfoObj
ect.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.nfoObj
ect.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] 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] 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] 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:
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
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
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
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
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
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/404509c9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 14692 bytes
Desc: not available
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20120529/404509c9/attachment-0001.jpg>
More information about the Xerte-dev
mailing list