User: sits
Date: 05/08/11 05:04:56
Modified: . CHANGELOG
html codestriker.js
lib Codestriker.pm
template/en/default editcomment.html.tmpl
submitnewcomment.html.tmpl
Log:
* Correct problem introduced in 1.9.0 release where the email address
field in the add comment tooltip was not being stored correctly in
the Codestriker cookie. For reviewers who have never created a
Codestriker topic, the email field not remember the previous value.
This has now been corrected.
* When adding a comment via a link from an email, the confirmation
screen now contains links to the topic text and topic comments, for
convenience.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -r1.174 -r1.175
--- CHANGELOG 10 Jul 2005 02:28:56 -0000 1.174
+++ CHANGELOG 11 Aug 2005 12:04:55 -0000 1.175
@@ -1,6 +1,18 @@
*** When upgrading, don't forget to: "cd bin ; ./install.pl" ***
*** Also, it is _highly_ advisable to backup your data before upgrading ***
+Version 1.9.1
+
+* Correct problem introduced in 1.9.0 release where the email address
+ field in the add comment tooltip was not being stored correctly in
+ the Codestriker cookie. For reviewers who have never created a
+ Codestriker topic, the email field not remember the previous value.
+ This has now been corrected.
+
+* When adding a comment via a link from an email, the confirmation
+ screen now contains links to the topic text and topic comments, for
+ convenience.
+
Version 1.9.0
* Now using overlib javascript library
Index: codestriker.js
===================================================================
RCS file: /cvsroot/codestriker/codestriker/html/codestriker.js,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- codestriker.js 2 Jun 2005 11:30:59 -0000 1.12
+++ codestriker.js 11 Aug 2005 12:04:55 -0000 1.13
@@ -23,6 +23,29 @@
windowHandle.focus();
}
+// Retrieve the value of a cookie by name.
+function getCookie(name)
+{
+ var regexp = new RegExp(name + "=([^;]+)");
+ var value = regexp.exec(document.cookie);
+ return (value != null) ? value[1] : null;
+}
+
+// Set the value of the cookie to the specific value.
+function setCookie(name, value, expirySeconds)
+{
+ if (!expirySeconds) {
+ // Default to one hour
+ expirySeconds = 60 * 60;
+ }
+
+ var now = new Date();
+ var expiry = new Date(now.getTime() + (expirySeconds * 1000))
+ document.cookie = name + "=" + value +
+ "; expires=" + expiry.toGMTString() +
+ "; path=" + document.location.pathname;
+}
+
// Edit open function. Name is kept short to reduce output size.
function eo(fn,line,newfile)
{
@@ -222,6 +245,23 @@
}
}
+ // Make sure the email field is stored into the Codestriker
+ // cookie, so that it is remembered for the next add comment tooltip.
+ var cookie = getCookie('codestriker_cookie');
+ cs_email = comment_form.email.value;
+ var email_value = escape(cs_email);
+ if (cookie == null || cookie == '') {
+ cookie = 'email&' + email_value;
+ }
+ else if (cookie.match(/[&^]email&[^&]+/)) {
+ // Email field is already in cookie.
+ cookie = cookie.replace(/([&^])email&([^&]+)/, "$1email&" +
email_value);
+ } else {
+ // Tack the email field onto the end.
+ cookie += '&email&' + email_value;
+ }
+ setCookie('codestriker_cookie', cookie, 10 * 356 * 24 * 60 * 60);
+
// If we reached here, then all metrics have been set. Send the
// request as an XMLHttpRequest, and return false so the browser
// does nothing else.
@@ -375,4 +415,5 @@
else if (cs_request.readyState == 2) {
setStatusText('Request sent...');
}
-}
\ No newline at end of file
+}
+
Index: Codestriker.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- Codestriker.pm 10 Jul 2005 02:28:58 -0000 1.78
+++ Codestriker.pm 11 Aug 2005 12:04:55 -0000 1.79
@@ -27,7 +27,7 @@
);
# Version of Codestriker.
-$Codestriker::VERSION = "1.9.0";
+$Codestriker::VERSION = "1.9.1";
# Default title to display on each Codestriker screen.
$Codestriker::title = "Codestriker $Codestriker::VERSION";
Index: editcomment.html.tmpl
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/template/en/default/editcomment.html.tmpl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- editcomment.html.tmpl 23 May 2005 11:54:00 -0000 1.20
+++ editcomment.html.tmpl 11 Aug 2005 12:04:55 -0000 1.21
@@ -4,20 +4,6 @@
<SCRIPT type="text/javascript">
-// FOR getCookie() and setCookie()
-// Original JavaScript code by Duncan Crombie: dcrombie at chirp.com.au
-function getCookie(name) {
- var re = new RegExp(name + "=([^;]+)");
- var value = re.exec(document.cookie);
- return (value != null) ? unescape(value[1]) : null;
-}
-function setCookie(name, value, expirySeconds) {
- if (!expirySeconds) expirySeconds = 60 * 60; // default to one hour
- var now = new Date();
- var expiry = new Date(now.getTime() + (expirySeconds * 1000))
- document.cookie=name + "=" + escape(value) + "; expires=" +
expiry.toGMTString();
-}
-
// Store the form data in a browser cookie.
function save_form_data() {
var form = document.add_comment;
@@ -219,7 +205,7 @@
<TD>
<INPUT TYPE="text" NAME="comment_cc" SIZE=50 MAXLENGTH=150>
</TD>
- <TD><INPUT TYPE="submit" NAME="submit" VALUE="Submit"
ONCLICK="opener.focus()"></TD>
+ <TD><INPUT TYPE="submit" NAME="submit" VALUE="Submit" ONCLICK="if (opener
!= null) opener.focus()"></TD>
</TR>
</TABLE>
Index: submitnewcomment.html.tmpl
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/template/en/default/submitnewcomment.html.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- submitnewcomment.html.tmpl 5 May 2005 09:35:27 -0000 1.7
+++ submitnewcomment.html.tmpl 11 Aug 2005 12:04:55 -0000 1.8
@@ -6,7 +6,10 @@
<H2>Comment submitted</H2>
<P>
<PRE>[% comment | html_entity %]
-</PRE><P>
+</PRE><P><P>
+
+View topic (<A HREF="[% view_topic_url %]">text</A> |
+<A HREF="[% view_comments_url %]">comments</A>)
[%# Display a simple form for closing the comment popup window #%]
<FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded">
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits