2016-01-22 223 views
1

我在我的rails应用程序中使用footable。我实现了页面的排序和分页。排序和分页工作正常。但可排序的图形图标不显示在表头上。无法显示footable-sort-indicator

我已经包括

在样式表

footable.core.css 
fonts 
    footable.eot 
    footable.svg 
    footable.woff 
    footable.ttf 

在JavaScript的目录

footable.all.min.js 

但我没有得到那些icons.Is有什么我missing.Help我。

+0

你能创建一个简单的小提琴来演示这个问题吗? –

+0

好吧试试看,并显示 – vjnan369

+0

这里是[链接](https://jsfiddle.net/0fu1n2m6/1/#run&togetherjs=p7PvIguqMf)。并且我无法添加一些外部文件。 – vjnan369

回答

0

在那里,我有同样的问题。我只是使用预定义的图标而不是脚踏标记,它工作。

在footable.core.css修改如下:

@font-face { 
    font-family: 'Glyphicons Halflings'; 
src: url('~/fonts/glyphicons-halflings-regular.eot'); 
    src: url('~/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), 
     url('~/fonts/glyphicons-halflings-regular.woff') format('woff'), 
     url('~/fonts/glyphicons-halflings-regular.ttf') format('truetype'), 
     url('~/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); font-weight: normal; 
    font-style: normal; 
} 
@media screen and (-webkit-min-device-pixel-ratio: 0) { 
    @font-face { 
    font-family: 'Glyphicons Halflings'; 
    src: url('~/fonts/glyphicons-halflings-regular.svg#footable') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
    } 
} 
.footable.breakpoint > tbody > tr > td > span.footable-toggle { 
    display: inline-block; 
    font-family: 'Glyphicons Halflings'; 
    speak: none; 
    font-style: normal; 
    font-weight: normal; 
    font-variant: normal; 
    text-transform: none; 
    -webkit-font-smoothing: antialiased; 
    padding-right: 10px; 
    text-align:center; 
    font-size: 14px; 
    color: #888888; 
} 
.footable > thead > tr > th > span.footable-sort-indicator { 
    display: inline-block; 
    font-family: 'Glyphicons Halflings'; 
    speak: none; 
    font-style: normal; 
    font-weight: normal; 
    font-variant: normal; 
    text-transform: none; 
    -webkit-font-smoothing: antialiased; 
    padding-left: 5px; 
} 

瞧!它应该工作。在上面的代码中,我只显示了已被修改的片段。对于图形只是搜索“bootstrap glyphicons十六进制”,并会找到你想使用的任何图标的代码。