← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~shevonar/widelands-website/bug-fixes into lp:widelands-website

 

Shevonar has proposed merging lp:~shevonar/widelands-website/bug-fixes into lp:widelands-website.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1193837 in Widelands Website: "Forum text exceed borders"
  https://bugs.launchpad.net/widelands-website/+bug/1193837
  Bug #1212447 in Widelands Website: "two bugs in screenshots application"
  https://bugs.launchpad.net/widelands-website/+bug/1212447
  Bug #1219482 in Widelands Website: "Download link for maps is a button, not a link"
  https://bugs.launchpad.net/widelands-website/+bug/1219482
  Bug #1225945 in Widelands Website: " Navigation buttons do not work properly"
  https://bugs.launchpad.net/widelands-website/+bug/1225945

For more details, see:
https://code.launchpad.net/~shevonar/widelands-website/bug-fixes/+merge/192833

Just some fixes for the attached bugs. Should not cause any problems.
-- 
https://code.launchpad.net/~shevonar/widelands-website/bug-fixes/+merge/192833
Your team Widelands Developers is requested to review the proposed merge of lp:~shevonar/widelands-website/bug-fixes into lp:widelands-website.
=== modified file 'media/css/base.css'
--- media/css/base.css	2012-09-09 18:03:59 +0000
+++ media/css/base.css	2013-10-27 22:29:20 +0000
@@ -36,7 +36,12 @@
 	display: inline;
 }
 
-input, button, textarea {
+pre {
+	white-space: pre-wrap;
+}
+
+input, button, textarea, .button {
+	display: inline-block;
 	margin-bottom: 5px;
 	padding: 2px 10px;
 	border: 1px solid black;
@@ -122,6 +127,10 @@
 	font-size: 12px;
 }
 
+a.small {
+	font-weight: normal;
+}
+
 .even {
 	background-image: url("../img/black20.png");
 }
@@ -175,39 +184,35 @@
 	padding: 15px;
 	margin-top: 20px;
 	text-align: center;
-	box-shadow: black 2px 2px 2px 2px;
-	border: 1px solid #222222;
-	-moz-border-radius-bottomleft: 15px;
-	-moz-border-radius-bottomright: 15px;
-	-khtml-border-radius-bottomleft: 15px;
-	-khtml-border-radius-bottomright: 15px;
-	-webkit-border-bottom-left-radius: 15px;
-	-webkit-border-bottom-right-radius: 15px;
-	border-bottom-left-radius: 15px;
-	border-bottom-right-radius: 15px;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
+	border: 1px solid black;
+	-moz-border-radius: 4px;
+	-khtml-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	border-radius: 4px;
 }
 
 /* Header */
 
 div#header  img{
 	position: relative;
