diff --git a/app/views/apps/_fields.html.haml b/app/views/apps/_fields.html.haml
index ded4b18..f8df8be 100644
--- a/app/views/apps/_fields.html.haml
+++ b/app/views/apps/_fields.html.haml
@@ -50,18 +50,26 @@
= f.fields_for :issue_tracker do |w|
%div.issue_tracker.nested
%div.choose
- = w.radio_button :type, "IssueTracker", 'data-section' => 'none'
- = label_tag :type_none, '(None)', :for => label_for_attr(w, 'type_issuetracker')
- = w.radio_button :type, "LighthouseTracker", 'data-section' => 'lighthouse'
- = label_tag :type_lighthouseapp, 'Lighthouse', :for => label_for_attr(w, 'type_lighthousetracker')
- = w.radio_button :type, "RedmineTracker", 'data-section' => 'redmine'
- = label_tag :type_redmine, 'Redmine', :for => label_for_attr(w, 'type_redminetracker')
- = w.radio_button :type, "PivotalTracker", 'data-section' => 'pivotal'
- = label_tag :type_pivotal, 'Pivotal Tracker', :for => label_for_attr(w, 'type_pivotaltracker')
- = w.radio_button :type, "FogbugzTracker", 'data-section' => 'fogbugz'
- = label_tag :type_fogbugz, 'FogBugz', :for => label_for_attr(w, 'type_fogbugztracker')
- = w.radio_button :type, "MingleTracker", 'data-section' => 'mingle'
- = label_tag :type_fogbugz, 'Mingle', :for => label_for_attr(w, 'type_mingletracker')
+ = label_tag :type_none, :for => label_for_attr(w, 'type_issuetracker'), :class => "label_radio none" do
+ = w.radio_button :type, "IssueTracker", 'data-section' => 'none'
+ (None)
+ = label_tag :type_lighthouseapp, :for => label_for_attr(w, 'type_lighthousetracker'), :class => "label_radio lighthouseapp" do
+ = w.radio_button :type, "LighthouseTracker", 'data-section' => 'lighthouse'
+ Lighthouse
+ = label_tag :type_redmine, :for => label_for_attr(w, 'type_redminetracker'), :class => "label_radio redmine" do
+ = w.radio_button :type, "RedmineTracker", 'data-section' => 'redmine'
+ Redmine
+ = label_tag :type_pivotal, :for => label_for_attr(w, 'type_pivotallabstracker'), :class => "label_radio pivotal" do
+ = w.radio_button :type, "PivotalLabsTracker", 'data-section' => 'pivotal'
+ Pivotal Tracker
+ %br
+ = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_fogbugztracker'), :class => "label_radio fogbugz" do
+ = w.radio_button :type, "FogbugzTracker", 'data-section' => 'fogbugz'
+ FogBugz
+ = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_mingletracker'), :class => "label_radio mingle" do
+ = w.radio_button :type, "MingleTracker", 'data-section' => 'mingle'
+ Mingle
+
%div.tracker_params.none{:class => (w.object && !(w.object.class < IssueTracker)) ? 'chosen' : nil}
%p When no issue tracker has been configured, you will be able to leave comments on errors.
%div.tracker_params.lighthouse{:class => w.object.is_a?(LighthouseTracker) ? 'chosen' : nil}
diff --git a/public/images/fogbugz_inactive.png b/public/images/fogbugz_inactive.png
new file mode 100644
index 0000000..0a1d599
Binary files /dev/null and b/public/images/fogbugz_inactive.png differ
diff --git a/public/images/lighthouseapp_inactive.png b/public/images/lighthouseapp_inactive.png
new file mode 100644
index 0000000..d175a05
Binary files /dev/null and b/public/images/lighthouseapp_inactive.png differ
diff --git a/public/images/mingle_inactive.png b/public/images/mingle_inactive.png
new file mode 100644
index 0000000..02f2848
Binary files /dev/null and b/public/images/mingle_inactive.png differ
diff --git a/public/images/none_create.png b/public/images/none_create.png
new file mode 100644
index 0000000..e6e9245
Binary files /dev/null and b/public/images/none_create.png differ
diff --git a/public/images/none_inactive.png b/public/images/none_inactive.png
new file mode 100644
index 0000000..7a0b5dd
Binary files /dev/null and b/public/images/none_inactive.png differ
diff --git a/public/images/pivotal_inactive.png b/public/images/pivotal_inactive.png
new file mode 100644
index 0000000..3ed3da4
Binary files /dev/null and b/public/images/pivotal_inactive.png differ
diff --git a/public/images/redmine_inactive.png b/public/images/redmine_inactive.png
new file mode 100644
index 0000000..fb8367d
Binary files /dev/null and b/public/images/redmine_inactive.png differ
diff --git a/public/javascripts/form.js b/public/javascripts/form.js
index 7287c2b..3c00686 100644
--- a/public/javascripts/form.js
+++ b/public/javascripts/form.js
@@ -7,6 +7,12 @@ $(function(){
if($('div.issue_tracker.nested').length)
activateTypeSelector('issue_tracker', 'tracker_params');
+
+ $('body').addClass('has-js');
+ $('.label_radio').click(function(){
+ activateLabelIcons();
+ });
+ activateLabelIcons();
});
function activateNestedForms() {
@@ -96,3 +102,15 @@ function activateCheckboxHooks() {
});
}
+
+function activateLabelIcons() {
+ if ($('.label_radio input').length) {
+ $('.label_radio').each(function(){
+ $(this).removeClass('r_on');
+ });
+ $('.label_radio input:checked').each(function(){
+ $(this).parent('label').addClass('r_on');
+ });
+ };
+};
+
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index d3fde46..da322e7 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -532,8 +532,44 @@ div.nested .chosen {
display: block !important;
}
div.nested .choose {
- margin-bottom: 0.5em;
+ margin-bottom: 1em;
+}
+div.issue_tracker.nested img {
+ vertical-align: middle;
+}
+
+/* Icons for Issue Tracker Radio Buttons */
+div.issue_tracker.nested label.label_radio {
+ color: #777777;
+ padding-left: 33px;
+ background: url(/images/lighthouseapp_create.png) no-repeat;
+ line-height: 30px;
+ margin-bottom: 6px;
+ margin-right: 8px;
}
+div.issue_tracker.nested .label_radio input {
+ position: absolute; left: -9999px;
+}
+
+div.issue_tracker.nested label.r_on {
+ color: #262626;
+}
+
+
+/* Inactive icons */
+div.issue_tracker.nested label.none { background: url(/images/none_inactive.png) no-repeat; }
+div.issue_tracker.nested label.redmine { background: url(/images/redmine_inactive.png) no-repeat; }
+div.issue_tracker.nested label.lighthouseapp { background: url(/images/lighthouseapp_inactive.png) no-repeat; }
+div.issue_tracker.nested label.mingle { background: url(/images/mingle_inactive.png) no-repeat; }
+div.issue_tracker.nested label.fogbugz { background: url(/images/fogbugz_inactive.png) no-repeat; }
+div.issue_tracker.nested label.pivotal { background: url(/images/pivotal_inactive.png) no-repeat; }
+/* Active icons */
+div.issue_tracker.nested label.r_on.none { background: url(/images/none_create.png) no-repeat; }
+div.issue_tracker.nested label.r_on.redmine { background: url(/images/redmine_create.png) no-repeat; }
+div.issue_tracker.nested label.r_on.lighthouseapp { background: url(/images/lighthouseapp_create.png) no-repeat; }
+div.issue_tracker.nested label.r_on.mingle { background: url(/images/mingle_create.png) no-repeat; }
+div.issue_tracker.nested label.r_on.fogbugz { background: url(/images/fogbugz_create.png) no-repeat; }
+div.issue_tracker.nested label.r_on.pivotal { background: url(/images/pivotal_create.png) no-repeat; }
/* Apps Table */
--
libgit2 0.21.2