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 {
|
div#story_box input#story_url {
|
||||||
width: 508px;
|
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_title,
|
||||||
div#story_box input#story_moderation_reason {
|
div#story_box input#story_moderation_reason {
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
<% elsif !f.object.id %>
|
<% elsif !f.object.id %>
|
||||||
<%= f.label :url, "URL:", :class => "required" %>
|
<%= f.label :url, "URL:", :class => "required" %>
|
||||||
<%= f.text_field :url, :autocomplete => "off" %>
|
<%= f.text_field :url, :autocomplete => "off" %>
|
||||||
<%= button_to_function "Fetch Title",
|
<%= button_tag "Fetch Title", :id => "story_fetch_title",
|
||||||
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
:type => "button" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -40,3 +40,12 @@
|
||||||
:autocomplete => "off" %>
|
:autocomplete => "off" %>
|
||||||
</div>
|
</div>
|
||||||
</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