Skip to content

Commit

Permalink
rename name-one to name-one-jquery-ui and alias that to name-one to a…
Browse files Browse the repository at this point in the history
…llow easy overrides by plugins like hobo_Bootstrap_ui
  • Loading branch information
bryanlarsen committed Nov 16, 2012
1 parent 070f37e commit f74bafd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hobo_jquery_ui/taglibs/name_one.dryml
Expand Up @@ -56,7 +56,7 @@ All other attributes are passed through to the `<autocomplete>` that provides th
- `nil-value`: If there is no current value, this text will appear greyed out inside the control, and will disappear on focus.

-->
<def tag="name-one" attrs="complete-target, completer, min-chars">
<def tag="name-one-jquery-ui" attrs="complete-target, completer, min-chars">
<%
complete_target ||= this_field_reflection.klass
completer ||= (complete_target.is_a?(Class) ? complete_target : complete_target.class).name_attribute
Expand Down
6 changes: 6 additions & 0 deletions hobo_jquery_ui/taglibs/overrides.dryml
Expand Up @@ -14,3 +14,9 @@
<def tag="input" for="Date">
<datepicker dateFormat="yy-mm-dd" merge />
</def>


<!-- alias `<name-one>` to `<name-one-jquery-ui>` -->
<def tag="name-one">
<name-one-jquery-ui merge/>
</def>
Expand Up @@ -178,7 +178,8 @@ class CreateAccountTest < ActionDispatch::IntegrationTest

# add project members
fill_in "project_membership[user]", :with => "Second User"
find("input.ui-autocomplete-input").native.send_key(:enter)
click_link "Second User"
find("form.project-membership input[type=text]").native.send_key(:enter)
assert find("ul.memberships").has_text?("Second User")

find("input.delete-project-membership-button").click
Expand Down

0 comments on commit f74bafd

Please sign in to comment.