2016-01-22 222 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十六進制」,並會找到你想使用的任何圖標的代碼。