0
jQuery Bootgridを使用し、「デフォルト」ステータスマッピング(成功、情報、警告、エラー)を使用しますが、カスタマイズした瞬間はありません。この質問の解決策は私のケースでは機能しません:Jquery Bootgrid table row color based on conditionカスタム行の色Jquery Bootgrid
以下は私のスクリプトの初期化です。次のように
$(document).ready(function(){
$("#client_list").bootgrid({
css: {
icon: "zmdi icon",
iconColumns: "zmdi-view-module",
iconDown: "zmdi-sort-amount-desc",
iconRefresh: "zmdi-refresh",
iconUp: "zmdi-sort-amount-asc"
},
ajax: true,
post: function(){
return { id: "b0df282a-c9e93b7befee" };
},
url: "get_logview/client/client",
caseSensitive: false,
selection: false,
multiSelect: true,
rowSelect: true,
searchSettings: {
delay: 100,
characters: 3
},
keepSelection: true,
statusMappings: {
4: "loglow",
5: "logmediumlow",
6: "logmedium",
7: "logmediumhigh",
8: "loghigh",
9: "logcritical",
10: "logcatastrophic"
}
});
});
私のデータは、ステータスの正しい値を含んでいます:
{
"current": 1,
"rowCount": "10",
"rows": [
{
"id": "1",
"type": "Notice",
"message": "User 127.0.0.1 (User ID: 1) accessed the logs.",
"impact": "Low",
"user": "127.0.0.1 (User ID: 1)",
"createdate": "2016-07-20 19:39:03",
"status": 4
},
{
"id": "2",
"type": "Notice",
"message": "User 127.0.0.1 (User ID: 1) accessed the logs.",
"impact": "Low",
"user": "127.0.0.1 (User ID: 1)",
"createdate": "2016-07-20 19:39:03",
"status": 4
}
],
"total": "2"
}
誰かが私が間違っているの何助言していただけますか?コンソールエラーはなく、ブートグリッドテーブルは表示されますが、カスタムカラーは実行されません。