【问题标题】:footable pagination not working properly using slim使用 slim 时,footable 分页无法正常工作
【发布时间】:2016-05-08 01:02:24
【问题描述】:

我使用footable作为索引页面,我使用的是html的slim intead,但是当我点击footable中的排序图标时,分页数突然增加。

wrapper.wrapper-content.animated.fadeInRight
  .row
    .col-lg-12
      .ibox.float-e-margins
        .ibox-title
         h5 List of Organizations
        .ibox-content  
          table class="footable table table-stripped" data-page-size="10" 
           thead
            tr
             th Organization
             th Type
           tbody
            - @organizations.each do |f|
             tr
              td= f.name
              td= f.type   
           tfoot
            tr
             td colspan="2"
              ul class="pagination pull-right"
javascript:
$(function() {
$('.footable').footable();
});

在点击排序图标之前 点击排序图标后

我做错了什么吗,请提前告诉我谢谢。

【问题讨论】:

    标签: ruby-on-rails pagination jquery-ui-sortable slim-lang footable


    【解决方案1】:
    wrapper.wrapper-content.animated.fadeInRight
      .row
        .col-lg-12
          .ibox.float-e-margins
            .ibox-title
             h5 List of Organizations
            .ibox-content  
              table class="footable table table-stripped" data-page-size="10" 
               thead
                tr
                 th Organization
                 th Type
               tbody
                - @organizations.each do |f|
                 tr
                  td= f.name
                  td= f.type   
               tfoot
                tr
                 td colspan="2"
                  ul class="pagination pull-right"
    javascript:
      $(function() {
      $('.footable').footable();
      });
    

    【讨论】:

      【解决方案2】:

      您应该为这些行添加意图

      javascript:
        $(function() {
        $('.footable').footable();
        });
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-12-14
        • 2014-09-21
        • 2013-08-22
        • 2012-09-25
        • 2016-07-29
        • 2017-11-27
        相关资源
        最近更新 更多