Fixes gather music not playing during voting phase

Fixes issues with topic ordering
Tweaked read/unread icon colours for forums
This commit is contained in:
Luke Barratt 2014-05-16 23:54:41 +01:00
parent 1a4a0f4d83
commit f41e6e0d5a
9 changed files with 43 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -75,7 +75,7 @@ div#errors {
top: 0; top: 0;
.message { .message {
background: image-url("#{theme-path}/layout/flash-notice-background.png"); background: image-url("#{$theme-path}/layout/flash-notice-background.png");
position: relative; position: relative;
width: 730px; width: 730px;
height: 60px; height: 60px;
@ -89,7 +89,7 @@ div#errors {
z-index: 2; z-index: 2;
&:before { &:before {
background: image-url("#{theme-path}/layout/flash-notice-icon.png"); background: image-url("#{$theme-path}/layout/flash-notice-icon.png");
content: ''; content: '';
display: block; display: block;
width: 30px; width: 30px;
@ -102,10 +102,10 @@ div#errors {
&.warning, &.warning,
&.error, &.error,
&.alert { &.alert {
background: image-url("#{theme-path}/layout/flash-error-background.png"); background: image-url("#{$theme-path}/layout/flash-error-background.png");
&:before { &:before {
background: image-url("#{theme-path}/layout/flash-error-icon.png"); background: image-url("#{$theme-path}/layout/flash-error-icon.png");
} }
} }
} }

View file

@ -120,8 +120,12 @@ div#categories {
border-radius: $base-border-radius; border-radius: $base-border-radius;
border: 0; border: 0;
.read {
color: $base-font-color;
}
.unread { .unread {
color: $red; color: $blue;
} }
thead th { thead th {

View file

@ -63,3 +63,27 @@ div#errors {
} }
} }
} }
/*
Notification Messages
*/
#notification {
position: absolute;
margin: 0 auto;
left: 50%;
top: 0;
.message {
@extend .flash;
position: relative;
width: auto;
left: -50%;
text-align: center;
font-family: $header-font-family;
color: white;
padding: 0 100px;
z-index: 2;
}
}

View file

@ -130,6 +130,11 @@ div#categories {
border-radius: $base-border-radius; border-radius: $base-border-radius;
border: 0; border: 0;
.read {
color: $base-font-color;
font-weight: normal;
}
.unread { .unread {
color: $red; color: $red;
} }

View file

@ -11,8 +11,7 @@ class ForumsController < ApplicationController
raise AccessError unless @forum.can_show? cuser raise AccessError unless @forum.can_show? cuser
@topics = Topic.where(forum_id: @forum.id) @topics = Topic.where(forum_id: @forum.id)
.joins(:posts, :user, :users_who_read) .includes(:posts, :user, :users_who_read, :lock)
.includes(:lock)
.group('topics.id') .group('topics.id')
.order('state DESC, posts.id DESC') .order('state DESC, posts.id DESC')
.paginate(page: params[:page], per_page: 30) .paginate(page: params[:page], per_page: 30)

View file

@ -8,8 +8,8 @@
type: "script", type: "script",
minTimeout: 5000, minTimeout: 5000,
maxTimeout: 15000, maxTimeout: 15000,
success: function(response) { success: function(response, text, request) {
if (response.match(/Gather:voting/)) { if (request.getResponseHeader('Gather') == 'voting') {
if (!played) { if (!played) {
$("#jplayer").jPlayer({ $("#jplayer").jPlayer({
ready: function() { ready: function() {

View file

@ -17,7 +17,7 @@ Capybara.register_driver :poltergeist do |app|
) )
end end
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :selenium
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
@ -33,7 +33,7 @@ RSpec.configure do |config|
config.before(:each) do config.before(:each) do
if example.metadata[:type] == :feature if example.metadata[:type] == :feature
Capybara.current_driver = :poltergeist Capybara.current_driver = :selenium
else else
Capybara.use_default_driver Capybara.use_default_driver
end end