Closed cmendla closed 7 years ago
I resolved this by updating the jquery links in application.html.erb to
I was using outdated versions of jquery,
My current Versions : Using on_the_spot 1.0.5 Using jquery-turbolinks 2.1.0 Using jquery-ui-rails 6.0.1 Using rails 4.2.7.1
I changed the jquery links in my application.html.erb to include
<% javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" %>
<% javascript_include_tag "http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"
integrity="sha256-xNjb53/rY+WmG+4L6tTl9m6PpqknWZvRt0rO1SRnJzw="
crossorigin="anonymous"%>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<%= stylesheet_link_tag :on_the_spot %>
I'm not sure if the jquery links are optimal or not but it appears that everything Jquery related in the app is working OK.
First of all, is BIP compatible with Rails 4?
I have a post on Stackoverflow at http://stackoverflow.com/questions/41768631/best-in-place-editing-not-working-with-rails-4-can-see-field-but-cant-edit that has not received a response.
The short take is that I can see the BIP field but I can't edit anything.
From my stack overflow post ...................
I am trying to implement Best in Place inline editing in a rails 4.0 app. The best in place field shows up but I can't get the editing to work.
I set up the field in the form with the 'traditional' display next to the Best in Place field.
It looks like the following. I can see what looks like an input field. It looks the same as the 'traditional' field. When you click it, you get the blueish box. However, I cannot edit it.
enter image description here
My rails setup is
The gemfile is
Application.js is
My controller
I use the visual event extension for chrome. It does not show any javascript/jquery attached to that field.
In inspect I see the following which seems to indicate that Best in place is interacting at some level.
<span data-bip-type="input" data-bip-attribute="sales_order" data-bip-object="bedsheet_line" data-bip-ok-button="true" data-bip-original-content="123" data-bip-url="/bedsheet_lines/3081" data-bip-value="123" class="best_in_place" id="best_in_place_bedsheet_line_3081_sales_order" tabindex="1">123</span>
I can't tell from the documentation if Best In Place is compatible with the ruby/rails versions I'm using . If it is, can anyone tell me where I might be going wrong?--------------------- Edit
Here is the development log lines that show up after I click the Best in place field.
Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.0ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.0ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.0ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/console.js.erb within layouts/javascript (846.1ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/main.js.erb within layouts/javascript (1.0ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.0ms) Rendered C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/web-console-2.3.0/lib/web_console/templates/index.html.erb (1854.2ms)
--------------------------------- end of my stackoverflow post ----------------------
In addition, I checked with Visual event (a chrome extension to look at JS on a page) and saw