Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add tagging controller (have yet to add tagging to motions views). #65

Merged
24 commits merged into from

3 participants

Bernie Telles Barrett Clark Joseph DelCioppio
Bernie Telles
Collaborator

Okay, this should be ready for pulling into master.
(as far as I can tell)... Would someone please pull this? :-)

btelles added some commits
Bernie Telles btelles Refactor flashes, place them into a partial. d1b3060
Bernie Telles btelles add ability to delete members through ui. a55df4c
Bernie Telles btelles Improve motions#index a little bit. 9dfaae8
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance
Conflicts:
	app/views/motions/_motion.html.haml
50daccd
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance
Conflicts:
	app/stylesheets/application.scss
	public/stylesheets/application.css
182ab9f
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance
Conflicts:
	app/views/motions/_motion.html.haml
	public/stylesheets/application.css
43da542
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance 59afe95
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance
Conflicts:
	public/stylesheets/application.css
8b7a9a9
Bernie Telles btelles Revert "add ability to delete members through ui."
This reverts commit a55df4cf1df4e47d0dabf774567186ab0e8fa8f0.
38c064f
Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance 85e8254
Bernie Telles btelles Remove acts_as_paranoid. 89e3676
Bernie Telles btelles Move current_member helpers to controller
and keep them as helpers.
1d59255
Bernie Telles btelles Add tag model and default seeds
('swag' was in the PT story, not sure if it's necessary).
402ed6d
Bernie Telles btelles Add tag story that is to be implemented. 46cf2b9
Bernie Telles btelles Add blueprint grid for easy layouts. f80b11c
Bernie Telles btelles Add jQueryUI & highlight fade js. 5f5a7dc
Bernie Telles btelles Add remove image button. 56f0909
Bernie Telles btelles Add tag functionality and make cucumber feature work. 9fb750a
Barrett Clark

Do you use blueprint in any of the views? There is already a lot of CSS included in the page for the overall jQuery chrome. What does blueprint do for us that isn't already in place? I've never used it, so I honestly don't know.

Bernie Telles
Collaborator

Hi Barrett, :-)
Sure, I use it in the new 'tags#index' view where it divides the list of tags into 3 evenly-spaced columns.

Here's a description of what the scss mixin does:
http://compass-style.org/docs/reference/blueprint/grid/

And here's the documentation for blueprint that is specific to blueprint grids:
http://compass-style.org/docs/reference/blueprint/grid/

