Permalink
Browse files

Checkboxes now have 'for' and labels

  • Loading branch information...
1 parent 0cb2cab commit 45e03bf2d811c3559ed454311dd56fddbf66680d Steve Kenworthy committed Aug 19, 2010
@@ -21,7 +21,7 @@ module CampaignsHelper
#----------------------------------------------------------------------------
def campaign_status_checbox(status, count)
checked = (session[:filter_by_campaign_status] ? session[:filter_by_campaign_status].split(",").include?(status.to_s) : count.to_i > 0)
- check_box_tag("status[]", status, checked, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"status=" + $$("input[name='status[]']").findAll(function (el) { return el.checked }).pluck("value")/))
+ check_box_tag("status[]", status, checked, :id => status, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"status=" + $$("input[name='status[]']").findAll(function (el) { return el.checked }).pluck("value")/))
end
#----------------------------------------------------------------------------
@@ -67,7 +67,7 @@ def rating_select(name, options = {})
#----------------------------------------------------------------------------
def lead_status_checbox(status, count)
checked = (session[:filter_by_lead_status] ? session[:filter_by_lead_status].split(",").include?(status.to_s) : count.to_i > 0)
- check_box_tag("status[]", status, checked, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"status=" + $$("input[name='status[]']").findAll(function (el) { return el.checked }).pluck("value")/))
+ check_box_tag("status[]", status, checked, :id => status, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"status=" + $$("input[name='status[]']").findAll(function (el) { return el.checked }).pluck("value")/))
end
# Returns default permissions intro for leads
@@ -21,7 +21,7 @@ module OpportunitiesHelper
#----------------------------------------------------------------------------
def opportunity_stage_checbox(stage, count)
checked = (session[:filter_by_opportunity_stage] ? session[:filter_by_opportunity_stage].split(",").include?(stage.to_s) : count.to_i > 0)
- check_box_tag("stage[]", stage, checked, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"stage=" + $$("input[name='stage[]']").findAll(function (el) { return el.checked }).pluck("value")/))
+ check_box_tag("stage[]", stage, checked, :id => stage, :onclick => remote_function(:url => { :action => :filter }, :with => %Q/"stage=" + $$("input[name='stage[]']").findAll(function (el) { return el.checked }).pluck("value")/))
end
end
@@ -63,10 +63,13 @@
.check_box
:line-height 20px
-
+
input
:position relative
:top -3px
+
+ label
+ :font-size 11px
// Main area (page and form).
//------------------------------------------------------------------------------
@@ -4,15 +4,17 @@
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @campaign_status_total[key]
- = campaign_status_checbox(key, @campaign_status_total[key]) << " " << t(key)
+ = campaign_status_checbox(key, @campaign_status_total[key])
+ = label_tag(key, t(key))
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @campaign_status_total[:other]
- = campaign_status_checbox("other", @campaign_status_total[:other]) << " " << t(:other)
+ = campaign_status_checbox("other", @campaign_status_total[:other])
+ = label_tag(:other, t(:other))
.check_box
%div{:style => "float:right;"}
%b= @campaign_status_total[:all]
%b #{t :total_campaigns}
- = hook(:index_campaign_sidebar_bottom, self)
+ = hook(:index_campaign_sidebar_bottom, self)
@@ -4,12 +4,14 @@
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @lead_status_total[key]
- = lead_status_checbox(key, @lead_status_total[key]) << " " << t(key)
+ = lead_status_checbox(key, @lead_status_total[key])
+ = label_tag(key, t(key))
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @lead_status_total[:other]
- = lead_status_checbox("other", @lead_status_total[:other]) << " " << t(:other)
+ = lead_status_checbox("other", @lead_status_total[:other])
+ = label_tag(:other, t(:other))
.check_box
%div{:style => "float:right;"}
@@ -4,12 +4,14 @@
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @opportunity_stage_total[key]
- = opportunity_stage_checbox(key, @opportunity_stage_total[key]) << " " << value
+ = opportunity_stage_checbox(key, @opportunity_stage_total[key])
+ = label_tag(key, value)
.check_box{:style => "border-bottom: 1px silver dotted;"}
%div{:style => "float:right;"}
= @opportunity_stage_total[:other]
- = opportunity_stage_checbox("other", @opportunity_stage_total[:other]) << " " << t(:other)
+ = opportunity_stage_checbox("other", @opportunity_stage_total[:other])
+ = label_tag(:other, t(:other))
.check_box
%div{:style => "float:right;"}
@@ -39,6 +39,8 @@
.check_box input {
position: relative;
top: -3px; }
+ .check_box label {
+ font-size: 11px; }
.tabless {
margin: auto;
@@ -181,6 +181,8 @@ tt {
.check_box input {
position: relative;
top: -3px; }
+ .check_box label {
+ font-size: 11px; }
.tabless {
margin: auto;

0 comments on commit 45e03bf

Please sign in to comment.