【问题标题】:ruby on rails + best_in_place + datatables + hamlruby on rails + best_in_place + 数据表 + haml
【发布时间】:2013-09-07 00:32:18
【问题描述】:

DataTables 编辑示例(使用 best_in_place)

这个例子展示了如何使用 datatables.net 和 best_in_place 创建可编辑的表格。

目前 Datatables.net 只有 JediTables jQuery 插件的使用示例。

【问题讨论】:

    标签: ruby-on-rails haml jquery-datatables best-in-place


    【解决方案1】:

    宝石文件:

    gem "best_in_place"
    

    app/assets/javascripts/application.js:

    //= require jquery
    //= require jquery-ui
    //= require jquery.purr
    //= require best_in_place
    

    app/views/schedules/index.html.haml:

    %table
      - @schedules.each do |s|
        %tr
          %td= best_in_place s, :name
    :javascript
    $(document).ready(function() {
      /* Activating Best In Place */
      jQuery(".best_in_place").best_in_place();
    });
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多