【问题标题】:web2py sqlform grid row buttonsweb2py sqlform 网格行按钮
【发布时间】:2014-07-21 12:15:00
【问题描述】:

我在自定义 SQLForm.grid 行按钮时遇到问题。现在我只能看到用于查看、编辑和删除的文本。如何包含图标或引导 3 图标?

有什么想法吗?

谢谢

【问题讨论】:

    标签: twitter-bootstrap view grid web2py


    【解决方案1】:

    网格采用ui 参数,默认为“web2py”,它添加了 Bootstrap 2(以及最新版本的 Bootstrap 3)图标和类。如果使用 Jquery UI,您还可以设置 ui='jquery-ui'。否则,ui 参数可以是为各种元素指定类的字典——当前版本中的默认字典是:

    ui = dict(widget='',
              header='',
              content='',
              default='',
              cornerall='',
              cornertop='',
              cornerbottom='',
              button='button btn btn-default',
              buttontext='buttontext button',
              buttonadd='icon plus icon-plus glyphicon glyphicon-plus',
              buttonback='icon leftarrow icon-arrow-left glyphicon glyphicon-arrow-left',
              buttonexport='icon downarrow icon-download glyphicon glyphicon-download',
              buttondelete='icon trash icon-trash glyphicon glyphicon-trash',
              buttonedit='icon pen icon-pencil glyphicon glyphicon-arrow-pencil',
              buttontable='icon rightarrow icon-arrow-right glyphicon glyphicon-arrow-right',
              buttonview='icon magnifier icon-zoom-in glyphicon glyphicon-arrow-zoom-in',
              )
    

    如果使用 Bootstrap 3,请升级到最新版本的 web2py,或者如上所述指定自定义字典。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多