(In all honesty, I find the YUI Grids CSS tool easier to use than blueprint's grid, but I think compass only comes with blueprint...they dropped YUI a while ago).

Bernie Telles btelles Merge branch 'master' of https://github.com/wycats/jquery-governance
Conflicts:
	app/stylesheets/application.scss
	app/views/admin/members/edit.html.haml
	app/views/admin/members/index.html.haml
	app/views/admin/members/new.html.haml
	app/views/motions/_motion.html.haml
	app/views/motions/_motion_list.html.haml
	app/views/motions/index.html.haml
	public/stylesheets/application.css
6d3bf70
Joseph DelCioppio
Collaborator

Here Bernardo, I pulled this in but its got some merge conflicts, can you pull from master, update them and then I'll pull it down?

Bernie Telles
Collaborator

Joseph,
Thanks. I merged the results and tested that we're all green/yellow in rspec and cucumber. This should make us happy for a while...adding more tests right now just for good measure, but you should be able to pull now. (Or I can commit to master if you want.)
Cheers,
Bernie

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 9, 2010
  1. Bernie Telles
  2. Bernie Telles
  3. Bernie Telles
  4. Bernie Telles

    Merge branch 'master' of https://github.com/wycats/jquery-governance

    btelles authored
    Conflicts:
    	app/views/motions/_motion.html.haml
Commits on Dec 10, 2010
  1. Bernie Telles

    Merge branch 'master' of https://github.com/wycats/jquery-governance

    btelles authored
    Conflicts:
    	app/stylesheets/application.scss
    	public/stylesheets/application.css
Commits on Dec 11, 2010
  1. Bernie Telles

    Merge branch 'master' of https://github.com/wycats/jquery-governance

    btelles authored
    Conflicts:
    	app/views/motions/_motion.html.haml
    	public/stylesheets/application.css
  2. Bernie Telles
Commits on Dec 12, 2010
  1. Bernie Telles

    Merge branch 'master' of https://github.com/wycats/jquery-governance

    btelles authored
    Conflicts:
    	public/stylesheets/application.css
  2. Bernie Telles

    Revert "add ability to delete members through ui."

    btelles authored
    This reverts commit a55df4cf1df4e47d0dabf774567186ab0e8fa8f0.
Commits on Dec 14, 2010
  1. Bernie Telles
Commits on Dec 15, 2010
  1. Bernie Telles

    Remove acts_as_paranoid.

    btelles authored
  2. Bernie Telles

    Move current_member helpers to controller

    btelles authored
    and keep them as helpers.
  3. Bernie Telles

    Add tag model and default seeds

    btelles authored
    ('swag' was in the PT story, not sure if it's necessary).
  4. Bernie Telles
  5. Bernie Telles
  6. Bernie Telles
  7. Bernie Telles

    Add remove image button.

    btelles authored
  8. Bernie Telles
Commits on Dec 17, 2010
  1. Bernie Telles

    Merge branch 'master' of https://github.com/wycats/jquery-governance

    btelles authored
    Conflicts:
    	app/stylesheets/application.scss
    	app/views/admin/members/edit.html.haml
    	app/views/admin/members/index.html.haml
    	app/views/admin/members/new.html.haml
    	app/views/motions/_motion.html.haml
    	app/views/motions/_motion_list.html.haml
    	app/views/motions/index.html.haml
    	public/stylesheets/application.css
Commits on Dec 18, 2010
  1. Bernie Telles
  2. Bernie Telles

    Remove member spec commit.

    btelles authored
  3. Bernie Telles
Commits on Dec 19, 2010
  1. Bernie Telles
  2. Bernie Telles
This page is out of date. Refresh to see the latest.
Showing with 323 additions and 533 deletions.
  1. +0 −1  Gemfile
  2. +0 −3  Gemfile.lock
  3. +34 −0 app/controllers/admin/tags_controller.rb
  4. +23 −0 app/controllers/application_controller.rb
  5. +0 −7 app/helpers/application_helper.rb
  6. +5 −0 app/helpers/tags_helper.rb
  7. +0 −2  app/models/member.rb
  8. +2 −0  app/models/motion.rb
  9. +8 −0 app/models/tag.rb
  10. +39 −7 app/stylesheets/application.scss
  11. +2 −0  app/views/admin/members/edit.html.haml
  12. +10 −0 app/views/admin/tags/_tags.html.haml
  13. +10 −0 app/views/admin/tags/index.html.haml
  14. +4 −2 app/views/layouts/application.html.haml
  15. +13 −0 app/views/motions/_short_motion.html.haml
  16. +4 −0 app/views/shared/_flashes.html.haml
  17. +22 −0 config/locales/en.yml
  18. +1 −0  config/routes.rb
  19. +0 −9 db/migrate/20101205193144_add_deleted_at_to_members.rb
  20. +24 −0 db/migrate/20101215025612_create_tags.rb
  21. +14 −2 db/schema.rb
  22. +9 −0 db/seeds/tags.csv
  23. +19 −0 features/member_creates_tag.feature
  24. +1 −0  features/step_definitions/tag_steps.rb
  25. +2 −0  features/support/paths.rb
  26. BIN  public/images/remove.png
  27. +10 −2 public/javascripts/application.js
  28. +31 −0 public/javascripts/jquery-ui.js
  29. +0 −491 public/stylesheets/application.css
  30. +12 −0 spec/factories/tags.rb
  31. +0 −7 spec/models/member_spec.rb
  32. +24 −0 spec/models/tag_spec.rb
1  Gemfile
View
@@ -11,7 +11,6 @@ gem 'haml', '~>3.0.23'
gem 'haml-rails'
gem 'compass'
-gem 'rails3_acts_as_paranoid'
gem 'resque'
gem 'resque-scheduler', :require => "resque_scheduler"
3  Gemfile.lock
View
@@ -155,8 +155,6 @@ GEM
rack (>= 1.0.0)
rack-test (0.5.6)
rack (>= 1.0)
- rails3_acts_as_paranoid (0.0.2)
- activerecord (>= 3.0)
rake (0.8.7)
redis (2.1.1)
redis-namespace (0.8.0)
@@ -239,7 +237,6 @@ DEPENDENCIES
rack!
rack-cache!
rails!
- rails3_acts_as_paranoid
resque
resque-scheduler
rspec-rails
34 app/controllers/admin/tags_controller.rb
View
@@ -0,0 +1,34 @@
+class Admin::TagsController < ApplicationController
+
+ before_filter :require_active_member, :only => [:create, :destroy]
+
+ def index
+ @tags = Tag.motion_counts
+ @tag = Tag.new
+ @new_tag_id = params[:new_tag_id]
+ @old_tag_id = params[:old_tag_id]
+ end
+
+ def create
+ @tag = Tag.new(params[:tag])
+ if @tag.save
+ @tags = Tag.order(:name)
+ flash[:notice] = t('admin.tags.notices.tag_created')
+ redirect_to :action => 'index', :new_tag_id => @tag.id
+ else
+ flash[:alert] = t('admin.tags.alerts.tag_not_created')
+ redirect_to :action => 'index'
+ end
+ end
+
+ def destroy
+ @tag = Tag.find(params[:id])
+ if @tag.destroy
+ flash[:notice] = t('admin.tags.notices.tag_destroyed')
+ redirect_to :action => 'index', :old_tag_id => @tag.id
+ else
+ flash[:alert] = t('admin.tags.alerts.tag_destroyed')
+ redirect_to :action => 'index'
+ end
+ end
+end
23 app/controllers/application_controller.rb
View
@@ -1,3 +1,26 @@
class ApplicationController < ActionController::Base
protect_from_forgery
+
+ helper_method :member?, :admin?, :active_member?
+
+ def member?
+ current_member
+ end
+
+ def admin?
+ active_member? && current_member.is_admin?
+ end
+
+ def active_member?
+ current_member && current_member.membership_active?
+ end
+
+ def require_active_member
+ if active_member?
+ true
+ else
+ flash[:notice] = "You are not authorized to view this page."
+ redirect_to root_url
+ end
+ end
end
7 app/helpers/application_helper.rb
View
@@ -12,11 +12,4 @@ def motion_creator_display_name(motion)
end
end # motion_creator_display_name
- def member?
- current_member
- end
-
- def active_member?
- current_member && current_member.membership_active?
- end
end
5 app/helpers/tags_helper.rb
View
@@ -0,0 +1,5 @@
+module TagsHelper
+ def highlight_new_tag(current_tag)
+ @new_tag_id.to_i == current_tag.id ? 'highlight_fade' : ''
+ end
+end
2  app/models/member.rb
View
@@ -1,8 +1,6 @@
class Member < ActiveRecord::Base
include Voting
- acts_as_paranoid
-
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
devise :database_authenticatable, :recoverable, :rememberable
2  app/models/motion.rb
View
@@ -1,6 +1,7 @@
class Motion < ActiveRecord::Base
include Voting
+
CLOSED_STATES = %w(closed)
OPEN_STATES = %w(waitingsecond discussing voting)
MOTION_STATES = OPEN_STATES + CLOSED_STATES
@@ -26,6 +27,7 @@ class Motion < ActiveRecord::Base
has_many :events
has_many :motion_conflicts
has_many :conflicts, :through => :motion_conflicts
+ has_and_belongs_to_many :tags, :join_table => "taggings"
after_save :schedule_updates, :if => :state_name_changed?
after_create :schedule_updates
8 app/models/tag.rb
View
@@ -0,0 +1,8 @@
+class Tag < ActiveRecord::Base
+ has_and_belongs_to_many :motions, :join_table => "taggings"
+
+ scope :motion_counts, select("tags.id, tags.name, count(taggings.tag_id) as count").
+ joins("left outer join taggings on taggings.tag_id = tags.id").
+ group("tags.name, taggings.tag_id").
+ order(:name)
+end
46 app/stylesheets/application.scss
View
@@ -1,21 +1,22 @@
@import "compass/css3";
+@import "blueprint";
+@include blueprint-grid;
/* @group Variables */
$border_color: #ccc;
$font_base: 12px;
$font_label: $font_base + 2px;
$font_label_height: 30px;
-
+$font_color: #4F3806;
$form_row_spacing: 10px;
$label_width: 120px;
$input_padding: 5px;
$input_width: 550px;
$textarea_width: 550px;
$header_green: #407A27;
-
-$header_green: #407A27;
-
+$flash_notice_border: #DCDA00;
+$flash_notice_background: #FFFECF;
/* @end */
/* @group Global */
@@ -122,7 +123,6 @@ body {
}
}
-
#user_signin_form {
width: 400px;
margin: 20px auto;
@@ -138,6 +138,12 @@ body {
/* @group Motions */
div.motion {
+ border-left: 3px solid $border_color;
+ border-top: 1px solid $border_color;
+ border-bottom: 1px solid $border_color;
+ margin-bottom: 5px;
+ padding: 0px 3px 0px 3px;
+ @include border-radius(6px);
h2 {
clear: both;
text-align: center;
@@ -220,6 +226,18 @@ div.motion {
@include linear-gradient(color-stops(lighten($top, 5%), lighten($bottom, 5%)));
}
}
+ a.remove {
+ background-image: url('/images/remove.png');
+ background-repeat: no-repeat;
+ background-position: top right;
+ text-decoration: none;
+ font-size: 1px;
+ height: 16px;
+ width: 16px;
+ color: #fff;
+ display: inline-block;
+ span { display: none; }
+ }
a.more-button {
$top: #C0C0C0;
@@ -416,8 +434,8 @@ nav.main ul {
#flash_notice {
margin: 10px 20px;
clear: both;
- background: #FFFECF;
- border: 2px solid #DCDA00;
+ background: $flash_notice_background;
+ border: 2px solid $flash_notice_border;
font-size: 14px;
text-align: center;
padding: 5px 20px;
@@ -449,3 +467,17 @@ nav.main ul {
#error_explanation h3 { font-size: 12px;}
/* @end */
+
+#tags li{
+ font-size: 16px;
+ margin: 0.25em 0;
+ span {
+ padding: 4px;
+ @include border-radius(4px);
+ }
+}
+
+.highlight_fade {
+ background-color: $flash_notice_background;
+}
+
2  app/views/admin/members/edit.html.haml
View
@@ -4,5 +4,7 @@
%section#main
= form_for [:admin, @member] do |form|
= render form
+ -if admin?
+ =link_to t("admin.members.actions.delete_member"), [:admin, @member], :method => 'delete', :confirm => 'Are you sure you want to delete the user?'
.buttons
= form.submit t("admin.members.actions.update_member")
10 app/views/admin/tags/_tags.html.haml
View
@@ -0,0 +1,10 @@
+-tags.in_groups(3).each do |tags_in_group|
+ .span-7
+ %ul
+ -tags_in_group.each do |tag_name|
+ -if tag_name
+ %li{'data-tags-id' => tag_name.id}
+ %span{:class => highlight_new_tag(tag_name)}
+ -unless tag_name.count > 0
+ =link_to raw("<span>Remove</span>"), admin_tag_path(tag_name), :method => 'delete', :confirm => "Are you sure?", :class => 'remove'
+ =tag_name.name
10 app/views/admin/tags/index.html.haml
View
@@ -0,0 +1,10 @@
+%h1 Showing all tags
+#flash
+=form_for @tag, :url => {:action => 'create'} do |f|
+ #tags
+ = render 'tags', :tags => @tags
+
+ .form_row
+ =f.label :name, 'Tag name', :class => 'hidden'
+ =f.text_field :name
+ =f.submit t("admin.tags.actions.add_new_tag"), :class => 'button large_button'
6 app/views/layouts/application.html.haml
View
@@ -7,7 +7,9 @@
=stylesheet_link_tag "application"
=javascript_include_tag :defaults
=javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"
+ =javascript_include_tag "jquery-ui.js"
=javascript_include_tag "http://static.jquery.com/files/rocker/scripts/custom.js"
+ =csrf_meta_tag
%title
jQuery Voting Tools
%body
@@ -41,11 +43,11 @@
%nav.main
%ul
%li.first=link_to 'Motions', root_path
- %li=link_to 'Open Motions', motions_path
%li=link_to 'Closed Motions', closed_motions_path
- -if current_member.try(:is_admin?)
+ -if admin?
%li=link_to 'Manage Members', admin_members_path
-if current_member
+ %li=link_to 'Tags', admin_tags_path
%li=link_to 'Sign out', sign_out_path
-else
%li=link_to 'Sign in', sign_in_path
13 app/views/motions/_short_motion.html.haml
View
@@ -0,0 +1,13 @@
+.motion
+ %h1
+ =link_to short_motion.title, motion_events_path(short_motion)
+ %p.meta
+ %span.created_at== Created on #{short_motion.created_at.to_date}
+ %span.author== by #{short_motion.member.name}
+ %span.current_state== and currently #{short_motion.formatted_state.downcase}.
+ %p.description
+ %span Description:
+ = short_motion.description
+ %p.rationale
+ %span Rationale:
+ = short_motion.rationale
4 app/views/shared/_flashes.html.haml
View
@@ -0,0 +1,4 @@
+- if flash[:notice].present? || flash[:alert].present?
+ %p.notice{:class => ('alert' if flash[:alert])}
+ =notice
+ =alert
22 config/locales/en.yml
View
@@ -33,3 +33,25 @@ en:
member_not_created: "Member could not be created"
member_not_saved: "Member could not be saved"
member_not_destroyed: "Member could not be deleted"
+ tags:
+ titles:
+ index: "Manage tags"
+ new: "New tag"
+ edit: "Edit tag info"
+ headings:
+ name: "Name"
+ email: "E-mail address"
+ actions: "Actions"
+ actions:
+ add_new_tag: "Add"
+ edit_tag: "Edit tag"
+ update_tag: "Update tag info"
+ delete_tag: "Delete this tag"
+ notices:
+ tag_created: "Tag added."
+ tag_updated: "Tag updated."
+ tag_destroyed: "Tag deleted."
+ alerts:
+ tag_not_created: "Tag could not be created."
+ tag_not_saved: "Tag could not be saved."
+ tag_not_destroyed: "Tag could not be deleted."
1  config/routes.rb
View
@@ -3,6 +3,7 @@
namespace "admin" do
resources :base
resources :members
+ resources :tags
end
get "/admin", :to => "admin/base#index"
9 db/migrate/20101205193144_add_deleted_at_to_members.rb
View
@@ -1,9 +0,0 @@
-class AddDeletedAtToMembers < ActiveRecord::Migration
- def up
- add_column :members, :deleted_at, :datetime
- end
-
- def down
- remove_column :members, :deleted_at
- end
-end
24 db/migrate/20101215025612_create_tags.rb
View
@@ -0,0 +1,24 @@
+class CreateTags < ActiveRecord::Migration
+ def up
+ create_table :tags do |t|
+ t.string :name
+
+ t.timestamps
+ end
+
+ create_table :taggings, :id => false do |t|
+ t.belongs_to :tag
+ t.belongs_to :motion
+ end
+
+ add_index :taggings, [:tag_id, :motion_id]
+ end
+
+ def down
+ remove_index :taggings, :column => [:tag_id, :motion_id]
+
+ drop_table :taggings
+
+ drop_table :tags
+ end
+end
16 db/schema.rb
View
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20101214172457) do
+ActiveRecord::Schema.define(:version => 20101215025612) do
create_table "active_memberships", :force => true do |t|
t.integer "member_id"
@@ -64,7 +64,6 @@
t.string "remember_token"
t.datetime "remember_created_at"
t.boolean "is_admin"
- t.datetime "deleted_at"
end
add_index "members", ["email"], :name => "index_members_on_email", :unique => true
@@ -92,4 +91,17 @@
add_index "motions", ["member_id"], :name => "index_motions_on_member_id"
+ create_table "taggings", :id => false, :force => true do |t|
+ t.integer "tag_id"
+ t.integer "motion_id"
+ end
+
+ add_index "taggings", ["tag_id", "motion_id"], :name => "index_taggings_on_tag_id_and_motion_id"
+
+ create_table "tags", :force => true do |t|
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
end
9 db/seeds/tags.csv
View
@@ -0,0 +1,9 @@
+name
+"legal"
+"legal"
+"governance"
+"funding approval"
+"events"
+"sprints"
+"swag"
+"equipment"
19 features/member_creates_tag.feature
View
@@ -0,0 +1,19 @@
+Feature: Member creates tag
+ As an active Member
+ I want to create a tag
+ So that I can capture whaht the group has decided on in the past.
+
+ Scenario: Active member creates a tag
+ Given I am signed in as an active member
+ And I am on the admin tags page
+ When I fill in "Tag name" with "mojo"
+ And I press "Add"
+ Then I should see "mojo" in the list of tags
+
+ @wip
+ Scenario: Non-active member cannot create a tag
+ Given I am signed in as an inactive member
+ And I am on the tags page
+ When I fill in "Add a tag" with "mojo"
+ And I press "Add"
+ Then I should see "mojo" in the list of tags
1  features/step_definitions/tag_steps.rb
View
@@ -0,0 +1 @@
+semantic_suffixes('in the list of tags' => '#tags li')
2  features/support/paths.rb
View
@@ -20,6 +20,8 @@ def path_to(page_name)
edit_admin_member_path( Member.find_by_name($1) )
when /the new member admin page/
new_admin_member_path
+ when /the admin tags page/
+ admin_tags_path
when /the motions page for "(.*)"/
motion_events_path(Motion.find_by_title($1))
when /the home\s?page/
BIN  public/images/remove.png
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 public/javascripts/application.js
View
@@ -1,7 +1,6 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
-
-$(document).ready(function(){
+function moreMotionsInitializer() {
$('a.more_motions').live('click', function(e){
var self = $(this);
var data = {id: self.attr('data-last-id')};
@@ -12,4 +11,13 @@ $(document).ready(function(){
});
e.preventDefault();
});
+}
+
+function highlightFade() {
+ $('.highlight_fade').animate({backgroundColor : '#ffffff'}, 3000);
+}
+
+$(document).ready(function(){
+ moreMotionsInitializer();
+ highlightFade();
});
31 public/javascripts/jquery-ui.js
View
@@ -0,0 +1,31 @@
+/*
+ * jQuery UI Effects 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects||function(f,j){function n(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
+16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return o.transparent;return o[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return n(b)}function p(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
+a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function q(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
+a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function m(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
+"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=n(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var o={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
+0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
+211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},r=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,
+d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){f.queue(this,"fx",function(){var e=f(this),g=e.attr("style")||" ",h=q(p.call(this)),l,v=e.attr("className");f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});l=q(p.call(this));e.attr("className",v);e.animate(u(h,l),a,b,function(){f.each(r,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)});h=f.queue(this);l=
+h.splice(h.length-1,1)[0];h.splice(1,0,l);f.dequeue(this)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},
+b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.7",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";
+return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",
+background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);
+return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)});return d.call(this,b)},_show:f.fn.show,show:function(c){if(m(c))return this._show.apply(this,arguments);
+else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(m(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(m(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),
+b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,
+a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,
+a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==
+e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=
+g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/
+h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,
+a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
+;
491 public/stylesheets/application.css
View
@@ -1,491 +0,0 @@
-/* @group Variables */
-/* @end */
-/* @group Global */
-/* line 23, ../../app/stylesheets/application.scss */
-body {
- font-size: 12px;
-}
-
-/* line 27, ../../app/stylesheets/application.scss */
-.centered {
- text-align: center;
-}
-
-/* @end */
-/* @group Buttons */
-/* line 36, ../../app/stylesheets/application.scss */
-.button, .button:visited {
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -o-border-radius: 5px;
- -ms-border-radius: 5px;
- -khtml-border-radius: 5px;
- border-radius: 5px;
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) 0;
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) 0;
- -o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) 0;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) 0;
- border: 0;
- background: #222222 url("/images/btn_overlay.png") repeat-x;
- display: inline-block;
- padding: 5px 10px 6px;
- color: #fff;
- text-decoration: none;
- text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
- border-bottom: 1px solid rgba(0, 0, 0, 0.25);
- position: relative;
- cursor: pointer;
-}
-/* line 52, ../../app/stylesheets/application.scss */
-.button:hover {
- background-color: #111;
- color: #fff;
-}
-/* line 57, ../../app/stylesheets/application.scss */
-.button:active {
- top: 1px;
-}
-
-/* line 62, ../../app/stylesheets/application.scss */
-.small_button, .small.button:visited {
- font-size: 11px;
- padding: 5px;
-}
-
-/* line 68, ../../app/stylesheets/application.scss */
-.button, .button:visited,
-.medium_button, .medium_button:visited {
- font-size: 13px;
- font-weight: bold;
- line-height: 1;
- text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);
-}
-
-/* line 75, ../../app/stylesheets/application.scss */
-.large_button, .large_button:visited {
- font-size: 14px;
- padding: 8px 14px 9px;
-}
-
-/* line 80, ../../app/stylesheets/application.scss */
-.green_button, .green_button:visited {
- background-color: #91bd09;
-}
-
-/* line 84, ../../app/stylesheets/application.scss */
-.green_button:hover {
- background-color: #749a02;
-}
-
-/* @end */
-/* @group Forms */
-/* line 94, ../../app/stylesheets/application.scss */
-.form_row {
- margin-bottom: 10px;
- clear: both;
-}
-/* line 98, ../../app/stylesheets/application.scss */
-.form_row.submit {
- margin-top: 40px;
-}
-/* line 102, ../../app/stylesheets/application.scss */
-.form_row label {
- float: left;
- font-size: 14px;
- line-height: 30px;
- vertical-align: middle;
- width: 120px;
-}
-/* line 110, ../../app/stylesheets/application.scss */
-.form_row input[type=text], .form_row input[type=password], .form_row textarea {
- padding: 5px;
- width: 550px;
- border: 1px solid #cccccc;
-}
-/* line 115, ../../app/stylesheets/application.scss */
-.form_row input[type=checkbox] {
- margin-top: 5px;
-}
-/* line 119, ../../app/stylesheets/application.scss */
-.form_row textarea {
- height: 10em;
- width: 550px;
-}
-
-/* line 126, ../../app/stylesheets/application.scss */
-#user_signin_form {
- width: 400px;
- margin: 20px auto;
-}
-
-/* line 131, ../../app/stylesheets/application.scss */
-#new_motion_form {
- width: 700px;
- margin: 20px auto;
-}
-
-/* @end */
-/* @group Motions */
-/* line 141, ../../app/stylesheets/application.scss */
-div.motion h2 {
- clear: both;
- text-align: center;
-}
-/* line 145, ../../app/stylesheets/application.scss */
-div.motion h2 .author {
- display: block;
- color: #80a080;
-}
-/* line 151, ../../app/stylesheets/application.scss */
-div.motion .meta {
- font-style: italic;
- text-align: center;
- color: #666;
-}
-/* line 157, ../../app/stylesheets/application.scss */
-div.motion #motion-actions {
- margin: 30px 0;
- text-align: center;
-}
-/* line 161, ../../app/stylesheets/application.scss */
-div.motion #motion-actions .quick-tool {
- display: inline;
- float: none;
-}
-/* line 167, ../../app/stylesheets/application.scss */
-div.motion h3 {
- margin: 30px 0 10px;
- padding: 5px;
- background-color: #f3efe4;
- font-size: 1.7em;
-}
-/* line 174, ../../app/stylesheets/application.scss */
-div.motion p.description, div.motion p.rationale, div.motion p.expedited {
- padding: 5px;
- font-size: 1.6em;
- color: #666;
-}
-/* line 180, ../../app/stylesheets/application.scss */
-div.motion #motion-events li {
- padding: 5px;
- border-bottom: 1px solid #eee;
- font-size: 1.5em;
- color: #666;
-}
-
-/* line 188, ../../app/stylesheets/application.scss */
-#members_only {
- height: 30px;
-}
-
-/* @end */
-/* @group Homepage */
-/* line 199, ../../app/stylesheets/application.scss */
-#content a.quick-tool {
- background: #229922;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #44bb44), color-stop(100%, #229922));
- background-image: -moz-linear-gradient(top, #44bb44 0%, #229922 100%);
- background-image: linear-gradient(top, #44bb44 0%, #229922 100%);
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -o-border-radius: 3px;
- -ms-border-radius: 3px;
- -khtml-border-radius: 3px;
- border-radius: 3px;
- display: block;
- float: right;
- padding: .25em .5em;
- text-decoration: none;
- color: #FFFEFE !important;
- font-size: 1.8em !important;
- border: 1px solid #070;
-}
-/* line 213, ../../app/stylesheets/application.scss */
-#content a.quick-tool:hover {
- background: #3da83d;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #3da83d), color-stop(100%, #1d841d));
- background-image: -moz-linear-gradient(top, #3da83d 0%, #1d841d 100%);
- background-image: linear-gradient(top, #3da83d 0%, #1d841d 100%);
-}
-/* line 218, ../../app/stylesheets/application.scss */
-#content a.quick-tool:active {
- background: #57c257;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #57c257), color-stop(100%, #27ae27));
- background-image: -moz-linear-gradient(top, #57c257 0%, #27ae27 100%);
- background-image: linear-gradient(top, #57c257 0%, #27ae27 100%);
-}
-/* line 224, ../../app/stylesheets/application.scss */
-#content a.more-button {
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #c0c0c0), color-stop(100%, #808080));
- background-image: -moz-linear-gradient(top, #c0c0c0 0%, #808080 100%);
- background-image: linear-gradient(top, #c0c0c0 0%, #808080 100%);
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -o-border-radius: 3px;
- -ms-border-radius: 3px;
- -khtml-border-radius: 3px;
- border-radius: 3px;
- width: 100px;
- margin-left: 350px;
- color: #FFFEFE !important;
- font-size: 1.2em !important;
- border: 1px solid #070;
-}
-/* line 237, ../../app/stylesheets/application.scss */
-#content a.more-button:hover {
- background: #b3b3b3;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #b3b3b3), color-stop(100%, #737373));
- background-image: -moz-linear-gradient(top, #b3b3b3 0%, #737373 100%);
- background-image: linear-gradient(top, #b3b3b3 0%, #737373 100%);
-}
-/* line 242, ../../app/stylesheets/application.scss */
-#content a.more-button:active {
- background: #cdcdcd;
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #cdcdcd), color-stop(100%, #8d8d8d));
- background-image: -moz-linear-gradient(top, #cdcdcd 0%, #8d8d8d 100%);
- background-image: linear-gradient(top, #cdcdcd 0%, #8d8d8d 100%);
-}
-/* line 248, ../../app/stylesheets/application.scss */
-#content h1 {
- margin-bottom: 10px;
- padding-top: 0;
- font-size: 3em;
- color: #407a27;
- text-shadow: 0 1px 1px #ccc;
- font-style: italic;
-}
-/* line 257, ../../app/stylesheets/application.scss */
-#content h2 {
- -moz-border-radius-topleft: 5px;
- -webkit-border-top-left-radius: 5px;
- -o-border-top-left-radius: 5px;
- -ms-border-top-left-radius: 5px;
- -khtml-border-top-left-radius: 5px;
- border-top-left-radius: 5px;
- -moz-border-radius-topright: 5px;
- -webkit-border-top-right-radius: 5px;
- -o-border-top-right-radius: 5px;
- -ms-border-top-right-radius: 5px;
- -khtml-border-top-right-radius: 5px;
- border-top-right-radius: 5px;
-}
-
-/* line 263, ../../app/stylesheets/application.scss */
-.current-motions {
- margin-top: 10px;
-}
-/* line 266, ../../app/stylesheets/application.scss */
-.current-motions h2 {
- margin: 20px 0 10px;
- padding-left: 200px;
- font-size: 2.2em;
- font-style: italic;
- color: #cab585;
-}
-/* line 274, ../../app/stylesheets/application.scss */
-.current-motions li {
- width: 100%;
- overflow: hidden;
- margin: 10px 0;
- padding-top: 10px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- -o-border-radius: 5px;
- -ms-border-radius: 5px;
- -khtml-border-radius: 5px;
- border-radius: 5px;
- border: 1px solid #EFEFEF;
-}
-/* line 282, ../../app/stylesheets/application.scss */
-.current-motions li .date {
- float: left;
- width: 180px;
- font-size: 1.4em;
- line-height: 1.7;
- text-align: right;
- color: #666;
-}
-/* line 291, ../../app/stylesheets/application.scss */
-.current-motions li .summary {
- float: right;
- width: 640px;
- margin-right: 10px;
-}
-/* line 297, ../../app/stylesheets/application.scss */
-.current-motions li .summary p.meta .author {
- color: #80a080;
-}
-/* line 300, ../../app/stylesheets/application.scss */
-.current-motions li .summary p.meta .author strong {
- font-weight: normal;
- font-style: italic;
-}
-/* line 307, ../../app/stylesheets/application.scss */
-.current-motions li .summary p.description {
- font-size: 1.5em;
- color: #666;
-}
-/* line 313, ../../app/stylesheets/application.scss */
-.current-motions li.odd {
- background: #f0fff0 !important;
-}
-/* line 317, ../../app/stylesheets/application.scss */
-.current-motions li.passed {
- background-color: #90EE90 !important;
-}
-/* line 321, ../../app/stylesheets/application.scss */
-.current-motions li.failed {
- background-color: #FAAFBE !important;
-}
-/* line 325, ../../app/stylesheets/application.scss */
-.current-motions li.seconded {
- background-color: #FFC !important;
-}
-/* line 329, ../../app/stylesheets/application.scss */
-.current-motions li a {
- text-decoration: none;
- font-size: 1.2em;
-}
-/* line 333, ../../app/stylesheets/application.scss */
-.current-motions li a.plus {
- float: right;
- height: 18px;
- width: 20px;
- display: block;
- background-image: url("/images/plus.png");
- background-repeat: no-repeat;
- color: #000;
- font-size: 1px;
-}
-/* line 344, ../../app/stylesheets/application.scss */
-.current-motions li a.more_motions {
- display: block;
- width: 640px;
- margin: 0 0 10px 200px;
- padding: 5px 0 3px;
- border: 1px solid #666;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -o-border-radius: 3px;
- -ms-border-radius: 3px;
- -khtml-border-radius: 3px;
- border-radius: 3px;
- text-align: center;
-}
-/* line 356, ../../app/stylesheets/application.scss */
-.current-motions li.no-border {
- border: 0px;
-}
-/* line 360, ../../app/stylesheets/application.scss */
-.current-motions div.empty {
- margin: 10px 0 40px;
- padding-left: 200px;
- font-size: 1.5em;
- font-style: italic;
- color: #333;
-}
-
-/* line 370, ../../app/stylesheets/application.scss */
-#motion h1 {
- color: #407a27;
- font-size: 3em;
-}
-/* line 375, ../../app/stylesheets/application.scss */
-#motion ul {
- float: right;
-}
-
-/* line 380, ../../app/stylesheets/application.scss */
-nav.main ul {
- float: right;
- height: 40px;
-}
-/* line 384, ../../app/stylesheets/application.scss */
-nav.main ul li {
- margin-top: 5px;
- float: left;
-}
-/* line 388, ../../app/stylesheets/application.scss */
-nav.main ul li.first a {
- -moz-border-radius-bottomleft: 6px;
- -webkit-border-bottom-left-radius: 6px;
- -o-border-bottom-left-radius: 6px;
- -ms-border-bottom-left-radius: 6px;
- -khtml-border-bottom-left-radius: 6px;
- border-bottom-left-radius: 6px;
-}
-/* line 392, ../../app/stylesheets/application.scss */
-nav.main ul li a {
- font-size: 1.25em;
- font-family: helvetica, arial, sans-serif;
- color: #4F3806 !important;
- border: 0;
- padding: 5px 10px 6px;
- text-decoration: none;
- -moz-box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.25);
- -webkit-box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.25);
- -o-box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.25);
- box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.25);
- text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.2);
- border-left: 1px solid #CAB585;
- border-bottom: 1px solid #CAB585;
- cursor: pointer;
- background: url("http://jquery.org/wp-content/themes/green/green/shadow.png") bottom left repeat-x;
-}
-/* line 405, ../../app/stylesheets/application.scss */
-nav.main ul li a:hover {
- background-color: rgba(0, 0, 0, 0.1);
-}
-
-/* @end */
-/* @group Flash alerts & Validation Errors */
-/* line 416, ../../app/stylesheets/application.scss */
-#flash_notice {
- margin: 10px 20px;
- clear: both;
- background: #FFFECF;
- border: 2px solid #DCDA00;
- font-size: 14px;
- text-align: center;
- padding: 5px 20px;
- color: #5F5F5F;
-}
-
-/* line 427, ../../app/stylesheets/application.scss */
-#flash_alert {
- margin: 10px 20px;
- clear: both;
- background: #FFEEEE;
- border: 2px solid red;
- font-size: 14px;
- text-align: center;
- padding: 5px 20px;
- color: red;
-}
-
-/* line 438, ../../app/stylesheets/application.scss */
-#error_explanation {
- background: #FBB;
- border: 2px solid red;
- color: #585858;
- padding: 20px;
- font-size: 12px;
- margin: 20px;
-}
-
-/* line 447, ../../app/stylesheets/application.scss */
-#error_explanation ul {
- margin: 0;
-}
-
-/* line 448, ../../app/stylesheets/application.scss */
-#error_explanation h2 {
- font-size: 14px;
-}
-
-/* line 449, ../../app/stylesheets/application.scss */
-#error_explanation h3 {
- font-size: 12px;
-}
-
-/* @end */
12 spec/factories/tags.rb
View
@@ -0,0 +1,12 @@
+FactoryGirl.define do
+ factory :tag do
+ sequence(:name) {|n| "SwagTag-#{n}"}
+ end
+
+ factory :unused_tag, :parent => :tag do
+ end
+
+ factory :used_tag, :parent => :tag do
+ after_create { |tag| Factory.create(:motion, :tags => [tag]) }
+ end
+end
7 spec/models/member_spec.rb
View
@@ -109,11 +109,4 @@
@member.has_seconded?(@motion).should be_true
end
end
-
- describe "#destroy" do
- it "keeps the record around by setting a 'deleted_at' flag" do
- @member.destroy
- Member.only_deleted.first.deleted_at.should be
- end
- end
end
24 spec/models/tag_spec.rb
View
@@ -0,0 +1,24 @@
+require 'spec_helper'
+
+describe Tag do
+
+ context 'Associations' do
+ specify { subject.should respond_to :motions }
+ end
+
+ describe ".motion_counts" do
+ before :all do
+ @unused_tag = Factory.create(:unused_tag)
+ @used_tag = Factory.create(:used_tag)
+ end
+
+ it "lists all tags regardless of number of times they are used" do
+ Tag.motion_counts.should have(2).records
+ end
+
+ it "counts the number of times a tag is used" do
+ Tag.motion_counts.find(@used_tag).count.should == 1
+ Tag.motion_counts.find(@unused_tag).count.should == 0
+ end
+ end
+end
Something went wrong with that request. Please try again.