[Codestriker-commits] CVS update: codestriker/template/en/default createproject.html.tmpl createtopi
Brought to you by:
sits
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=8012688&action=view User: sits Date: 05/02/21 03:25:35 Modified: . codestriker.conf lib/Codestriker/Action ViewTopic.pm lib/Codestriker/Http Render.pm Response.pm lib/Codestriker/Model Comment.pm template/en/default createproject.html.tmpl createtopic.html.tmpl editproject.html.tmpl header.html.tmpl listprojects.html.tmpl listtopics.html.tmpl metricsreport.html.tmpl search.html.tmpl submitnewcomment.html.tmpl submitnewtopic.html.tmpl viewtopic.html.tmpl viewtopiccomments.html.tmpl viewtopicheader.html.tmpl viewtopicinfo.html.tmpl viewtopicproperties.html.tmpl Added: html codestriker.js xbdhtml.js Log: Store the comment data in javascript-land as well, which allows the comment tooltips to navigate between the different comments, using some overlib and CSS-P magic. Still needs some more work, but this is a good start. Eventually, we should be able to add a comment via overlib as well, perhaps within an IFRAME. Index: codestriker.conf =================================================================== RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- codestriker.conf 21 Dec 2004 22:44:22 -0000 1.68 +++ codestriker.conf 21 Feb 2005 11:25:00 -0000 1.69 @@ -1,8 +1,10 @@ # -*-perl-*- # Configuration file for codestriker.pl. -# Database to use for storing codestriker data. Examples given are -# Oracle, SQL Server, PostgreSQL and MySQL. +# Database to use for storing codestriker data. Examples given are +# Oracle, SQL Server, PostgreSQL and MySQL. Refer to the +# documentation on how to create the Codestriker database. + #$db = 'DBI:Oracle:host=127.0.0.1;sid=local'; #$db = 'DBI:ODBC:Codestriker'; #$db = 'DBI:Pg:dbname=codestrikerdb'; @@ -64,7 +66,7 @@ # end of this string when URLs are generated. This can be left blank if # there is no need for bug-tracking integration. $bugtracker = ''; -#$bugtracker = 'http://localhost.localdomain/show_bug.cgi?id='; +$bugtracker = 'http://localhost.localdomain/bugzilla/show_bug.cgi?id='; # Valid repositories which may be selected at the create topic screen. # The order shown here is the order presented in the option list. Most @@ -294,8 +296,8 @@ # $bug_db to "bugzilla", and set the following parameters to your setup. # if the $bug_db is an empty string, all bug-tracking related features will # be disabled. -$bug_db = ''; -#$bug_db = 'bugzilla'; +#$bug_db = ''; +$bug_db = 'bugzilla'; # Bug database connection details. $bug_db_host = 'localhost'; Index: codestriker.js =================================================================== RCS file: codestriker.js diff -N codestriker.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ codestriker.js 21 Feb 2005 11:25:05 -0000 1.1 @@ -0,0 +1,65 @@ +// Global settings for overLIB. +ol_fgcolor = '#FFFFCC'; +ol_textsize = '2'; + +// Records what topicid is being processed. +var topicid = ''; + +// Handle to the popup window. +var windowHandle = ''; + +function myOpen(url,name) { + windowHandle = window.open(url,name, + 'toolbar=no,width=800,height=600,status=yes,scrollbars=yes,resizable=yes,menubar=no'); + // Indicate who initiated this operation. + windowHandle.opener = window; + + windowHandle.focus(); +} + +// Edit open function. Name is kept short to reduce output size. +function eo(fn,line,newfile) { + var location = window.location; + myOpen(location.protocol + '//' + location.host + + location.pathname + '?fn=' + fn + '&line=' + line + + '&new=' + newfile + '&topic=' + topicid + '&action=edit&a=' + + fn + '|' + line + '|' + newfile, 'e'); +} + +function gotoAnchor(anchor, reload) { + if (anchor == "" || opener == null) return; + + var index = opener.location.href.lastIndexOf("#"); + if (index != -1) { + opener.location.href = + opener.location.href.substr(0, index) + "#" + anchor; + } + else { + opener.location.href += "#" + anchor; + } + + if (reload) opener.location.reload(reload); + opener.focus(); +} + +// Called by a body onload handler for the view topic page, to tooltip +// the comment associated with an anchor that has comments made +// against it. +function view_topic_on_load_handler() +{ + // If the URL loaded contains an anchor, check if there is a comment + // associated with it. + var anchor = window.location.hash; + if (anchor != null) { + // Remove the leading # character. + anchor = anchor.substr(1); + var comment_number = comment_hash[anchor]; + if (comment_number != null) { + // We have a comment on this line, bring up the tooltip. + overlib(comment_text[comment_number], STICKY, + FIXX, getEltPageLeft(getElt('c' + comment_number)), + FIXY, getEltPageTop(getElt('c' + comment_number))); + } + } +} + Index: xbdhtml.js =================================================================== RCS file: xbdhtml.js diff -N xbdhtml.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ xbdhtml.js 21 Feb 2005 11:25:05 -0000 1.1 @@ -0,0 +1,913 @@ +/* xbdhtml.js (Cross-Browser Nav4/Gecko/IE DHTML API) + 14 May 98, Eric Krock, Copyright Netscape Communications + Permission is granted to reuse, redistribute, and modify + without charge. + + Updated 18 July 2000 by Vladimir Ermakov, Netscape Communications, + and Marcell Ortutay, Plugged in Enterprises, to include support of + the new Netscape Gecko layout engine. + + Updated 15 of February 2001 by Vladimir Ermakov, Netscape Communications: + New Features + -showElt/hideElt -convenience functions to use insead of setEltVisibility + -setEltWidth/setEltHeight -Set the width/height of a layer + -getEltPageLeft/getEltPageTop -XBrowser version of Nav4 pageX/pageY + -stringToNumber -Returns 0 instead of NaN + Improved: + -getEltWidth/getEltHeight -Return offsetWidth if width not specified. + -Also, where possible, replaced detection by browser with detection by property + + Updated October 02, 2001 by Bob Clary, Netscape Communications + Misc + - changed reference to Ultimate Browser Sniffer on mozilla.org + Bugs Fixed + - hideElt -fixed missing argument to setEltVisibility + - getEltPageTop -added marginTop for IE5/Mac + + Makes CSSP functionality and properties of positioned, named + elements accessible from JavaScript in Netscape 4.x, IE and user + agents implementing Gecko layout engine offering a single set of functions which + can be used on both browsers, bridging DOM differences. + + Allows you to do these things from JavaScript on Nav4+/IE4+/Gecko: + - get element object by specifying its name + - hide/show element + - get/set X, Y, Z position of element + - get element height/width + - get/set clipping area (visible area) of element + - get/set background color and background image of element + + Also includes simplified JavaScript client sniffer and + functions to ease dynamic, conditional generation of HTML + markup via document.write() statements. + + Design goals: + - forwardly compatible with future DOM enhancements + - redefinable stub function API + - coexist peacefully with other libraries + - no function name conflicts with cbdhtml.js, etc. + - keep # of functions reasonable and use parameters to specify values + - naming convention for functions easy to learn and remember + - make as short as possible to type + - loadable (though not executable!) without error on Nav3 since Nav3 + sometimes loads <SCRIPT LANGUAGE="JavaScript1.2" SRC=___.js> + - usable in part or in whole; don't have to use whole thing + - can copy and paste individual functions into existing code + Exceptions to this rule: + 1) you must include Is() constructor function and an + instance of "is" global variable; all functions depend on this. + 2) getEltBackgroundColor depends on the color-related functions; + to use it, you must include the others as well; + 3) all the functions for getting the clipping area + (getEltClipLeft getEltClipTop getEltClipRight + getEltClipBottom getEltClipWidth getEltClipHeight) + depend on tempClipObj for use on IE4. + + Usage notes: + - Place the SCRIPT element which links to this JavaScript file, xbdhtml.js, + before your own SCRIPT which calls its functions. + + Example of correct usage: in the HEAD, place this HTML markup: + + <!-- This external script defines cross-browser functions for + accessing CSSP and element properties. --> + <SCRIPT LANGUAGE="JavaScript1.2" SRC=xbdhtml.js> </SCRIPT> + <!-- Make your function calls to manipulate elements in this + SCRIPT, now that the functions have been loaded. --> + <SCRIPT LANGUAGE="JavaScript1.2"><!-- + //-*** put your function calls here *** + //--></SCRIPT> +*/ + + +// This is a simplified version of the JavaScript Client Sniffer code +// found at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html + +function Is () +{ // convert all characters to lowercase to simplify testing + var agt=navigator.userAgent.toLowerCase() + + // --- BROWSER VERSION --- + this.major = stringToNumber(navigator.appVersion) + this.minor = parseFloat(navigator.appVersion) + + this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) + && (agt.indexOf('compatible') == -1))) + this.nav2 = (this.nav && (this.major == 2)) + this.nav3 = (this.nav && (this.major == 3)) + this.nav4 = (this.nav && (this.major == 4)) + + //Netscape 6 + this.nav5 = (this.nav && (this.major == 5)) + this.nav6 = (this.nav && (this.major == 5)) + this.gecko = (this.nav && (this.major >= 5)) + + this.ie = (agt.indexOf("msie") != -1) + this.ie3 = (this.ie && (this.major == 2)) + this.ie4 = (this.ie && (this.major == 3)) + this.ie5 = (this.ie && (this.major == 4)) + + + this.opera = (agt.indexOf("opera") != -1) + + this.nav4up = this.nav && (this.major >= 4) + this.ie4up = this.ie && (this.major >= 4) +} + + +var is = new Is(); + +// Convenience functions to ease dynamic/conditional markup +// generation depending upon browser vendor/version/OS. + +// convenience function to save typing out document.write("STRING"); +// if optional second argument minVersion passed in, +// only write if >= that version; +// if optional third argument maxVersion passed in, +// only execute if <= that version; + +function dw(str, minVersion, maxVersion) +{ if ( ((dw.arguments.length < 3) || (is.major <= maxVersion)) + && ((dw.arguments.length < 2) || (is.major >= minVersion))) + document.write(str) +} + + + +// document write boolean +// convenience function to save typing out +// if (aBoolean) document.write("STRING"); +// if optional second argument aBoolean passed in, only write if +// aBoolean is true. + +function dwb (str, aBoolean) +{ if ((dwb.arguments.length < 2) || aBoolean) + document.write(str) +} + + + +// string version: +// convenience function to return str or "" depending on version; +// if optional second argument version passed in, +// only return str if >= that version; +// if optional third argument maxVersion passed in, +// only return str if <= that version; + +function sv(str, minVersion, maxVersion) +{ if ( ((sv.arguments.length < 3) || (is.major <= maxVersion)) + && ((sv.arguments.length < 2) || (is.major >= minVersion))) + return str; + else return ""; +} + + + +// string boolean +// convenience function to save typing out +// (aBoolean)?"STRING":"" +// if optional second argument aBoolean passed in, only return +// str if aBoolean is true, else return "". + +function sb (str, aBoolean) +{ if ((sb.arguments.length < 2) || aBoolean) + return str; + else return ""; +} + + + + +/* The following stub function API for cross-browser HTML + element positioning and visibility (CSSP access) was + derived from Mike Hall's excellent CBDHTML API. + + Thanks also to Danny Goodman (http://www.dannyg.com/) + and Dan Steinman (http://members.xoom.com/dynduo/). + + USAGE NOTE: when using the functions which get element CSSP + properties [getEltLeft, getEltTop, etc.], keep in mind the + following IE4 CSSP property initialization problem: if you + initialize a property value by CSSP markup, e.g.: + #foo { left: 100px } + rather than initializing them from JavaScript, e.g.: + var fooElt = getElt ("foo"); + setEltLeft (fooElt, 100); + ... the property value for the element's JavaScript style + object (i.e. document.all.foo.style.left) is not set to the + initial value! This is true for a number of IE4 style object + properties including left, top, and clip. Before you get one of these + properties in IE4, you must first set it from JavaScript. + Workaround: set the property via JavaScript instead of CSSP + markup, or set it from both to the same value. +*/ + + +/* functions genElt, writeElt, and layerClipOrder + + Sometimes dynamically generating markup which is optimized for the + current browser will simplify development. genElt will generate + a named DIV on IE4 and Netscape6, and a LAYER/ILAYER tag on Nav4 as a string. + writeElt will create the same string and write it out. + + These three functions must be reused as a group. writeElt calls + genElt, and those two both call layerClipOrder. + + ARGUMENTS OF FUNCTIONS genElt AND writeElt + + genElt and writeElt have identical argument lists. + + The first argument, name, is required. All of the other arguments + default to false and can be explicitly set to false or + omitted. Those properties will be hard coded into the HTML markup + if the argument is provided, and left unset if the argument is set + to false or omitted. + + For example, both of these function calls have the same effect. + They will generate a named, positioned element but not specify + any of the properties, and will write out + the element and content even on Nav3/IE3 and earlier: + writeElt ("foo"); + writeElt ("foo", false, false, false); + + name STRING. Name of element's ID. + content STRING. Content written within element. + left INTEGER. Left edge of element in pixels. + top INTEGER. Top edge of element in pixels. + z INTEGER. z-index of element. + width INTEGER. width in pixels. + height INTEGER. height in pixels. + visibility STRING. "visible", "hidden", or "inherit". + backgroundColor STRING. Background color of element. + backgroundImage STRING. Background image of element. + clip STRING. Comma-delimited list (no spaces!) of 4 + integers in top-right-bottom-left order. Sets clip. + relative BOOLEAN. If true, position relatively, else absolutely. + On Nav4, this determines whether LAYER (absolute) or + ILAYER (relative) is generated. + hideEltOnOlderBrowsers BOOLEAN. If true, return '' on Nav3, IE3, and older. + useDivInsteadOfLayer BOOLEAN. If true, generate DIV on Nav4 not I/LAYER. + classname STRING. CLASS attribute value for element. + + 'genElt' is short for 'generate element markup'. +*/ + +/* maps css order <top>,<right>,<bottom>,<left> to + LAYER CLIP= order <left>,<top>,<right>,<bottom> */ +function layerClipOrder (cssClipString) +{ var commaPos = cssClipString.lastIndexOf(","); + return (cssClipString.substring(commaPos+1) + "," + cssClipString.substring(0,commaPos)); +} + +function genElt (name, content, left, top, z, width, height, visibility, + backgroundColor, backgroundImage, clip, relative, + hideEltOnOlderBrowsers, useDivInsteadOfLayer, classname) +{ var markup = ""; + if (is.gecko) + { + markup = '<DIV ID="' + name + '"' + + ((classname)?' CLASS="' + classname + '"':'') + + ' STYLE="position:' + ((relative)?'relative;':'absolute;') + + ' overflow:none;' + + ((left)?' left:' + left + 'px;':'') + + ((top)?' top:' + top + 'px;':'') + + ((height)?' height:' + height + 'px;':'') + + ((width)?' width:' + width + 'px;':'') + + ((visibility && (visibility!='')) ? ' visibility:' + visibility + ';' : '') + + ((z)?' z-index:' + z + ';':'') + + ((backgroundColor)?' background-color:' + backgroundColor + ';':'') + + ((backgroundImage)?' background-image:url("' + backgroundImage + '");':'') + + ((clip)?' clip:rect("' + clip + '");':'') + + '">' + ((content)?content:'') + '</DIV>'; + } + + else if (is.nav && (is.major == 4 || !hideEltOnOlderBrowsers) && + !useDivInsteadOfLayer) + { var tagname = (relative)?'ILAYER':'LAYER'; + if (visibility && (visibility!='')) + { if (visibility=="hidden") visibility = "hide"; + else if (visibility=="visible") visibility = "show"; + } + markup = '<' + tagname + ' ID="' + name + '"' + ((classname)?' CLASS="' + + classname + '"':'') + ((left)?' LEFT="' + left + '"':'') + + ((top)?' TOP="' + top + '"':'') + ((width)?' WIDTH="' + width + '"':'') + + ((height)?' HEIGHT="' + height + '"':'') + + ((visibility && (visibility!='')) ? ' VISIBILITY="' + visibility + '"' : '') + + ((z)?' Z-INDEX="' + z + '"':'') + + ((backgroundColor)?' BGCOLOR="' + backgroundColor + '"':'') + + ((backgroundImage)?' BACKGROUND="' + backgroundImage + '"':'') + + ((clip)?' CLIP="' + layerClipOrder(clip) + '"':'') + + '>' + ((content)?content:'') + '</' + tagname + '>'; + } + + else if ((is.ie || (is.nav && useDivInsteadOfLayer)) && (is.major>=4 || !hideEltOnOlderBrowsers)) + { markup = '<DIV ID="' + name + '"' + + ((classname)?' CLASS="' + classname + '"':'') + + ' STYLE="position:' + ((relative)?'relative;':'absolute;') + + ' overflow:none;' + + ((left)?' left:' + left + 'px;':'') + + ((top)?' top:' + top + 'px;':'') + + ((height)?' height:' + height + 'px;':'') + + ((width)?' width:' + width + 'px;':'') + + ((visibility && (visibility!='')) ? ' visibility:' + visibility + ';' : '') + + ((z)?' z-index:' + z + ';':'') + + ((backgroundColor)?' background-color:' + backgroundColor + ';':'') + + ((backgroundImage)?' background-image:url("' + backgroundImage + '");':'') + + ((clip)?' clip:rect("' + clip + '");':'') + + '">' + ((content)?content:'') + '</DIV>'; + } + + return markup; +} + +function writeElt (name, content, left, top, z, width, height, visibility, + backgroundColor, backgroundImage, clip, relative, + hideEltOnOlderBrowsers, useDivInsteadOfLayer, classname) +{ if (writeElt.arguments.length < 15) classname = false; + if (writeElt.arguments.length < 14) useDivInsteadOfLayer = false; + if (writeElt.arguments.length < 13) hideEltOnOlderBrowsers = false; + if (writeElt.arguments.length < 12) relative = false; + if (writeElt.arguments.length < 11) clip = false; + if (writeElt.arguments.length < 10) backgroundImage = false; + if (writeElt.arguments.length < 9) backgroundColor = false; + if (writeElt.arguments.length < 8) visibility = false; + if (writeElt.arguments.length < 7) height = false; + if (writeElt.arguments.length < 6) width = false; + if (writeElt.arguments.length < 5) z = false; + if (writeElt.arguments.length < 4) top = false; + if (writeElt.arguments.length < 3) left = false; + if (writeElt.arguments.length < 2) content = false; + document.write (genElt (name, content, left, top, z, width, height, visibility, + backgroundColor, backgroundImage, clip, relative, + hideEltOnOlderBrowsers, useDivInsteadOfLayer, classname)); +} + + +/* CALLING SYNTAX: each Name is a string which is an element's + ID attribute value or a LAYER tag's NAME attribute value. + + getElt (topLevelElementName, childElementName, grandchildElementName ... + targetElementName) + + Example of getting a top-level element: + var fooElement = getElt ("foo") + + Example of getting a nested element: + var fooElement = getElt ("bar", "baz", "foo") + ... where baz is foo's containing parent, and bar is a top-level + element which is baz's containing parent. +*/ + +function getElt () +{ if (is.nav4) + { + var currentLayer = document.layers[getElt.arguments[0]]; + for (var i=1; i<getElt.arguments.length && currentLayer; i++) + { currentLayer = currentLayer.document.layers[getElt.arguments[i]]; + } + return currentLayer; + } + else if(document.getElementById && document.getElementsByName) + { + var name = getElt.arguments[getElt.arguments.length-1]; + if(document.getElementById(name)) //First try to find by id + return document.getElementById(name); + else if (document.getElementsByName(name)) //Then if that fails by name + return document.getElementsByName(name)[0]; + } + else if (is.ie4up) { + var elt = eval('document.all.' + getElt.arguments[getElt.arguments.length-1]); + return(elt); + } + +} + +function showElt(elt) +{ + setEltVisibility(elt,'visible'); +} + +function hideElt(elt) +{ + setEltVisibility(elt, 'hidden'); +} + +/* value must be "visible", "hidden", or "inherit". + These values work on Nav4, Gecko and IE for setting visibility. +*/ +function setEltVisibility (elt, value) +{ if (is.nav4) elt.visibility = value; + else if (elt.style) elt.style.visibility = value; +} + + + +/* Return values are strings "visible", "hidden", or "inherit". + This is consistent with CSS1 and IE4 usage and the settable + values on all three browsers. Note that Nav4 + by default returns "show" and "hide" and that these values + are mapped to "visible" and "hidden" to provide consistent + return values across browsers. */ + +function getEltVisibility (elt) +{ if (is.nav4) + { var value = elt.visibility; + if (value == "show") return "visible"; + else if (value == "hide") return "hidden"; + else return value; + } + else if (elt.style) return elt.style.visibility; +} + + + +/* Move elt to pixel location x,y within its coordinate system, + which is the window content area for top-level elements or + the parent element's coordinates for nested elements which + have an absolutely positioned parent. +*/ + +function moveEltTo (elt, x, y) +{ if (is.nav4) elt.moveTo(x, y); + else if (is.ie4up) { + elt.style.pixelLeft = x; + elt.style.pixelTop = y; + } + else if (is.gecko) { + elt.style.left = x; + elt.style.top = y; + } +} + + +/* Offset elt's pixel location by x,y pixels. */ + +function moveEltBy (elt, x, y) +{ if (is.nav4) elt.moveBy(x, y); + else if (is.ie4up) { + elt.style.pixelLeft += x; + elt.style.pixelTop += y; + } + else if (is.gecko) { + elt.style.left = (stringToNumber(elt.style.left) + x + "px"); + elt.style.top = (stringToNumber(elt.style.top) + y + "px"); + } +} + +/* xbrowser pageX equivalent*/ +function getEltPageLeft(elt) { + var x; + + if (is.nav4) + return elt.pageX; + if (is.ie4up) { + x = 0; + while (elt.offsetParent != null) { + x += elt.offsetLeft; + elt = elt.offsetParent; + } + x += elt.offsetLeft; + return x; + } + if (is.gecko) { + x = 0; + while (elt.offsetParent != null) { + x += elt.offsetLeft; + elt = elt.offsetParent; + } + x += elt.offsetLeft; + return x; + } + return -1; +} + +/* xbrowser pageY equivalent */ +function getEltPageTop(elt) { + var y = 0; + + if (is.nav4) + return elt.pageY; + if (is.ie4up) { + while (elt.offsetParent != null) { + y += elt.offsetTop; + elt = elt.offsetParent; + } + y += elt.offsetTop; + return y; + } + + /* ie5/mac modification added per comment from David Weingard */ + if (is.mac && is.ie5) + { + y += stringToNumber(document.body.currentStyle.marginTop); + } + + if (is.gecko) { + while (elt.offsetParent != null) { + y += elt.offsetTop; + elt = elt.offsetParent; + } + y += elt.offsetTop; + return y; + } + return -1; +} + +/* Sets position of left edge of elt in pixels. */ +function setEltLeft (elt, x) { + if (is.nav4) elt.left=x; + else if (is.ie4up) elt.style.pixelLeft=x; + else if (is.gecko) elt.style.left = (x + "px"); +} + + +/* Returns left edge of elt in pixels. */ +function getEltLeft (elt) { + if (is.nav4) return (elt.left); + else if (is.ie4up) return (elt.style.pixelLeft); + else if (is.gecko) return stringToNumber(elt.style.left); +} + +/* Sets top edge of elt in pixels. */ +function setEltTop (elt, y) +{ if (is.nav4) elt.top=y; + else if (is.ie4up) elt.style.pixelTop=y; + else if (is.gecko) elt.style.top= (y + "px"); +} + +/* Returns top edge of elt in pixels. */ +function getEltTop (elt) +{ if (is.nav4) return (elt.top); + else if (is.ie4up) return (elt.style.pixelTop); + else if (is.gecko) return stringToNumber(elt.style.top); +} + +/* Returns width of elt in pixels. */ +function getEltWidth(elt) { + + if (is.nav4) { + if (elt.document.width) + return elt.document.width; + else + return elt.clip.right - elt.clip.left; + } + if (is.ie4up) { + if (elt.style.pixelWidth) + return elt.style.pixelWidth; + + else + return elt.offsetWidth; + } + if (is.gecko) { + if (elt.style.width) + return stringToNumber(elt.style.width); + else + return stringToNumber(elt.offsetWidth); + } + return -1; +} + +/* set width of elt in pixels */ +function setEltWidth(elt,wdth) +{ + if(is.nav4) + { + elt.document.width = wdth; + } + else if(elt.style) + { + elt.style.width = wdth; + } +} + +/* Returns height of elt in pixels. */ +function getEltHeight(elt) { + if (is.nav4) { + if (elt.document.height) + return elt.document.height; + else + return elt.clip.bottom - elt.clip.top; + } + if (is.ie4up) { + if (elt.style.pixelHeight) + return elt.style.pixelHeight; + else + return elt.clientHeight; + } + if (is.gecko) { + if (elt.style.height) + return stringToNumber(elt.style.height); + else + return stringToNumber(elt.offsetHeight); + } + return -1; +} + +/* set width of elt in pixels */ + +function setEltHeight(elt,hght) +{ + if(is.nav4) + { + elt.document.height = hght; + } + else if(elt.style) + { + elt.style.height = hght; + } +} + +/* Sets element clipping area. + NOTE ORDER: top, right, bottom, left to be consistent with CSS usage. + cliptop, clipright, clipbottom, and clipleft are integers. +*/ +function setEltClip (elt, cliptop, clipright, clipbottom, clipleft) +{ if (is.nav4) { + elt.clip.left = clipleft; + elt.clip.top = cliptop; + elt.clip.right = clipright; + elt.clip.bottom = clipbottom; + } + else if (is.ie4up) elt.style.clip = 'rect(' + cliptop + ' ' + + clipright + ' ' + clipbottom + ' ' + clipleft +')'; + else if (is.gecko) elt.style.clip = 'rect(' + cliptop + ' ' + + clipright + ' ' + clipbottom + ' ' + clipleft +')'; +} + +/* utility function for IE only -- does not use regular expressions + in order to avoid triggering syntax error if parsed by Nav3 */ +function tempClipObj (elt) +{ var clipStr = elt.style.clip; + + clipStr = clipStr.substring (clipStr.indexOf("(") + 1); + this.top = stringToNumber(clipStr); + clipStr = clipStr.substring (clipStr.indexOf(" ") + 1); + this.right = stringToNumber(clipStr); + clipStr = clipStr.substring (clipStr.indexOf(" ") + 1); + this.bottom = stringToNumber(clipStr); + clipStr = clipStr.substring (clipStr.indexOf(" ") + 1); + this.left = stringToNumber(clipStr); +} + +/* Returns left edge of clipping area of elt in pixels. */ +function getEltClipLeft (elt) +{ if (is.nav4) return (elt.clip.left); + else if (elt.style) + { var tempClip = new tempClipObj (elt); + return tempClip.left; + } +} + +/* Returns top edge of clipping area of elt in pixels. */ +function getEltClipTop (elt) +{ if (is.nav4) return (elt.clip.top); + else if (elt.style) + { var tempClip = new tempClipObj (elt); + return tempClip.top; + } +} + +/* Returns right edge of clipping area of elt in pixels. */ +function getEltClipRight (elt) { + if (is.nav4) return (elt.clip.right); + else if (elt.style) + { var tempClip = new tempClipObj (elt); + return tempClip.right; + } + +} + +/* Returns bottom edge of clipping area of elt in pixels. */ +function getEltClipBottom (elt) +{ if (is.nav4) return (elt.clip.bottom); + else if (elt.style) + { var tempClip = new tempClipObj (elt); + return tempClip.bottom; + } +} + +/* Returns width of clipping area of elt in pixels. */ + +function getEltClipWidth (elt) +{ + return (getEltClipRight(elt) - getEltClipLeft(elt)); +} + + +/* Returns height of clipping area of elt in pixels. */ + +function getEltClipHeight (elt) +{ + return (getEltClipBottom(elt) - getEltClipTop(elt)); +} + + +/* Returns width of current window content area in pixels. */ + +function getCurrentWinWidth() +{ if (is.nav4) return(window.innerWidth); + else if (is.ie4up) return(document.body.clientWidth); + else if (is.gecko) return(window.innerWidth); +} + + + +/* Returns height of current window content area in pixels. */ +function getCurrentWinHeight() +{ if (is.nav4) return(window.innerHeight); + else if (is.ie4up) return(document.body.clientHeight); + else if (is.gecko) return(window.innerHeight); + +} + +/* Returns z-index (stacking order) of elt, + which is a positive integer. */ + +function getEltZIndex (elt) +{ if (is.nav4) return(elt.zIndex); + else if (elt.style) return (elt.style.zIndex); +} + +/* Sets z-index (stacking order) of elt. + z is a positive integer. */ + +function setEltZIndex (elt, z) +{ if (is.nav4) elt.zIndex = z; + else if (elt.style) elt.style.zIndex = z; +} + + +/* end CBDHTML derivative functions */ +/* Sets background image of elt to image at imageFilePath. + + Note: although this function and the next provide the + ability to set and get the background image property of + an element across Nav4/Gecko/IE4+, because of differences in + the way background image support is implemented, it may + require considerable experimentation with HTML/CSS markup + and content to achieve the same visual effect. +*/ +function setEltBackgroundImage (elt, imageFilePath) +{ if (is.nav4) elt.background.src = imageFilePath; + else if (is.ie4up) elt.style.backgroundImage = "url(" + imageFilePath + ")"; + else if (is.gecko) elt.style.backgroundImage = "url(" + imageFilePath + ")"; +} + +/* Returns file path or URL of background image of elt. + Note: the return value strings are not identical. + On Nav4, we get back a string like + "file:///F|/DHTML/xbdhtml/xbdhtml/images/redpole.gif". + On IE4 and Gecko, we get back a string like "url(images/redpole.gif)". + so we trim off the leading "url(" and the trailing ")". +*/ + +function getEltBackgroundImage (elt) +{ if (is.nav4) return (elt.background.src); + else if (elt.style) { + var theURL = elt.style.backgroundImage; + if (typeof(theURL) == "string") + { var URLlen = theURL.length; + return (theURL.substring (4, URLlen-1)); + } + else return(theURL); + } +} + +/* Sets background color of elt to colorNumber. + colorNumber is an numeric color code like 0xffffff for white, + or one of the 16 standard color names from CSS1 like "red". + (DO NOT USE IE's extended list of color names strings; they + are not supported on Nav4!) + + NOTE: even if you set the color to one of the 16 CSS1 color name + strings (e.g. "red"), getEltBackgroundColor will always return + the integer code equivalent (e.g. 0xff0000 instead of "red"), + because getEltBackgroundColor automatically converts those names to + an integer on IE4 and Gecko, and on Nav4 the conversion happens by default. + To avoid the confusion of setting the value to a string but getting + an integer back, it's simplest to use color numbers only. + + Note: although this function and the next provide the + ability to set and get the background color property of + an element across Nav4/Gecko/IE4+, because of differences in + the way background color support is implemented, it may + require considerable experimentation with HTML/CSS markup + and content to achieve the same visual effect. +*/ + +function setEltBackgroundColor (elt, colorNumber) +{ if (is.nav4) elt.bgColor = colorNumber; + else if (elt.style) elt.style.backgroundColor = colorNumber; +} + +/* ------------------------------------------------------------- + FUNCTIONS FOR GETTING ELEMENT'S BACKGROUND COLOR + These depend upon each other and must be reused as a group. + ------------------------------------------------------------- */ + +var colorNameString = "aqua,black,blue,fuchsia,gray,green,lime,maroon,navy,olive,purple,red,silver,teal,yellow,white"; +var colorNames = new Array ("aqua", "black", "blue", "fuchsia", "gray", "green", "lime", "maroon", "navy", "olive", "purple", "red", "silver", "teal", "yellow", "white"); +var colorNumbers = new Array (0xffff, 0, 0xff, 0xff00ff, 0x808080, 0x8000, 0xff00, 0x800000, 0x80, 0x808000, 0x800080, 0xff0000, 0xc0c0c0, 0x8080, 0xffff00, 0xffffff); + + + +/* Tests whether string aString is one of the 16 CSS1 color names. +*/ +function isColorName (aString) +{ return ( (typeof(aString) == "string") && (colorNameString.indexOf(aString) != -1)); +} + +/* Converts color name string (like "white") to number (like 0xffffff). + ONLY supports 16 standard CSS1 color names, NOT IE4 extended list! +*/ +function colorNameToNumber (colorName) +{ for (var i=0; i<16; i++) if (colorNames[i]==colorName) return colorNumbers[i]; + // Return string name unchanged if not found. + // This handles IE4 non-CSS1-standard color names gracefully. + return colorName; +} + +/* Converts color number (like 0xffffff) to name string (like "white"). + ONLY supports 16 standard CSS1 color names, NOT IE4 extended list! +*/ + +function colorNumberToName (colorNumber) +{ for (var i=0; i<16; i++) if (colorNumbers[i]==colorNumber) return colorNames[i]; + return null; +} + +/* Returns background color of elt as integer. + (NOT color name like "red", or IE4 default return value like "#ffffff".) + Nav4 returns integer by default. IE4 returns string which is either: + a) a leading "#" followed by a 6-digit hexadecimal RGB value, or + b) one of the 16 string color names like "red" + ... so we convert this to an integer for compatibility. + and Gecko returns a string which is either: + a) an rgb string like "rgb(255,0,255)" + b) one of the 16 string color names like red. + + WARNING: There is a bug in Netscape6 (Gecko) that makes the browser interpret + decimal color values as hexadecimal, so if you set the color to 65280 + the actual color would be 0x065280. Avoid using decimal color values! + They are not standard and depricated. + WARNING: only the 16 CSS1 color names will be converted to integers. +*/ + +function getEltBackgroundColor (elt) +{ + if (is.nav4) return (elt.bgColor); + else if (is.ie4up) + { + var colorVal = elt.style.backgroundColor; + if (isColorName(colorVal)) return colorNameToNumber (colorVal); + else if (typeof(colorVal) == "string") + return (("0x" + colorVal.substring(1)) - 0); + else return colorVal; + } + else if (is.gecko) { + var colorVal = elt.style.backgroundColor; + + if (typeof(colorVal) == "string") + { + if (isColorName(colorVal)) + { + return colorNameToNumber (colorVal); + } + else if (colorVal.indexOf(["rgb"]) != -1) + { + var sR,sG,sB; + var iR,iG,iB; + var i=0; + + ColorString = (elt.style.backgroundColor); + //ColorString = "rgb(255,20,255)"; + ColorString = ColorString.slice(4,-1); + + while(ColorString[i] != ',' && i < 20){i++;} + sR = ColorString.slice(0,-(ColorString.length - i)); + i++; + j = i; + while(ColorString[j] != ',' && j < 20){j++;} + sG = ColorString.slice(i,0-(ColorString.length - j)); + j++; + sB = ColorString.slice(j); + iR = stringToNumber(sR); + iG = stringToNumber(sG); + iB = stringToNumber(sB); + sR = iR.toString(16);if(sR.length < 2)sR = "0" + sR;if(sR.length < 2)sR = "0" + sR; + sG = iG.toString(16);if(sG.length < 2)sG = "0" + sG;if(sG.length < 2)sG = "0" + sG; + sB = iB.toString(16);if(sB.length < 2)sB = "0" + sB;if(sB.length < 2)sB = "0" + sB; + + sRGB = sR.toUpperCase()+sG.toUpperCase()+sB.toUpperCase(); + return (("0x" + sRGB)-0); + } + } + else return colorVal; + } +} + +/* A version of stringToNumber that returns 0 if there is NaN returned, or number is part of a string, like 100px... */ +function stringToNumber(s) +{ + return parseInt(('0' + s), 10) +} Index: ViewTopic.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/ViewTopic.pm,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- ViewTopic.pm 17 Oct 2004 22:32:41 -0000 1.49 +++ ViewTopic.pm 21 Feb 2005 11:25:05 -0000 1.50 @@ -40,6 +40,20 @@ # Retrieve the appropriate topic details. my $topic = Codestriker::Model::Topic->new($topicid); + # Retrieve the comment details for this topic, firstly determine how + # many distinct comment lines are there. + my @comments = $topic->read_comments(); + my %comment_map = (); + my $number_comments = 0; + foreach my $comment (@comments) { + my $key = $comment->{filenumber} . "|" . $comment->{fileline} . "|" . + $comment->{filenew}; + if (! exists $comment_map{$key}) { + $comment_map{$key} = 1; + $number_comments++; + } + } + # Retrieve the changed files which are a part of this review. my (@filenames, @revisions, @offsets, @binary, @numchanges); $topic->get_filestable( @@ -52,9 +66,6 @@ # Retrieve line-by-line versions of the data and description. my @document_description = split /\n/, $topic->{description}; - # Retrieve the comment details for this topic. - my @comments = $topic->read_comments(); - $http_response->generate_header(topic=>$topic->{topicid}, topic_title=>"Topic Text: $topic->{title}", mode=>$mode, tabwidth=>$tabwidth, @@ -137,10 +148,12 @@ } $vars->{'description'} = $data; - # Obtain the link to download the actual document text. $vars->{'download_url'} = $url_builder->download_url($topicid); + # Indicate how many comments there are. + $vars->{'number_comments'} = $number_comments; + # Fire the template on the topic heading information. my $template = Codestriker::Http::Template->new("viewtopic"); $template->process($vars); Index: Render.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Render.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- Render.pm 17 Feb 2005 21:29:34 -0000 1.44 +++ Render.pm 21 Feb 2005 11:25:23 -0000 1.45 @@ -89,15 +89,25 @@ $self->{topic_state} = $topic_obj->{topic_state}; # Build a hash from filenumber|fileline|new -> comment array, so that - # when rendering, lines can be coloured appropriately. + # when rendering, lines can be coloured appropriately. Also build a list + # of what points in the review have a comment. Also record a mapping + # from filenumber|fileline|new -> the comment number. my %comment_hash = (); + my @comment_locations = (); + my %comment_location_map = (); for (my $i = 0; $i <= $#$comments; $i++) { my $comment = $$comments[$i]; my $key = $comment->{filenumber} . "|" . $comment->{fileline} . "|" . $comment->{filenew}; + if (! exists $comment_hash{$key}) { + push @comment_locations, $key; + $comment_location_map{$key} = $#comment_locations; + } push @{ $comment_hash{$key} }, $comment; } $self->{comment_hash} = \%comment_hash; + $self->{comment_locations} = \@comment_locations; + $self->{comment_location_map} = \%comment_location_map; # Also have a number of additional private variables which need to # be initialised. @@ -141,6 +151,98 @@ $self->{idhashref} = undef; } + # Precompute the overlib HTML for each comment location. + print "\n<script language=\"JavaScript\" type=\"text/javascript\">\n"; + + # Set the topicid. + print " topicid = " . $self->{topic} . ";\n"; + + # Now record all the comments made so far in the topic. + print " var comment_text = new Array();\n"; + print " var comment_hash = new Array();\n"; + my $index; + for ($index = 0; $index <= $#comment_locations; $index++) { + + # Contains the overlib HTML text. + my $overlib_html = ""; + + # Determine what the previous and next comment locations are. + my $previous = undef; + my $next = undef; + if ($index > 0) { + $previous = $comment_locations[$index-1]; + } + if ($index < $#comment_locations) { + $next = $comment_locations[$index+1]; + } + + # Compute the previous link if required. + my $current_url = $self->{query}->self_url(); + if (defined $previous && $previous =~ /^(\-?\d+)|\-?\d+|\d+$/o) { + my $previous_fview = $1; + my $previous_index = $index - 1; + my $previous_url = $current_url; + $previous_url =~ s/fview=\d+/fview=$previous_fview/o if $self->{fview} != -1; + $previous_url .= '#' . $previous; + $overlib_html .= "<a href=\"javascript:window.location=\\'$previous_url\\'; "; + if ($self->{fview} == -1 || $self->{fview} == $previous_fview) { + $overlib_html .= "overlib(comment_text[$previous_index], STICKY, FIXX, getEltPageLeft(getElt(\\'c$previous_index\\')), FIXY, getEltPageTop(getElt(\\'c$previous_index\\'))); "; +} + $overlib_html .= "void(0);\">Previous</a>"; + } + + # Compute the next link if required. + if (defined $next && $next =~ /^(\-?\d+)|\-?\d+|\d+$/o) { + my $next_fview = $1; + $overlib_html .= " | " if defined $previous; + my $next_index = $index + 1; + my $next_url = $current_url; + $next_url =~ s/fview=\d+/fview=$next_fview/o if $self->{fview} != -1; + $next_url .= '#' . $next; + $overlib_html .= "<a href=\"javascript:window.location=\\'$next_url\\'; "; + if ($self->{fview} == -1 || $self->{fview} == $next_fview) { + $overlib_html .= "overlib(comment_text[$next_index], STICKY, FIXX, getEltPageLeft(getElt(\\'c$next_index\\')), FIXY, getEltPageTop(getElt(\\'c$next_index\\'))); "; + } + $overlib_html .= "void(0);\">Next</a>"; + } + if (defined $previous || defined $next) { + $overlib_html .= " | "; + } + + # Add a close link. + $overlib_html .= "<a href=\"javascript:hideElt(getElt(\\'overDiv\\')); void(0);\">Close</a><p>"; + + # Create the actual comment text. + my $key = $comment_locations[$index]; + my @comments = @{ $comment_hash{$key} }; + + for (my $i = 0; $i <= $#comments; $i++) { + my $comment = $comments[$i]; + + # Need to format the data appropriately for HTML display. + my $data = HTML::Entities::encode($comment->{data}); + $data =~ s/\'/\\\'/mg; + $data =~ s/\n/<br>/mg; + $data =~ s/ / /mg; + $data = tabadjust($self, $self->{tabwidth}, $data, 1); + + # Show each comment with the author and date in bold. + $overlib_html .= "<b>Comment from $comment->{author} "; + $overlib_html .= "on $comment->{date}</b><br>"; + $overlib_html .= "$data"; + + # Add a newline at the end if required. + if ($i < $#comments && + substr($overlib_html, length($overlib_html)-4, 4) ne '<br>') { + $overlib_html .= '<br>'; + } + } + + print " comment_text[$index] = '$overlib_html';\n"; + print " comment_hash['" . $comment_locations[$index] . "'] = $index;\n"; + } + print "</script>\n"; + bless $self, $type; } @@ -763,11 +865,6 @@ my ($self, $filenumber, $line, $new, $text, $comment_class, $no_comment_class) = @_; - # Retrieve any comments associated with this line, and javascript - # escape it appropriately. - my $title = $self->get_comment_digest($line, $filenumber, $new); - $title =~ s/\'/\\\'/mg; - # Determine the anchor and edit URL for this line number. my $anchor = "$filenumber|$line|$new"; my $edit_url = "javascript:eo('$filenumber','$line','$new')"; @@ -784,11 +881,26 @@ # If a comment exists on this line, set span and the overlib hooks onto # it. my $query = $self->{query}; - if ($title ne "") { + my %comment_hash = %{ $self->{comment_hash} }; + my %comment_location_map = %{ $self->{comment_location_map} }; + my $comment_number = undef; + if (exists $comment_hash{$anchor}) { + # Determine what comment number this anchor refers to. + $comment_number = $comment_location_map{$anchor}; + if (defined $comment_class) { - $text = $query->span({-class=>$comment_class}, $text); + $text = $query->span({-id=>"c$comment_number"}, "") . + $query->span({-class=>$comment_class}, $text); } - $params->{onmouseover} = "return overlib('$title');"; + + # Determine what the next comment in line is. + my $index = -1; + my @comment_locations = @{ $self->{comment_locations} }; + for ($index = 0; $index <= $#comment_locations; $index++) { + last if $anchor eq $comment_locations[$index]; + } + + $params->{onmouseover} = "return overlib(comment_text[$index],STICKY);"; $params->{onmouseout} = "return nd();"; } else { if (defined $no_comment_class) { @@ -796,7 +908,6 @@ } } - # Return the rendered link. return $query->a($params, $text); } @@ -840,6 +951,8 @@ # Start hook called when about to start rendering to a page. sub start($) { my ($self) = @_; + + # Now create the start of the rendering tables. if ($self->{mode} == $Codestriker::NORMAL_MODE) { $self->_normal_mode_start(); } else { Index: Response.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Response.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Response.pm 16 Feb 2005 11:54:27 -0000 1.23 +++ Response.pm 21 Feb 2005 11:25:26 -0000 1.24 @@ -202,6 +202,7 @@ if (defined $topic_title && $topic_title ne "") { $title .= ": \"$topic_title\""; } + $title = HTML::Entities::encode($title); # Generate the URL to the codestriker CSS file. my $codestriker_css; @@ -214,75 +215,22 @@ my $overlib_js = $codestriker_css; $overlib_js =~ s/codestriker.css/overlib.js/; - - # Write the simple open window javascript method for displaying popups. - # Note gotoAnchor can't simply be: - # - # opener.location.hash = "#" + anchor; - # - # As the old netscapes don't handle it properly. - my $base_url = $query->url(); - my $jscript=<<END; - <script language="JavaScript" type="text/javascript"> - <!-- Hide script - //<![CDATA[ - - // Global settings for overLIB. - ol_fgcolor = '#FFFFCC'; - ol_textsize = '2'; - - var windowHandle = ''; - - function myOpen(url,name) { - windowHandle = window.open(url,name, - 'toolbar=no,width=800,height=600,status=yes,scrollbars=yes,resizable=yes,menubar=no'); - // Indicate who initiated this operation. - windowHandle.opener = window; - - windowHandle.focus(); - } - - // Edit open function. Name is kept short to reduce output size. - function eo(fn,line,newfile) { - myOpen('$base_url' + '?fn=' + fn + '&line=' + line + - '&new=' + newfile + '&topic=$topic&action=edit&a=' + - fn + '|' + line + '|' + newfile, 'e'); - } - - function gotoAnchor(anchor, reload) { - if (anchor == "" || opener == null) return; - - var index = opener.location.href.lastIndexOf("#"); - if (index != -1) { - opener.location.href = - opener.location.href.substr(0, index) + "#" + anchor; - } - else { - opener.location.href += "#" + anchor; - } - - if (reload) opener.location.reload(reload); - opener.focus(); - } - - //]]> End script hiding --> - </script> -END - -# "http://www.w3.org/TR/html4/strict.dtd" - - print $query->start_html(-dtd=>'-//W3C//DTD HTML 4.01 Transitional//EN', - -charset=>'ISO-8859-1', - -title=>"$title", - -bgcolor=>"#eeeeee", - -style=>{src=>"$codestriker_css"}, - -script=>{type=>"text/javascript", src=>"$overlib_js"}, - -base=>$query->url(), - -link=>'blue', - -vlink=>'purple', - -onLoad=>"gotoAnchor('$load_anchor', $reload)"); - - print $jscript; + my $xbdhtml_js = $codestriker_css; + $xbdhtml_js =~ s/codestriker.css/xbdhtml.js/; + my $codestriker_js = $codestriker_css; + $codestriker_js =~ s/codestriker.css/codestriker.js/; + + # Print the basic HTML header header, with the inclusion of the scripts. + print '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">'; + print "\n"; + print '<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">'; + print "\n"; + print "<head><title>$title</title>\n"; + print "<base href=\"$query->url()\"/>\n"; + print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$codestriker_css\" />\n"; + print "<script src=\"$overlib_js\" type=\"text/javascript\"></script>\n"; + print "<script src=\"$xbdhtml_js\" type=\"text/javascript\"></script>\n"; + print "<script src=\"$codestriker_js\" type=\"text/javascript\"></script>\n"; # Write a comment indicating if this was compressed or not. $self->{output_compressed} = $output_compressed; Index: Comment.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Model/Comment.pm,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Comment.pm 30 Jan 2005 00:48:10 -0000 1.19 +++ Comment.pm 21 Feb 2005 11:25:26 -0000 1.20 @@ -289,6 +289,7 @@ 'ORDER BY ' . 'commentstate.filenumber, ' . 'commentstate.fileline, ' . + 'commentstate.filenew, ' . 'commentdata.creation_ts'); my $success = defined $select_comment; my $rc = $Codestriker::OK; Index: createproject.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/createproject.html.tmpl,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- createproject.html.tmpl 21 Nov 2004 05:00:10 -0000 1.18 +++ createproject.html.tmpl 21 Feb 2005 11:25:28 -0000 1.19 @@ -1,6 +1,7 @@ [%# Screen for the create project form. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x350.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x350.html" %] [%# Display any "feedback" to the user if necessary. #%] [% IF feedback != '' %] Index: createtopic.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/createtopic.html.tmpl,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- createtopic.html.tmpl 16 Feb 2005 11:54:26 -0000 1.40 +++ createtopic.html.tmpl 21 Feb 2005 11:25:29 -0000 1.41 @@ -1,6 +1,7 @@ [%# Screen for the create topic form. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x374.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x374.html" %] [%# Display any "feedback" to the user if necessary. #%] [% IF feedback != '' %] Index: editproject.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/editproject.html.tmpl,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- editproject.html.tmpl 21 Nov 2004 05:00:10 -0000 1.18 +++ editproject.html.tmpl 21 Feb 2005 11:25:30 -0000 1.19 @@ -1,6 +1,7 @@ [%# Screen for the edit project form. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x350.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x350.html" %] <script language="JavaScript"> Index: header.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/header.html.tmpl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- header.html.tmpl 8 Sep 2004 03:48:57 -0000 1.9 +++ header.html.tmpl 21 Feb 2005 11:25:30 -0000 1.10 @@ -1,4 +1,9 @@ -[%# Header HTML code to appear on each screen, after <BODY> tag. #%] +[% IF closehead %] +</head> +<body> +[% END %] + +[%# Header HTML code to appear on each screen, after <body> tag. #%] <table width="100%" border="0"> <tr> Index: listprojects.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/listprojects.html.tmpl,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- listprojects.html.tmpl 21 Nov 2004 05:00:10 -0000 1.16 +++ listprojects.html.tmpl 21 Feb 2005 11:25:30 -0000 1.17 @@ -1,6 +1,7 @@ [%# Display a list of projects #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x350.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x350.html" %] [%# Display any "feedback" to the user if necessary. #%] [% IF feedback != '' %] Index: listtopics.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/listtopics.html.tmpl,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- listtopics.html.tmpl 21 Dec 2004 23:02:59 -0000 1.32 +++ listtopics.html.tmpl 21 Feb 2005 11:25:30 -0000 1.33 @@ -1,6 +1,7 @@ [%# Screen for show a list of topics. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x319.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x319.html" %] [%# Display any "feedback" to the user if necessary. #%] [% IF feedback != '' %] Index: metricsreport.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/metricsreport.html.tmpl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- metricsreport.html.tmpl 24 Nov 2004 11:18:09 -0000 1.11 +++ metricsreport.html.tmpl 21 Feb 2005 11:25:30 -0000 1.12 @@ -1,6 +1,7 @@ [%# Screen for the metrics report. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help ="x672.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help ="x672.html" %] <!-- "" --> Index: search.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/search.html.tmpl,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- search.html.tmpl 16 Feb 2005 11:54:26 -0000 1.26 +++ search.html.tmpl 21 Feb 2005 11:25:31 -0000 1.27 @@ -1,6 +1,7 @@ [%# Screen for search topics. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help = "x636.html" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + closehead = 1 help = "x636.html" %] <H1>Topic search</H1> Index: submitnewcomment.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/submitnewcomment.html.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- submitnewcomment.html.tmpl 22 Mar 2004 09:28:10 -0000 1.4 +++ submitnewcomment.html.tmpl 21 Feb 2005 11:25:31 -0000 1.5 @@ -1,6 +1,7 @@ [%# Screen for the submit comment confirmation screen. #%] -[% PROCESS header.html.tmpl version = version displaymenu = 1 help="" %] +[% PROCESS header.html.tmpl version = version displaymenu = 1 + ... [truncated message content] |