View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd
In directory usw-pr-cvs1:/tmp/cvs-serv28963
Modified Files:
helpmenu.js
Log Message:
fixed help menu to sort the subcategories first in order and then the searches
Index: helpmenu.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/helpmenu.js,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** helpmenu.js 29 Sep 2002 06:37:52 -0000 1.33
--- helpmenu.js 11 Oct 2002 05:29:53 -0000 1.34
***************
*** 7,10 ****
--- 7,35 ----
}
+ function searchCompareWithSubcatPath( s1, s2 )
+ {
+ var s1_subcatPath = "";
+ var s2_subcatPath = "";
+
+ if ( s1.subcats && s1.subcats.length >= 1 ) {
+ for ( var isubmenu = 0; isubmenu < s1.subcats.length; isubmenu++ ) {
+ s1_subcatPath += '~' + s1.subcats[ isubmenu ].toLowerCase();
+ }
+ }
+
+ if ( s2.subcats && s2.subcats.length >= 1 ) {
+ for ( var isubmenu = 0; isubmenu < s2.subcats.length; isubmenu++ ) {
+ s2_subcatPath += '~' + s2.subcats[ isubmenu ].toLowerCase();
+ }
+ }
+
+ if (s1_subcatPath == "" && s2_subcatPath != "") return 1;
+ if (s1_subcatPath != "" && s2_subcatPath == "") return -1;
+ if (s1_subcatPath < s2_subcatPath) return -1;
+ if (s1_subcatPath > s2_subcatPath) return 1;
+
+ return searchCompare(s1, s2)
+ }
+
function showpop()
{
***************
*** 37,41 ****
var hcatmenu = mb.AppendSubMenu( categoryName );
! helparray.sort( searchCompare );
for (var k = 0; k < helparray.length; k++)
{
--- 62,66 ----
var hcatmenu = mb.AppendSubMenu( categoryName );
! helparray.sort( searchCompareWithSubcatPath );
for (var k = 0; k < helparray.length; k++)
{
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/