Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 自定义rails4删除弹出框_Ruby On Rails_Ruby On Rails 4.1 - Fatal编程技术网

Ruby on rails 自定义rails4删除弹出框

Ruby on rails 自定义rails4删除弹出框,ruby-on-rails,ruby-on-rails-4.1,Ruby On Rails,Ruby On Rails 4.1,请指导我如何定制我的删除弹出框的轨道,我想给我自己的设计。我认为: <td class="text-center"> <%= link_to delete, user_path(user.id), method: :delete, :remote => true, data: { confirm: 'Are you sure?', no_turbolink: true } %> </td> true,数据:{确认:'你确定吗?',否_turbo

请指导我如何定制我的删除弹出框的轨道,我想给我自己的设计。我认为:

<td class="text-center">
   <%= link_to delete, user_path(user.id), method: :delete, :remote => true, data: { confirm: 'Are you sure?', no_turbolink: true } %>
</td>

true,数据:{确认:'你确定吗?',否_turbolink:true}%>
我的弹出html代码是

<div class="container">
  <div class="grid">
          <p  class="margin_B0"><a href="#"class="place-right" ><img src="images/close_icon.png" width="13" height="13"></a></p>
          <div class="row margin_T5 margin_B0 bg-white">
            <div class="row">
              <p>Text goes here</p>
            </div>
            <div class="row text-center">
              <input type="button" value="CANCEL" class="button meduim text_upper buttons_orange">
              <input type="submit" value="SUBMIT" class="button meduim text_upper buttons_orange">
            </div>
          </div>
  </div>
</div>

这里有文字

请帮助我在哪里写我自己的弹出框视图

提前感谢。

true,数据:{popup:true,no_turbolink:true}%>
<%= link_to delete, user_path(user.id), method: :delete, :remote => true, data: { popup: true, no_turbolink: true } %>

$('a[data-popup]').on('click', function(e) { 
    var myWindow = window.open("", "myWindow", "width=200, height=100");   // Opens a new window; 
    myWindow.document.write("<p>This is 'myWindow'</p>");   // Text in the new window

    e.preventDefault(); 
});
$('a[data popup]')。在('click',函数(e){ var myWindow=window.open(“,“myWindow”,“width=200,height=100”);//打开一个新窗口; myWindow.document.write(“这是‘myWindow’

”);//新窗口中的文本 e、 预防默认值(); });

尝试类似这样的操作

我将给出我的自定义视图代码。实际上我没有得到这些代码。使用“window.open”创建弹出窗口,并使用“document.write”在弹出窗口中添加内容。它总是给出内容。你确定吗?只是什么都没有改变它不工作:(我的问题也和上面一样,但唯一的改变是我必须在弹出框中给出关闭图标,即
close_icon.png
。我希望我必须在
数据中传递一些东西:{确认:'你确定吗?',no_turbolink:true}
。但我不知道如何做到这一点。