1

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?

Andrus
  • 26,339
  • 60
  • 204
  • 378

2 Answers2

2

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

enter image description here

Simple modification of the original demo make the following new demo

enter image description here

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.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thank you very much. If search dialog contains may rows, bottom rows and search buttons are not visible. How to force vertical scrollbar to appear in this case ? In my application borders are not drawn around input and select emements in advanced search dialog. I dont see any border disabling in css file. What may cause this and aow to enable borders? – Andrus Apr 08 '12 at 15:03
  • if many rows are added in search dialog, vertical scrollbar appears automatically. However if advanced search dialog is opened, scrollbar does not appear, bottom rules and buttons are not accessible. – Andrus Apr 08 '12 at 15:27
0

You could use jquery again, for example: $('select the button').attr('title', 'New localized title')

luacassus
  • 6,540
  • 2
  • 40
  • 58