2012-04-08 70 views

回答

2

我貼到我的trirand詳細suggestion並提醒託尼兩次關於這個問題以後。

此外,我在the answer描述的解決方法,它允許自定義高級搜索對話框

enter image description here

原演示的簡單的修改進行以下new demo

enter image description here

我用以下代碼

$.extend($.jgrid.search, { 
    multipleSearch: true, 
    multipleGroup: true, 
    recreateFilter: true, 
    closeOnEscape: true, 
    closeAfterSearch: true, 
    overlay: 0, 
    afterRedraw: function() { 
     $('input.add-rule',this).button().val('Add new rule') 
      .attr('title', 'My Add new rule tooltip'); 
     $('input.add-group',this).button().val('Add new group or rules') 
      .attr('title', 'My new group or rules tooltip'); 
     $('input.delete-rule',this).button().val('Delete rule') 
      .attr('title', 'My Delete rule tooltip'); 
     $('input.delete-group',this).button().val('Delete group') 
      .attr('title', 'My Delete group tooltip'); 
     $(this).find("table.group:not(:first)").css({ 
      borderWidth: "1px", 
      borderStyle: "dashed" 
     }); 
    } 
}); 

我在組中添加了額外的邊框,因爲我發現有幫助。

+0

非常感謝。如果搜索對話框包含可能的行,則底行和搜索按鈕不可見。如何強制垂直滾動條出現在這種情況下?在我的應用程序邊框中,沒有在高級搜索對話框中輸入和選擇註釋。我沒有看到在CSS文件中禁用任何邊框。什麼可能會導致這種情況,並允許啓用邊界? – Andrus 2012-04-08 15:03:57

+0

如果在搜索對話框中添加了很多行,垂直滾動條會自動出現。但是,如果高級搜索對話框打開,滾動條不會出現,底部規則和按鈕不可訪問。 – Andrus 2012-04-08 15:27:02

0

你可以jQuery的再次使用,例如:$('select the button').attr('title', 'New localized title')

相關問題