-	z-index: 10;
+	z-index: 0;
 }
 
 div.loginBox {
 	width: 320px;
-	height: 90px;
+	height: 71px;
 	border: 1px solid black;
 	background-color: #332f29;
 	background-image: url("../img/but1.png");
-	-moz-border-radius: 15px;
-	-webkit-border-radius: 15px;
-	-khtml-border-radius: 15px;
-	border-radius: 15px;
+	-moz-border-radius: 4px 4px 0px 0px;
+	-webkit-border-radius: 4px 4px 0px 0px;
+	-khtml-border-radius: 4px 4px 0px 0px;
+	border-radius: 4px 4px 0px 0px;
 	position: relative;
 	z-index: 0;
 	padding: 15px;
-	box-shadow: black 2px 2px 2px 2px;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
 }
 
 div.loginBox div.right{
@@ -262,7 +267,11 @@
 	background-color: #695536;
 	background-image: url("../img/wood.png");
 	border: 1px solid black;
-	box-shadow: black 2px 2px 2px 2px;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	-khtml-border-radius: 4px;
+	border-radius: 4px;
 }
 
 div.columnModuleBox h4 {
@@ -342,15 +351,15 @@
 div.blogEntry {
 	background-color: #332f29;
 	background-image: url("../img/but1.png");
-	-moz-border-radius: 15px;
-	-webkit-border-radius: 15px;
-	-khtml-border-radius: 15px;
-	border-radius: 15px;
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	-khtml-border-radius: 4px;
+	border-radius: 4px;
 	border: 1px solid black;
 	padding: 15px;
 	padding-bottom: 30px;
 	margin-bottom: 20px;
-	box-shadow: black 2px 2px 2px 2px;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
 }
 
 div.blogEntry img.title {

=== modified file 'media/css/navigation.css'
--- media/css/navigation.css	2012-03-30 23:26:23 +0000
+++ media/css/navigation.css	2013-10-27 22:29:20 +0000
@@ -31,13 +31,18 @@
 div#topmenu {
 	position: relative;
 	z-index: 5;
-	top: -30px;
+	top: -8px;
 	clear: both;
 	height: 50px;
+	margin-bottom: 22px;
 	background-color: #695536;
 	background-image: url("../img/wood.png");
-	border: 1px solid #222222;
-	box-shadow: black 2px 2px 2px 2px;
+	border: 1px solid black;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
+	border-radius: 4px 0px 4px 0px;
+	-moz-border-radius: 4px 0px 4px 0px;
+	-webkit-border-radius: 4px 0px 4px 0px;
+	-khtml-border-radius: 4px 0px 4px 0px;
 }
 
 ul.menu {
@@ -57,7 +62,7 @@
 	height: 50px;
 	line-height: 50px;
 	float: left;
-	border-right: 1px solid #222222;
+	border-right: 1px solid black;
 	text-align: center;
 	vertical-align: middle;
 	color: #ffffff;
@@ -66,7 +71,7 @@
 }
 
 ul.menu li a:hover {
-	box-shadow: black 0px 0px 10px 0px inset;
+	background-image: url("../img/black20.png");
 }
 
 ul.menu li a.active {
@@ -82,8 +87,12 @@
 	background-color: #695536;
 	background-image: url("../img/wood.png");
 	padding: 0px;
-	border: 1px solid #222222;
-	box-shadow: black 2px 2px 2px 2px;
+	border: 1px solid black;
+	box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.7);
+	border-radius: 0px 0px 4px 4px;
+	-moz-border-radius: 0px 0px 4px 4px;
+	-webkit-border-radius: 0px 0px 4px 4px;
+	-khtml-border-radius: 0px 0px 4px 4px;	
 }
 
 ul.menu li:hover ul {
@@ -92,12 +101,12 @@
 
 ul.menu li ul li {
 	clear: both;
-	border-top: 1px solid #222222;
+	border-top: 1px solid black;
 }
 
 ul.menu li ul li a {
 	display: block;
-	width: 250px;
+	width: 255px;
 	height: 20px;
 	line-height: 20px;
 	padding: 4px;

=== modified file 'templates/pybb/add_post.html'
--- templates/pybb/add_post.html	2012-09-09 18:03:59 +0000
+++ templates/pybb/add_post.html	2013-10-27 22:29:20 +0000
@@ -63,8 +63,8 @@
 		{{ topic }} 
 	{% endif %}
 
+		<br /><br />
 		<div class="preview-box" style="display: none">
-			<br />
 			{% trans "Preview" %}:<br />
 			<div class="content post">
 			</div>

=== modified file 'templates/pybb/edit_post.html'
--- templates/pybb/edit_post.html	2012-04-19 19:46:21 +0000
+++ templates/pybb/edit_post.html	2013-10-27 22:29:20 +0000
@@ -39,12 +39,12 @@
 		{% pybb_link post.topic.forum.category %} &#187; 
 		<a href="{{ post.topic.forum.get_absolute_url }}">{{ post.topic.forum.name }}</a> &#187;
 		{{ post.topic }}
-
+		<br /><br />
 		<div class="preview-box" style="display: none">
-			<br />
 			{% trans "Preview" %}:<br />
 			<div class="content post">
 			</div>
+			<br />
 		</div>
 
 		{{ form.as_p }}

=== modified file 'templates/pybb/forum.html'
--- templates/pybb/forum.html	2012-04-20 11:48:50 +0000
+++ templates/pybb/forum.html	2013-10-27 22:29:20 +0000
@@ -23,10 +23,10 @@
 	{% pybb_link forum.category %} &#187; 
 	{{ forum }}
 	<br /><br />
-	<button class="posRight" onclick="window.location.href='{% url pybb_add_topic forum.id %}';">
+	<a class="button posRight" href="{% url pybb_add_topic forum.id %}">
 		<img src="{{MEDIA_URL}}/forum/img/new_topic.png" alt ="{% trans "New Topic" %}" class="middle" />
 		<span class="middle">{% trans "New Topic" %}</span>
-	</button>
+	</a>
 	{% pybb_pagination _('Topics') %}
 	<br /><br />
 
@@ -71,10 +71,10 @@
 	</table>
 
 	<br />
-	<button class="posRight" onclick="window.location.href='{% url pybb_add_topic forum.id %}';">
+	<a class="button posRight" href="{% url pybb_add_topic forum.id %}">
 		<img src="{{MEDIA_URL}}/forum/img/new_topic.png" alt ="{% trans "New Topic" %}" class="middle" />
 		<span class="middle">{% trans "New Topic" %}</span>
-	</button>
+	</a>
 	{% pybb_pagination _('Topics') %}
 	<br />
 </div>

=== modified file 'templates/pybb/topic.html'
--- templates/pybb/topic.html	2012-04-20 11:48:50 +0000
+++ templates/pybb/topic.html	2013-10-27 22:29:20 +0000
@@ -27,44 +27,44 @@
 	<div class="posRight">
 	{% if moderator %}
 		{% if topic.sticky %}
-		<button onclick="window.location.href='{% url pybb_unstick_topic topic.id %}';">
+		<a class="button" href="{% url pybb_unstick_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/unstick.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Unstick Topic" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_stick_topic topic.id %}';">
+		<a class="button" href="{% url pybb_stick_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/sticky.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Stick Topic" %}</span>
-		</button>
+		</a>
 		{% endif %}
 		{% if topic.closed %}
