button_to_function is deprecated
This commit is contained in:
parent
0663ea0fed
commit
d9bd724c1d
|
@ -642,6 +642,10 @@ div#story_preview {
|
|||
div#story_box input#story_url {
|
||||
width: 508px;
|
||||
}
|
||||
div#story_box button#story_fetch_title {
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
div#story_box input#story_title,
|
||||
div#story_box input#story_moderation_reason {
|
||||
width: 600px;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<% elsif !f.object.id %>
|
||||
<%= f.label :url, "URL:", :class => "required" %>
|
||||
<%= f.text_field :url, :autocomplete => "off" %>
|
||||
<%= button_to_function "Fetch Title",
|
||||
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
||||
<%= button_tag "Fetch Title", :id => "story_fetch_title",
|
||||
:type => "button" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -40,3 +40,12 @@
|
|||
:autocomplete => "off" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#story_fetch_title").click(function() {
|
||||
Lobsters.fetchURLTitle($(this), $("#story_url"), $("#story_title"));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue