Fix Issue 389 (Clicking list entry will not open new tab/window).
Patch by: Daniel Hans
Reviewed by: Pawel Solyga
--- a/app/soc/content/css/soc-090421.css Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/content/css/soc-090421.css Wed Apr 29 18:51:58 2009 +0200
@@ -495,6 +495,8 @@
.list table tr.on {
background-color: #ff9;
+ cursor: hand;
+ cursor: pointer;
}
.list table tr.off {
@@ -509,6 +511,10 @@
border-left: 1px solid lightgray;
}
+.list table td.no_hand {
+ cursor: default;
+}
+
/*
* STUDENT PROPOSAL REVIEWS
*/
--- a/app/soc/templates/soc/club/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/club/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/club_admin/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/club_admin/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/club_app/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/club_app/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true"" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/club_member/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/club_member/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true"" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/document/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/document/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,8 +1,8 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right">
<div class="title">
- <a class="noul"
+ <a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
</div>
</td>
--- a/app/soc/templates/soc/group/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/group/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/host/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/host/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/job/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/job/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,8 +1,8 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right">
<div class="link_id">
- <a class="noul"
+ <a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.link_id }}</a>
</div>
</td>
--- a/app/soc/templates/soc/mentor/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/mentor/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/notification/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/notification/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">
{% if list.item.from_user %}
{{ list.item.from_user.name }}
--- a/app/soc/templates/soc/org_admin/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/org_admin/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/org_app/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/org_app/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,9 +1,19 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.name }}</a>
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right">
+ <div class="name">
+ <a class="noul" onclick="do_redirect=false" href="{{ list.redirect }}">
+ {{ list.item.name }}
+ </a>
</div>
</td>
<td><div class="link_id">{{ list.item.link_id }}</a></div></td>
- <td><div class="idea_url">{{ list.item.ideas|urlizetrunc:35 }}</div></td>
+ <td onclick="if (redirect_to_ideas) document.location.href='{{ list.item.ideas }}'; do_redirect=false"
+ onmouseover="redirect_to_ideas=true">
+ <div class="idea_url">
+ <a onclick="redirect_to_ideas=false" href="{{ list.item.ideas }}">
+ {{ list.item.ideas|urlizetrunc:35|removetags:"a" }}
+ </a>
+ </div>
+ </td>
</tr>
--- a/app/soc/templates/soc/organization/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/organization/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,10 +1,27 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
- href="{{ list.redirect }}">{{ list.item.name }}</a>
- </div>
+<tr class="off" onmouseover="this.className='on'; do_redirect=true"
+ onmouseout="this.className='off'" name="name"
+ onclick="if (do_redirect) document.location.href='{{ list.redirect }}'">
+ <td align="right">
+ <div class="name">
+ <a class="noul" onclick="do_redirect=false" href="{{ list.redirect }}">
+ {{ list.item.name }}
+ </a>
+ </div>
</td>
<td><div class="link_id">{{ list.item.link_id }}</a></div></td>
<td><div class="short_name">{{ list.item.short_name }}</a></div></td>
- <td><div class="idea_url">{{ list.item.ideas|urlizetrunc:35 }}</div></td>
+ {% if list.item.ideas %}
+ <td onclick="if (redirect_to_ideas) document.location.href='{{ list.item.ideas }}';
+ do_redirect=false" onmouseover="redirect_to_ideas=true">
+ {% else %}
+ <td class="no_hand" onclick="do_redirect=false">
+ {% endif %}
+ <div class="idea_url">
+ {% if list.item.ideas %}
+ <a onclick="redirect_to_ideas=false" href="{{ list.item.ideas }}">
+ {% endif %}
+ {{ list.item.ideas|urlizetrunc:35|removetags:"a" }}
+ </a>
+ </div>
+ </td>
</tr>
--- a/app/soc/templates/soc/presence/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/presence/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,8 +1,8 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right">
<div class="title">
- <a class="noul"
+ <a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.scope_path}}/{{ list.item.link_id }}</a>
</div>
</td>
--- a/app/soc/templates/soc/priority_group/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/priority_group/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,5 +1,5 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right">
<div class="link_id">
<a class="noul"
--- a/app/soc/templates/soc/program/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/program/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,8 +1,8 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="link_id">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="link_id">
<td align="right">
<div class="title">
- <a class="noul"
+ <a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/request/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/request/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,7 +1,7 @@
{% load forms_helpers %}
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
<td align="right"><div class="role"><a class="noul"
href="{{ list.redirect }}">{{ list.item.role_verbose }}</a>
</div>
--- a/app/soc/templates/soc/site/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/site/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,5 +1,5 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='/site/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}'" name="name">
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='/site/edit/{{ list.item.scope_path }}/{{ list.item.link_id }}'" name="name">
<td align="right">
<div class="title">
<a class="noul"
--- a/app/soc/templates/soc/student/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/student/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/student_project/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/student_project/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="name"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="name"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.student.name }}</a>
</div>
</td>
--- a/app/soc/templates/soc/student_proposal/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/student_proposal/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="title"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="title"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.title }}</a>
</div>
</td>
--- a/app/soc/templates/soc/user/list/row.html Wed Apr 29 18:20:30 2009 +0200
+++ b/app/soc/templates/soc/user/list/row.html Wed Apr 29 18:51:58 2009 +0200
@@ -1,6 +1,6 @@
-<tr class="off" onmouseover="this.className='on'" onmouseout="this.className='off'"
-onclick="document.location.href='{{ list.redirect }}'" name="name">
- <td align="right"><div class="account"><a class="noul"
+<tr class="off" onmouseover="this.className='on'; do_redirect=true" onmouseout="this.className='off'"
+onclick="if (do_redirect) document.location.href='{{ list.redirect }}'" name="name">
+ <td align="right"><div class="account"><a class="noul" onclick="do_redirect=false"
href="{{ list.redirect }}">{{ list.item.account }}</a>
</div>
</td>