diff --git a/app/assets/images/themes/default/layout/forum-category-highlight.png b/app/assets/images/themes/default/layout/forum-category-highlight.png index 3a0813b..61f4eaa 100644 Binary files a/app/assets/images/themes/default/layout/forum-category-highlight.png and b/app/assets/images/themes/default/layout/forum-category-highlight.png differ diff --git a/app/assets/images/themes/default/layout/forum-category.png b/app/assets/images/themes/default/layout/forum-category.png index 61f4eaa..3a0813b 100644 Binary files a/app/assets/images/themes/default/layout/forum-category.png and b/app/assets/images/themes/default/layout/forum-category.png differ diff --git a/app/assets/stylesheets/themes/default/components/_flashes.scss b/app/assets/stylesheets/themes/default/components/_flashes.scss index 088fe35..3a2772a 100644 --- a/app/assets/stylesheets/themes/default/components/_flashes.scss +++ b/app/assets/stylesheets/themes/default/components/_flashes.scss @@ -75,7 +75,7 @@ div#errors { top: 0; .message { - background: image-url("#{theme-path}/layout/flash-notice-background.png"); + background: image-url("#{$theme-path}/layout/flash-notice-background.png"); position: relative; width: 730px; height: 60px; @@ -89,7 +89,7 @@ div#errors { z-index: 2; &:before { - background: image-url("#{theme-path}/layout/flash-notice-icon.png"); + background: image-url("#{$theme-path}/layout/flash-notice-icon.png"); content: ''; display: block; width: 30px; @@ -102,10 +102,10 @@ div#errors { &.warning, &.error, &.alert { - background: image-url("#{theme-path}/layout/flash-error-background.png"); + background: image-url("#{$theme-path}/layout/flash-error-background.png"); &:before { - background: image-url("#{theme-path}/layout/flash-error-icon.png"); + background: image-url("#{$theme-path}/layout/flash-error-icon.png"); } } } diff --git a/app/assets/stylesheets/themes/default/pages/_forums.scss b/app/assets/stylesheets/themes/default/pages/_forums.scss index 14b1ff2..f3b46b7 100644 --- a/app/assets/stylesheets/themes/default/pages/_forums.scss +++ b/app/assets/stylesheets/themes/default/pages/_forums.scss @@ -120,8 +120,12 @@ div#categories { border-radius: $base-border-radius; border: 0; + .read { + color: $base-font-color; + } + .unread { - color: $red; + color: $blue; } thead th { diff --git a/app/assets/stylesheets/themes/flat/components/_flashes.scss b/app/assets/stylesheets/themes/flat/components/_flashes.scss index 8729f09..4c876eb 100644 --- a/app/assets/stylesheets/themes/flat/components/_flashes.scss +++ b/app/assets/stylesheets/themes/flat/components/_flashes.scss @@ -62,4 +62,28 @@ 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; + } } \ No newline at end of file diff --git a/app/assets/stylesheets/themes/flat/pages/_forums.scss b/app/assets/stylesheets/themes/flat/pages/_forums.scss index a849afe..60e046a 100644 --- a/app/assets/stylesheets/themes/flat/pages/_forums.scss +++ b/app/assets/stylesheets/themes/flat/pages/_forums.scss @@ -130,6 +130,11 @@ div#categories { border-radius: $base-border-radius; border: 0; + .read { + color: $base-font-color; + font-weight: normal; + } + .unread { color: $red; } diff --git a/app/controllers/forums_controller.rb b/app/controllers/forums_controller.rb index 1b3ba0c..890b0ae 100644 --- a/app/controllers/forums_controller.rb +++ b/app/controllers/forums_controller.rb @@ -11,8 +11,7 @@ class ForumsController < ApplicationController raise AccessError unless @forum.can_show? cuser @topics = Topic.where(forum_id: @forum.id) - .joins(:posts, :user, :users_who_read) - .includes(:lock) + .includes(:posts, :user, :users_who_read, :lock) .group('topics.id') .order('state DESC, posts.id DESC') .paginate(page: params[:page], per_page: 30) diff --git a/app/views/gathers/show.html.erb b/app/views/gathers/show.html.erb index 6fc716e..7f4f160 100644 --- a/app/views/gathers/show.html.erb +++ b/app/views/gathers/show.html.erb @@ -8,8 +8,8 @@ type: "script", minTimeout: 5000, maxTimeout: 15000, - success: function(response) { - if (response.match(/Gather:voting/)) { + success: function(response, text, request) { + if (request.getResponseHeader('Gather') == 'voting') { if (!played) { $("#jplayer").jPlayer({ ready: function() { diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 64f1505..b52f246 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,7 @@ Capybara.register_driver :poltergeist do |app| ) end -Capybara.javascript_driver = :poltergeist +Capybara.javascript_driver = :selenium Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } @@ -33,7 +33,7 @@ RSpec.configure do |config| config.before(:each) do if example.metadata[:type] == :feature - Capybara.current_driver = :poltergeist + Capybara.current_driver = :selenium else Capybara.use_default_driver end