|
13 | 13 | * var options = { |
14 | 14 | * enableCellNavigation: true, |
15 | 15 | * gridMenu: { |
16 | | - * customTitle: "Custom Menus", |
17 | | - * columnTitle: "Columns", |
18 | | - * iconImage: "../images/drag-handle.png", // this is the Grid Menu icon (hamburger icon) |
19 | | - * iconCssClass: "fa fa-bars", // you can provide iconImage OR iconCssClass |
20 | | - * leaveOpen: false, // do we want to leave the Grid Menu open after a command execution? (false by default) |
21 | | - * menuWidth: 18, // width that will be use to resize the column header container (18 by default) |
22 | | - * resizeOnShowHeaderRow: true, // true by default |
| 16 | + * customTitle: "Custom Menus", // default to empty string |
| 17 | + * columnTitle: "Columns", // default to empty string |
| 18 | + * iconImage: "../images/drag-handle.png", // this is the Grid Menu icon (hamburger icon) |
| 19 | + * iconCssClass: "fa fa-bars", // you can provide iconImage OR iconCssClass |
| 20 | + * leaveOpen: false, // do we want to leave the Grid Menu open after a command execution? (false by default) |
| 21 | + * menuWidth: 18, // width that will be use to resize the column header container (18 by default) |
| 22 | + * resizeOnShowHeaderRow: true, // true by default |
| 23 | + * |
| 24 | + * // the last 2 checkboxes titles |
| 25 | + * forceFitTitle: "Force fit columns", // default to "Force fit columns" |
| 26 | + * syncResizeTitle: "Synchronous resize", // default to "Synchronous resize" |
| 27 | + * |
23 | 28 | * customItems: [ |
24 | 29 | * { |
25 | 30 | * // custom menu item options |
|
95 | 100 | var columnCheckboxes; |
96 | 101 | var _defaults = { |
97 | 102 | fadeSpeed: 250, |
| 103 | + forceFitTitle: "Force fit columns", |
98 | 104 | menuWidth: 18, |
99 | | - resizeOnShowHeaderRow: false |
| 105 | + resizeOnShowHeaderRow: false, |
| 106 | + syncResizeTitle: "Synchronous resize" |
100 | 107 | }; |
101 | 108 |
|
102 | 109 | function init(grid) { |
|
241 | 248 | .appendTo($li); |
242 | 249 | } |
243 | 250 |
|
| 251 | + var forceFitTitle = (_options.gridMenu && _options.gridMenu.forceFitTitle) || _defaults.forceFitTitle; |
244 | 252 | $("<hr/>").appendTo($list); |
245 | 253 | $li = $("<li />").appendTo($list); |
246 | 254 | $input = $("<input type='checkbox' />").data("option", "autoresize"); |
247 | 255 | $("<label />") |
248 | | - .text("Force fit columns") |
| 256 | + .text(forceFitTitle) |
249 | 257 | .prepend($input) |
250 | 258 | .appendTo($li); |
251 | 259 | if (_grid.getOptions().forceFitColumns) { |
252 | 260 | $input.attr("checked", "checked"); |
253 | 261 | } |
254 | 262 |
|
| 263 | + var syncResizeTitle = (_options.gridMenu && _options.gridMenu.syncResizeTitle) || _defaults.syncResizeTitle; |
255 | 264 | $li = $("<li />").appendTo($list); |
256 | 265 | $input = $("<input type='checkbox' />").data("option", "syncresize"); |
257 | 266 | $("<label />") |
258 | | - .text("Synchronous resize") |
| 267 | + .text(syncResizeTitle) |
259 | 268 | .prepend($input) |
260 | 269 | .appendTo($li); |
261 | 270 | if (_grid.getOptions().syncColumnCellResize) { |
|
0 commit comments