[rietveld] push by jrobbins@google.com - Fix linking to last #msg in web UI.... on 2014-11-06 19:25 GMT

2 views
Skip to first unread message

riet...@googlecode.com

unread,
Nov 6, 2014, 2:25:45 PM11/6/14
to coderev...@googlegroups.com
Revision: 9440d6cc0c05
Branch: default
Author: Jason Robbins <jrob...@chromium.org>
Date: Thu Nov 6 19:23:53 2014 UTC
Log: Fix linking to last #msg in web UI.

On behalf of db...@chromium.org.

Reivew URL: https://codereview.appspot.com/171040043/
https://code.google.com/p/rietveld/source/detail?r=9440d6cc0c05

Modified:
/TODO
/static/script.js
/templates/issue.html

=======================================
--- /TODO Wed Aug 6 21:21:58 2014 UTC
+++ /TODO Thu Nov 6 19:23:53 2014 UTC
@@ -69,3 +69,4 @@
Unittests
Move library.py to codereview/templatetags/codereview.py to match the
default
Django project layout.
+Wed Oct 22 14:29:20 PDT 2014
=======================================
--- /static/script.js Mon Jan 13 12:40:01 2014 UTC
+++ /static/script.js Thu Nov 6 19:23:53 2014 UTC
@@ -530,7 +530,8 @@
var elem = document.getElementById(anchor);
elem.className += ' referenced';
var num = elem.getAttribute('name');
- M_switchChangelistComment(num);
+ if (anchor.slice(3) != lastMsgID)
+ M_switchChangelistComment(num);
} else if (anchor.slice(0, 2) == 'ps') {
// hide last patchset which is visible by default.
M_toggleSectionForPS(issueId, lastPSId);
=======================================
--- /templates/issue.html Wed Sep 10 22:15:12 2014 UTC
+++ /templates/issue.html Thu Nov 6 19:23:53 2014 UTC
@@ -164,6 +164,13 @@
</div>

</div>
+
+<script language="JavaScript" type="text/javascript">
+<!--
+var lastMsgID = {{messages|length}};
+// -->
+</script>
+
{%endif%}


Reply all
Reply to author
Forward
0 new messages