如何在jqgrid高级搜索对话框中本地化按钮工具提示 [英] how to localize button tooltips in jqgrid advanced search dialog
本文介绍了如何在jqgrid高级搜索对话框中本地化按钮工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
似乎工具提示添加子组
,添加规则
,删除规则
在jqgrid代码中进行了硬编码。
inputAddSubgroup = $(< input type ='button'value = '+ {}'title ='添加子组'class ='add-group'/>);
如何本地化它们?
解决方案
我发布了trirand我的详细信息
I使用以下代码
$。 extend($。jgrid.search,{
multipleSearch:true,
multipleGroup:true,
recreateFilter:true,
closeOnEscape:true,
closeAfterSearch:true,
overlay:0,
afterRedraw:function(){
$('input.add-rule',this).button()。val('添加新规则')
.attr('title','我的添加新规则工具提示');
$('input.add-group',this).button()。val('添加新组或规则')
.attr('title','我的新组或规则工具提示' );
$('input.delete-rule',this).button()。val('删除规则')
.attr('title','我的删除规则工具提示');
$('input.delete-group',this).button()。val('Delete group')
.attr('title','我的删除组工具提示');
$(this).find(table.group:not(:first))。css({
borderWidth:1px,
borderStyle:dashed
});
}
});
我在群组中添加了额外的边框,因为我觉得有帮助。
It seems like tooltips Add subgroup
, Add rule
, Delete rule
are hard coded in jqgrid code.
inputAddSubgroup = $("<input type='button' value='+ {}' title='Add subgroup' class='add-group'/>");
How to localize them?
解决方案
I posted to trirand my detailed suggestion and reminded Tony twice about the problem later.
Additionally I described in the answer a workaround which allows to customize the Advanced searching dialog
Simple modification of the original demo make the following new demo
I used the following code
$.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"
});
}
});
I added additional border in groups because I find there helpful.
这篇关于如何在jqgrid高级搜索对话框中本地化按钮工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文