-		<button onclick="window.location.href='{% url pybb_open_topic topic.id %}';">
+		<a class="button" href="{% url pybb_open_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/open.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Open Topic" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_close_topic topic.id %}';">
+		<a class="button" href="{% url pybb_close_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/closed.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Close Topic" %}</span>
-		</button>
+		</a>
 		{% endif %}
 	{% endif %}
 	{% if user.is_authenticated %}
 		{% if subscribed %}
-		<button onclick="window.location.href='{% url pybb_delete_subscription topic.id %}?from_topic';">
+		<a class="button" href="{% url pybb_delete_subscription topic.id %}?from_topic">
 			<img src="{{MEDIA_URL}}/forum/img/unsubscribe.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Unsubscribe" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_add_subscription topic.id %}';">
+		<a class="button" href="{% url pybb_add_subscription topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/subscribe.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Subscribe" %}</span>
-		</button>
+		</a>
 		{% endif %}
-		<button onclick="window.location.href='{% url pybb_add_post topic.id %}';">
+		<a class="button" href="{% url pybb_add_post topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/send.png" alt ="" class="middle" />
 			<span class="middle">{% trans "New Reply" %}</span>
-		</button>
+		</a>
 	{% endif %}
 	</div>
 	{% pybb_pagination _('Posts') %}
@@ -217,25 +217,25 @@
 					{% endif %}
 				{% endif %}
 
-				<button onclick="window.location.href='#top';" class="posRight">
+				<a class="button posRight" href="#top">
 					<img src="{{MEDIA_URL}}/forum/img/top.png" alt ="" class="middle" />
 					<span class="middle">{% trans "Top" %}</span>
-				</button>
+				</a>
 
-				<button onclick="window.location.href='{% url pybb_add_post topic.id %}?quote_id={{ post.id }}';">
+				<a class="button" href="{% url pybb_add_post topic.id %}?quote_id={{ post.id }}">
 					<img src="{{MEDIA_URL}}/forum/img/quote.png" alt ="" class="middle" />
 					<span class="middle">{% trans "Quote" %}</span>
-				</button>
+				</a>
 				{% if moderator or post|pybb_posted_by:user %}
-					<button onclick="window.location.href='{% url pybb_edit_post post.id %}';">
+					<a class="button" href="{% url pybb_edit_post post.id %}">
 						<img src="{{MEDIA_URL}}/forum/img/edit.png" alt ="" class="middle" />
 						<span class="middle">{% trans "Edit" %}</span>
-					</button>
+					</a>
 					{% if moderator or post|pybb_equal_to:last_post %}
