Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2017-02-14 09:16:33 +0000
committerIvan Furnadjiev2017-02-14 09:16:33 +0000
commitfa38fe28c63a6e35de2e673541a4978ff87e8332 (patch)
tree9eb8c7509e9e74418b3d7b6b9cd799c69e70034d
parent4e2055f7395396ce5b0915840b4d48d62aa2198a (diff)
downloadorg.eclipse.rap-fa38fe28c63a6e35de2e673541a4978ff87e8332.tar.gz
org.eclipse.rap-fa38fe28c63a6e35de2e673541a4978ff87e8332.tar.xz
org.eclipse.rap-fa38fe28c63a6e35de2e673541a4978ff87e8332.zip
Ensure that the Grid custom variant is applied to splitted containers
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridRowContainerWrapper.js4
-rw-r--r--tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/GridTest.js20
2 files changed, 23 insertions, 1 deletions
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridRowContainerWrapper.js b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridRowContainerWrapper.js
index 4f80691a17..000b4c7764 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridRowContainerWrapper.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/widgets/util/GridRowContainerWrapper.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2011, 2017 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -148,8 +148,10 @@ rwt.widgets.util.GridRowContainerWrapper.prototype = {
updateGridLines : function() {
this._container[ 0 ].getRenderConfig().linesVisible = this._config.linesVisible;
+ this._container[ 0 ].getRenderConfig().variant = this._config.variant;
this._container[ 0 ].updateGridLines();
this._container[ 1 ].getRenderConfig().linesVisible = this._config.linesVisible;
+ this._container[ 1 ].getRenderConfig().variant = this._config.variant;
this._container[ 1 ].updateGridLines();
},
diff --git a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/GridTest.js b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/GridTest.js
index 63642e68be..ffaf27e69a 100644
--- a/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/GridTest.js
+++ b/tests/org.eclipse.rap.rwt.jstest/js/org/eclipse/rwt/test/tests/GridTest.js
@@ -5103,6 +5103,26 @@ rwt.qx.Class.define( "org.eclipse.rwt.test.tests.GridTest", {
tree.destroy();
},
+ testGridLinesCustomVariant_isInheritFromGrid : function() {
+ var tree = this._createDefaultTree();
+
+ tree.setCustomVariant( "variant_foo" );
+
+ assertEquals( "variant_foo", tree.getRowContainer().getRenderConfig().variant );
+ tree.destroy();
+ },
+
+ testGridLinesCustomVariant_isInheritFromGrid_withFixedColumns : function() {
+ var tree = this._createDefaultTree( false, false, "fixedColumns", 1 );
+
+ tree.setCustomVariant( "variant_foo" );
+
+ var rowContainer = tree.getRowContainer();
+ assertEquals( "variant_foo", rowContainer.getSubContainer( 0 ).getRenderConfig().variant );
+ assertEquals( "variant_foo", rowContainer.getSubContainer( 1 ).getRenderConfig().variant );
+ tree.destroy();
+ },
+
/////////
// helper

Back to the top