fix for close

This commit is contained in:
Adrian Hinz 2018-04-23 15:23:27 +02:00
parent d5285b82ff
commit f19aaf208c
2 changed files with 5 additions and 4 deletions

View File

@ -12,3 +12,7 @@
// //
//= require rails-ujs //= require rails-ujs
// require turbolinks // require turbolinks
function closeDiv(div_id) {
$(div_id).html("");
};

View File

@ -58,10 +58,7 @@
<%= javascript_include_tag 'bootstrap-editable' %> <%= javascript_include_tag 'bootstrap-editable' %>
<script> <script>
$.fn.editable.defaults.mode = 'popup'; $.fn.editable.defaults.mode = 'popup';
$(document).ready(function () { $(document).ready(function () {
function closeDiv(div_id) {
$(div_id).html("");
}
$('.xedit').editable({ $('.xedit').editable({
success: function (response, newValue) { success: function (response, newValue) {
if (!response.success) if (!response.success)