-					<button onclick="window.location.href='{% url pybb_delete_post post.id %}';">
+					<a class="button" href="{% url pybb_delete_post post.id %}">
 						<img src="{{MEDIA_URL}}/forum/img/delete.png" alt ="" class="middle" />
 						<span class="middle">{% trans "Delete" %}</span>
-					</button>
+					</a>
 					{% endif %}
 				{% endif %}
 			</td>
@@ -251,44 +251,44 @@
 	<div class="posRight">
 	{% if moderator %}
 		{% if topic.sticky %}
-		<button onclick="window.location.href='{% url pybb_unstick_topic topic.id %}';">
+		<a class="button" href="{% url pybb_unstick_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/unstick.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Unstick Topic" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_stick_topic topic.id %}';">
+		<a class="button" href="{% url pybb_stick_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/sticky.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Stick Topic" %}</span>
-		</button>
+		</a>
 		{% endif %}
 		{% if topic.closed %}
-		<button onclick="window.location.href='{% url pybb_open_topic topic.id %}';">
+		<a class="button" href="{% url pybb_open_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/open.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Open Topic" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_close_topic topic.id %}';">
+		<a class="button" href="{% url pybb_close_topic topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/closed.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Close Topic" %}</span>
-		</button>
+		</a>
 		{% endif %}
 	{% endif %}
 	{% if user.is_authenticated %}
 		{% if subscribed %}
-		<button onclick="window.location.href='{% url pybb_delete_subscription topic.id %}?from_topic';">
+		<a class="button" href="{% url pybb_delete_subscription topic.id %}?from_topic">
 			<img src="{{MEDIA_URL}}/forum/img/unsubscribe.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Unsubscribe" %}</span>
-		</button>
+		</a>
 		{% else %}
-		<button onclick="window.location.href='{% url pybb_add_subscription topic.id %}';">
+		<a class="button" href="{% url pybb_add_subscription topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/subscribe.png" alt ="" class="middle" />
 			<span class="middle">{% trans "Subscribe" %}</span>
-		</button>
+		</a>
 		{% endif %}
-		<button onclick="window.location.href='{% url pybb_add_post topic.id %}';">
+		<a class="button" href="{% url pybb_add_post topic.id %}">
 			<img src="{{MEDIA_URL}}/forum/img/send.png" alt ="" class="middle" />
 			<span class="middle">{% trans "New Reply" %}</span>
-		</button>
+		</a>
 	{% endif %}
 	</div>
 	{% pybb_pagination _('Posts') %}

=== modified file 'templates/wlmaps/index.html'
--- templates/wlmaps/index.html	2013-08-09 22:49:08 +0000
+++ templates/wlmaps/index.html	2013-10-27 22:29:20 +0000
@@ -51,10 +51,10 @@
 						<td class="grey">Downloads:</td><td>{{ map.nr_downloads }}</td>
 						<td class="spacer"></td>
 						<td colspan="2">
-							<button onclick="window.location.href='{% url wlmaps_download map.slug %}';">
+							<a class="button" href="{% url wlmaps_download map.slug %}">
 								<img src="{{MEDIA_URL}}/img/download.png" alt ="" class="middle" />
 								<span class="middle">Direct Download</span>
-							</button>
+							</a>
 						</td>
 					</tr>
 				</table>

=== modified file 'templates/wlmaps/map_detail.html'
--- templates/wlmaps/map_detail.html	2012-05-08 21:52:15 +0000
+++ templates/wlmaps/map_detail.html	2013-10-27 22:29:20 +0000
@@ -88,10 +88,10 @@
 		</table>
 	</div>
 	<br /><br />
-	<button onclick="window.location.href='{% url wlmaps_download map.slug %}';">
+	<a class="button" href="{% url wlmaps_download map.slug %}">
 		<img src="{{MEDIA_URL}}/img/download.png" alt ="" class="middle" />
 		<span class="middle">Download this map</span>
-	</button>
+	</a>
 	<div style="clear: left;"></div>
 </div>
 

=== modified file 'wlscreens/views.py'
--- wlscreens/views.py	2013-06-14 19:23:53 +0000
+++ wlscreens/views.py	2013-10-27 22:29:20 +0000
@@ -6,7 +6,7 @@
 from django.http import Http404
 
 def index( request ):
-    c = Category.objects.all()
+    c = Category.objects.order_by("-name")
 
     return render_to_response( "wlscreens/index.html",
                 { "categories": c, },


Follow ups