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-serv13750
Modified Files:
ChangeLog.txt helpbox.js helpmenu.js loader.js search.css
Log Message:
Bugs:
* Duplicate search function names were not being detected due to an invalid xquery path
* Upcase FORM element were not being detected due to an invalid xquery path
Enhancements:
* User-defined searches are indicated in the help and the qsfind popup with a
different color, and in the
menu with '[local]'
Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/ChangeLog.txt,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** ChangeLog.txt 25 Sep 2002 14:04:59 -0000 1.122
--- ChangeLog.txt 25 Sep 2002 20:22:14 -0000 1.123
***************
*** 30,33 ****
--- 30,35 ----
* Fixed some descriptions in various searches; moved some searches to more
appropriate categories
* User-defined searches can be added to a 'localsearches' subdirectory. These will
not be overwritten on upgrading.
+ User-defined searches are indicated in the help and the qsfind popup with a
+different color, and in the
+ menu with '[local]'
* Modified to display command as tooltip for shortcut on the menu if a name for the
shortcut was supplied.
This is helpful to see what the actual command is from the shortcuts menu without
having to open up localaliases.txt.
***************
*** 35,39 ****
Bug Fixes
! *
--- 37,42 ----
Bug Fixes
! * Duplicate search function names were not being detected due to an invalid xquery
path
! * Upcase FORM element were not being detected due to an invalid xquery path
Index: helpbox.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/helpbox.js,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** helpbox.js 29 Jul 2002 02:40:42 -0000 1.34
--- helpbox.js 25 Sep 2002 20:22:14 -0000 1.35
***************
*** 59,62 ****
--- 59,63 ----
var txt;
var helptable = "";
+ helptable += "<tr><td align=center colspan=50><table><tr class='localSearch'><td
+class='helpboxCommands' style='width: 12px;'></td><td> - indicates a local
+search (loaded from 'localsearches' subdirectory)</td></tr></table></td></tr>\n";
for (i = 0; i < 10; i++)
***************
*** 83,88 ****
var rowclassname = '';
var sortText = '';
! var checked;
if (search.enabled)
{
--- 84,94 ----
var rowclassname = '';
var sortText = '';
+
+ if (search.local)
+ {
+ rowclassname = 'class="localSearch"';
+ }
! var checked = '';
if (search.enabled)
{
***************
*** 91,95 ****
else
{
- checked = '';
rowclassname = 'class="disabledSearch" ';
}
--- 97,100 ----
Index: helpmenu.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/helpmenu.js,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** helpmenu.js 25 Sep 2002 14:03:53 -0000 1.29
--- helpmenu.js 25 Sep 2002 20:22:14 -0000 1.30
***************
*** 33,37 ****
if ( search.enabled )
! mb.AppendMenuItem( search.name + '\t' + (search.menudisplay ?
alias.replace(/&/g, '&&') : ""), // menu text along with alias
search.aliases[0], // function invoked when user
selects menu item
makeToolTipString(search),
--- 33,37 ----
if ( search.enabled )
! mb.AppendMenuItem( search.name + (search.local ? ' [local]' : '' ) + '\t' +
(search.menudisplay ? alias.replace(/&/g, '&&') : ""), // menu text along with alias
search.aliases[0], // function invoked when user
selects menu item
makeToolTipString(search),
Index: loader.js
===================================================================
RCS file: /cvsroot/dqsd/dqsd/loader.js,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** loader.js 25 Sep 2002 14:03:53 -0000 1.51
--- loader.js 25 Sep 2002 20:22:14 -0000 1.52
***************
*** 1,9 ****
// Load the contents of search.xml, aliases, and menu files
! function addsearch(fname, name, desc, link, cat)
{
try
{
! searches[fname] = {fname:fname, name:name, desc:desc, link:link, cat:cat,
fun:eval(fname), aliases:[], enabled:!disabledsearches[fname], menudisplay:true};
if( !aliases[fname] )
addalias( fname, fname );
--- 1,18 ----
// Load the contents of search.xml, aliases, and menu files
! function addsearch(fname, name, desc, link, cat, local)
{
try
{
! searches[fname] = {fname:fname,
! name:name,
! desc:desc,
! link:link,
! cat:cat,
! fun:eval(fname),
! aliases:[],
! enabled:!disabledsearches[fname],
! menudisplay:true,
! local:(typeof local != 'undefined' ? local : false)};
if( !aliases[fname] )
addalias( fname, fname );
***************
*** 140,153 ****
}
- // 1. load search.xml (if present), merge localsearch.xml (if present), merge files
in 'searches' subdirectory
-
var searchRoot = null;
- try
- {
- searchRoot = document.all("searchxml").selectSingleNode("searches");
- }
- catch (e) {}
! // If there's no searchxml XML, then create an empty search root
if (!searchRoot)
{
--- 149,155 ----
}
var searchRoot = null;
! // Create an empty search root
if (!searchRoot)
{
***************
*** 197,201 ****
// Load local searches
! loadSearchesFromDir( "localsearches" );
// 2. eval all the scripts and doc.write all the forms
--- 199,203 ----
// Load local searches
! loadSearchesFromDir( "localsearches", true );
// 2. eval all the scripts and doc.write all the forms
***************
*** 275,289 ****
if(descriptionNode)
{
! // There may be a better way to do this - I'm
! // trying to remove the <description> tags which end-up bracketing
! // the description XML
! descriptionXml = descriptionNode.xml.replace(/\<description\>/, '');
! descriptionXml = descriptionXml.replace(/\<\/description\>/, '');
}
addsearch(fn.text,
(nameNode ? nameNode.text : fn.text),
descriptionXml,
(linkNode ? linkNode.text : null),
! (categoryNode ? categoryNode.text : null));
}
}
--- 277,291 ----
if(descriptionNode)
{
! // There may be a better way to do this - I'm trying to remove
! // the <description> tags which bracket the description XML
! descriptionXml = descriptionNode.xml.replace(/\<\/?description\>/g, '')
}
+ var localsearch = searchNode.attributes.getNamedItem("localsearch") ? true :
+false;
addsearch(fn.text,
(nameNode ? nameNode.text : fn.text),
descriptionXml,
(linkNode ? linkNode.text : null),
! (categoryNode ? categoryNode.text : null),
! localsearch);
}
}
***************
*** 321,325 ****
! function loadSearchesFromDir( directory )
{
--- 323,327 ----
! function loadSearchesFromDir( directory, local )
{
***************
*** 335,340 ****
if ( !/\.xml$/.test( fileSearches[i] ) )
continue;
!
! loadSearchFile( directory + "\\" + fileSearches[i] );
}
--- 337,342 ----
if ( !/\.xml$/.test( fileSearches[i] ) )
continue;
!
! loadSearchFile( directory + "\\" + fileSearches[i], local );
}
***************
*** 374,378 ****
}
! function loadSearchFile( path )
{
var xml = readFile(path);
--- 376,380 ----
}
! function loadSearchFile( path, local )
{
var xml = readFile(path);
***************
*** 386,402 ****
var searchNode = xmldoc.selectSingleNode("/search");
var funcname = searchNode.attributes.getNamedItem("function").text;
! if (alertmode && searchRoot.selectSingleNode("/searches/search[@function='" +
funcname + "']"))
{
! qualifiedalert('Search "' + funcname + '" found in ' + path + ' already
exists.');
! return;
}
! else if (alertmode && searchNode.selectSingleNode("/search" + "/FORM"))
{
! alert('Search "' + funcname + '" has a <FORM> element which probably needs to
be lowercased (<form>)');
}
! else
{
! searchRoot.appendChild(searchNode);
}
}
}
--- 388,415 ----
var searchNode = xmldoc.selectSingleNode("/search");
var funcname = searchNode.attributes.getNamedItem("function").text;
!
! // If the search already exists, override with this new one
! var existingSearchNode = searchRoot.selectSingleNode("/search[@function='" +
funcname + "']");
! if ( existingSearchNode )
{
! if ( alertmode )
! {
! alert('Search "' + funcname + '" found in ' + path + ' already exists. It
will override the existing search.');
! }
! searchRoot.removeChild( existingSearchNode );
}
!
! // Check to see if the element is lowercase (which it needs to be)
! if (alertmode && searchNode.selectSingleNode("/search[@function='" + funcname +
"']/FORM"))
{
! alert('Search "' + funcname + '" found in ' + path + ' has a <FORM> element
which needs to be lowercased (<form>)');
}
!
! if ( typeof local != 'undefined' && local == true )
{
! searchNode.attributes.setNamedItem( xmldoc.createAttribute("localsearch") );
}
+
+ searchRoot.appendChild(searchNode);
}
}
Index: search.css
===================================================================
RCS file: /cvsroot/dqsd/dqsd/search.css,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** search.css 26 Jul 2002 21:42:47 -0000 1.17
--- search.css 25 Sep 2002 20:22:14 -0000 1.18
***************
*** 281,284 ****
--- 281,288 ----
color: graytext;
}
+ TR.localSearch .helpboxCommands
+ {
+ background-color:#008000;
+ }
TABLE.helpboxDescTable
-------------------------------------------------------
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/