adds title attributes to project drop down

pull/41/head
jwollert 13 years ago
parent d65287a35d
commit ee5a9fd0a6
  1. 2
      app/helpers/application_helper.rb
  2. 3
      public/javascripts/chosen.js

@ -240,7 +240,7 @@ module ApplicationHelper
s = ''
project_tree(projects) do |project, level|
name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '')
tag_options = {:value => project.id}
tag_options = {:value => project.id, :title => h(project)}
if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project))
tag_options[:selected] = 'selected'
else

@ -285,7 +285,7 @@
if (option.group_array_index != null) {
classes.push("group-option");
}
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '">' + $('<div/>').html(option.html).text() + '</li>';
return '<li id="' + option.dom_id + '" class="' + classes.join(' ') + '" title="' + option.title + '">' + $('<div/>').html(option.html).text() + '</li>';
} else {
return "";
}
@ -801,6 +801,7 @@
options_index: this.options_index,
value: option.value,
text: option.text,
title: option.title,
html: option.innerHTML,
selected: option.selected,
disabled: group_disabled === true ? group_disabled : option.disabled,

Loading…
Cancel
Save