mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
unnecessary hack
This commit is contained in:
parent
706f8b59af
commit
8fa7364e5b
@ -12,10 +12,3 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%= content_for :javascript do %>
|
||||
$('.slider').slider({
|
||||
height: 200,
|
||||
indicators: false
|
||||
});
|
||||
<% end %>
|
||||
|
||||
@ -49,19 +49,14 @@
|
||||
<% if defined?(autocomplete) && autocomplete %>
|
||||
<%= content_for :javascript do %>
|
||||
$(function() {
|
||||
// This setTimeout is an unfortunate hack to ensure this runs after initializing materialize
|
||||
setTimeout(function() {
|
||||
//console.log("Initializing autocomplete for #<%= "#{content_name}_#{field[:label]}" %>");
|
||||
|
||||
$('.js-autocomplete-<%= field[:id].to_s %>').autocomplete({
|
||||
limit: 5,
|
||||
data: {
|
||||
<% autocomplete.each do |autocomplete_option| %>
|
||||
"<%= autocomplete_option %>": null,
|
||||
<% end %>
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
$('.js-autocomplete-<%= field[:id].to_s %>').autocomplete({
|
||||
limit: 5,
|
||||
data: {
|
||||
<% autocomplete.each do |autocomplete_option| %>
|
||||
"<%= autocomplete_option %>": null,
|
||||
<% end %>
|
||||
}
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user