var $wowidgetselector = function (id) { this.containerId = id; this.title = GetTextByKey("P_WO_WIDGETS", 'Widgets'); this.companyId = null;; this.forceSingle = false; this.exceptShareAsset = false; this.onOK = null; this.onDialogClosed = null; this.includechild = true; this.allowhidden = true; this.uid = null; }; (function () { var __proto = $wowidgetselector.prototype; function initWidgetsGrid(parent) { var grid = createGridView(parent); var styleFilter = function (item) { if (item.Suggested) { return { //'background-color': 'yellow', 'display': 'block', 'margin': 0, 'box-sizing': 'border-box', 'padding': '0 4px', 'height': '27px', 'line-height': '27px', 'overflow': 'hidden', 'text-overflow': 'ellipsis' }; } }; var bgFilter = function (item) { if (item.Suggested) return 'yellow'; }; grid.columns = [ { // checkbox name: 'check', key: 'Visible', width: 45, align: 'center', sortable: false, allcheck: true, type: 3 }, { key: 'WidgetName', caption: 'Name', width: 290, styleFilter: styleFilter, bgFilter: bgFilter }, { key: 'InBottom', caption: 'Bottom', //captionTooltip: 'Multiple widgets may be placed on the bottom', type: 3, width: 80, enabled: 'Visible', onChanged: function (item) { item.InRight = !item.InBottom; grid.refresh(); } }, { key: 'InRight', caption: 'Right', //captionTooltip: 'Only one widget may be placed on the right', type: 3, width: 70, enabled: 'Visible', onChanged: function (item) { item.InBottom = !item.InRight; grid.refresh(); } } ]; grid.init(); this.gridWidgets = grid; } function createDialog() { var dialog = $('