Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 223513 Details for
Bug 394079
[Theming][List] Custom variant styling for lines in List do not work correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch for 1.5
org.eclipse.rap_15.patch (text/plain), 4.17 KB, created by
Tim Buschtoens
on 2012-11-13 09:52:18 EST
(
hide
)
Description:
patch for 1.5
Filename:
MIME Type:
Creator:
Tim Buschtoens
Created:
2012-11-13 09:52:18 EST
Size:
4.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt >diff --git js/org/eclipse/rwt/widgets/BasicList.js js/org/eclipse/rwt/widgets/BasicList.js >index 785b18b..df55e62 100644 >--- js/org/eclipse/rwt/widgets/BasicList.js >+++ js/org/eclipse/rwt/widgets/BasicList.js >@@ -221,6 +221,9 @@ > if( i % 2 === 0 ) { > item.addState( "even" ); > } >+ if( this._customVariant !== null ) { >+ item.addState( this._customVariant ); >+ } > this._clientArea.add( item ); > } > } >#P org.eclipse.rap.rwt.jstest >diff --git js/org/eclipse/rwt/test/tests/ListTest.js js/org/eclipse/rwt/test/tests/ListTest.js >index f607ca4..519ed39 100644 >--- js/org/eclipse/rwt/test/tests/ListTest.js >+++ js/org/eclipse/rwt/test/tests/ListTest.js >@@ -746,7 +746,96 @@ > assertEquals( [ 0, 70 ], position ); > list.destroy(); > }, >- >+ >+ >+ testApplyCustomVariantToExistingItems : function() { >+ var TestUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var shell = TestUtil.createShellByProtocol( "w2" ); >+ var processor = org.eclipse.rwt.protocol.Processor; >+ processor.processOperation( { >+ "target" : "w3", >+ "action" : "create", >+ "type" : "rwt.widgets.List", >+ "properties" : { >+ "style" : [ "MULTI" ], >+ "parent" : "w2", >+ "items" : [ "a", "b", "c" ] >+ } >+ } ); >+ >+ TestUtil.protocolSet( "w3", { "customVariant" : "variant_myVariant" } ); >+ >+ var ObjectManager = org.eclipse.rwt.protocol.ObjectManager; >+ var widget = ObjectManager.getObject( "w3" ); >+ var items = widget.getItems(); >+ assertTrue( items[ 0 ].hasState( "variant_myVariant" ) ); >+ assertTrue( items[ 1 ].hasState( "variant_myVariant" ) ); >+ assertTrue( items[ 2 ].hasState( "variant_myVariant" ) ); >+ shell.destroy(); >+ widget.destroy(); >+ }, >+ >+ testApplyCustomVariantToNewItems : function() { >+ var TestUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var shell = TestUtil.createShellByProtocol( "w2" ); >+ var processor = org.eclipse.rwt.protocol.Processor; >+ processor.processOperation( { >+ "target" : "w3", >+ "action" : "create", >+ "type" : "rwt.widgets.List", >+ "properties" : { >+ "style" : [ "MULTI" ], >+ "parent" : "w2", >+ "customVariant" : "variant_myVariant" >+ } >+ } ); >+ TestUtil.flush(); >+ >+ TestUtil.protocolSet( "w3", { "items" : [ "a", "b", "c" ] } ); >+ >+ var ObjectManager = org.eclipse.rwt.protocol.ObjectManager; >+ var widget = ObjectManager.getObject( "w3" ); >+ var items = widget.getItems(); >+ assertTrue( items[ 0 ].hasState( "variant_myVariant" ) ); >+ assertTrue( items[ 1 ].hasState( "variant_myVariant" ) ); >+ assertTrue( items[ 2 ].hasState( "variant_myVariant" ) ); >+ shell.destroy(); >+ widget.destroy(); >+ TestUtil.flush(); >+ }, >+ >+ testReplaceCustomVariant : function() { >+ var TestUtil = org.eclipse.rwt.test.fixture.TestUtil; >+ var shell = TestUtil.createShellByProtocol( "w2" ); >+ var processor = org.eclipse.rwt.protocol.Processor; >+ processor.processOperation( { >+ "target" : "w3", >+ "action" : "create", >+ "type" : "rwt.widgets.List", >+ "properties" : { >+ "style" : [ "MULTI" ], >+ "parent" : "w2", >+ "customVariant" : "variant_myVariant", >+ "items" : [ "a", "b", "c" ] >+ } >+ } ); >+ TestUtil.flush(); >+ >+ TestUtil.protocolSet( "w3", { "customVariant" : "variant_other" } ); >+ >+ var ObjectManager = org.eclipse.rwt.protocol.ObjectManager; >+ var widget = ObjectManager.getObject( "w3" ); >+ var items = widget.getItems(); >+ assertFalse( items[ 0 ].hasState( "variant_myVariant" ) ); >+ assertFalse( items[ 1 ].hasState( "variant_myVariant" ) ); >+ assertFalse( items[ 2 ].hasState( "variant_myVariant" ) ); >+ assertTrue( items[ 0 ].hasState( "variant_other" ) ); >+ assertTrue( items[ 1 ].hasState( "variant_other" ) ); >+ assertTrue( items[ 2 ].hasState( "variant_other" ) ); >+ shell.destroy(); >+ widget.destroy(); >+ }, >+ > ////////// > // Helpers >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ivan
:
review+
rsternberg
:
review+
Actions:
View
|
Diff
Attachments on
bug 394079
:
223448
| 223513