Skip to content

Commit

Permalink
fix: the grid can not align cells when checkboxSelection is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Jul 1, 2019
1 parent 679e255 commit 321aef0
Show file tree
Hide file tree
Showing 10 changed files with 835 additions and 462 deletions.
21 changes: 10 additions & 11 deletions BBjGridExWidgetColumns.bbj
Expand Up @@ -332,13 +332,13 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum
field public BBjString DefaultTimestampsMask! = "%Dz.%Mz.%Yl %Hz:%mz:%sz"
rem /**
rem * Icons to use inside the column instead of the grid's default icons.
rem *
rem * The icons can either be set on the grid options (all icons) or on the column definition (all except group).
rem * If defined in both the grid options and column definitions, the column definition will get used.
rem * This allows you to specify defaults in the grid options to fall back on, and then provide individual icons for
rem * specific columns. This is handy if, for example, you want to include 'A..Z' as string sort icons
rem *
rem * The icons can either be set on the grid options (all icons) or on the column definition (all except group).
rem * If defined in both the grid options and column definitions, the column definition will get used.
rem * This allows you to specify defaults in the grid options to fall back on, and then provide individual icons for
rem * specific columns. This is handy if, for example, you want to include 'A..Z' as string sort icons
rem * and just the simple arrow for other columns.
rem *
rem *
rem * The icons are set as follows:
rem * <pre>
rem * <code>
Expand Down Expand Up @@ -525,16 +525,15 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum
rem * @RequiresRefresh
rem */
method public void setAlignment(BBjNumber align!)
styleMap! = #getCellStyle()
switch align!
case BBjGridExWidget.GRID_ALIGN_LEFT()
styleMap!.addProperty("text-align" , "left")
#getCellClass().add("gw-alignment-left")
break
case BBjGridExWidget.GRID_ALIGN_CENTER()
styleMap!.addProperty("text-align" , "center")
#getCellClass().add("gw-alignment-center")
break
case BBjGridExWidget.GRID_ALIGN_RIGHT()
styleMap!.addProperty("text-align" , "right")
#getCellClass().add("gw-alignment-right")
break
swend
methodend
Expand Down Expand Up @@ -578,7 +577,7 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum

parser! = new JsonParser()
#setIcons(parser!.parse(json!).getAsJsonObject())
methodend
methodend
rem /**
rem * Set the column type
rem *
Expand Down
392 changes: 142 additions & 250 deletions client/dist/bbj-grid-widget.js

Large diffs are not rendered by default.

392 changes: 198 additions & 194 deletions client/dist/bbj-grid-widget.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/report.html

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion client/package.json
Expand Up @@ -9,6 +9,10 @@
"watch": "./node_modules/.bin/webpack --watch --progress",
"build": "./node_modules/.bin/webpack --mode=production"
},
"browserslist": [
"last 2 version",
"> 1%"
],
"devDependencies": {
"@babel/core": "^7.0.0-beta.40",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.40",
Expand All @@ -24,7 +28,9 @@
"uglifyjs-webpack-plugin": "^1.1.8",
"webpack": "^4.12.2",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-command": "^0.3.1"
"webpack-command": "^0.3.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.6.0"
},
"dependencies": {
"ag-grid-community": "^21.*",
Expand Down
5 changes: 5 additions & 0 deletions client/postcss.config.js
@@ -0,0 +1,5 @@
module.exports = {
plugins: [
require('autoprefixer')
]
}
2 changes: 2 additions & 0 deletions client/src/index.js
Expand Up @@ -18,5 +18,7 @@ require('ag-grid-community/dist/styles/ag-theme-material.css');
require('ag-grid-community/dist/styles/ag-theme-balham.css');
require('ag-grid-community/dist/styles/ag-theme-balham-dark.css');

require('./style/classes.css');

export * from './pollyfills.js';
export * from "./api";
25 changes: 25 additions & 0 deletions client/src/style/classes.css
@@ -0,0 +1,25 @@
/*
* This file is part of the BBjGridExWidget plugin.
* (c) Basis Europe <eu@basis.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

.gw-alignment-right,
.gw-alignment-right .ag-cell-wrapper {
text-align: right !important;
justify-content: flex-end !important;
}

.gw-alignment-left,
.gw-alignment-left .ag-cell-wrapper {
text-align: left !important;
justify-content: flex-start !important;
}

.gw-alignment-center,
.gw-alignment-center .ag-cell-wrapper {
text-align: center !important;
justify-content: center !important;
}
5 changes: 3 additions & 2 deletions client/webpack.config.js
Expand Up @@ -31,7 +31,7 @@ module.exports = {
},
resolve: {
alias: {
api: path.resolve(__dirname, './src/api'),
api: path.resolve(__dirname, './src/api'),
events: path.resolve(__dirname, 'src/events/')
}
},
Expand All @@ -57,7 +57,8 @@ module.exports = {
insertInto: function () { return window.top.document.head }
}
},
{ loader: "css-loader", options: { minimize: true } }
{ loader: "postcss-loader" },
{ loader: "postcss-loader" }
]
}
]
Expand Down

0 comments on commit 321aef0

Please sign in to comment.