Added whiteliste to DataGridWarningField. Fixes #3864.
authorJonas Tull <jonas@dalom.com>
Thu, 14 Jul 2011 14:21:01 +0000 (16:21 +0200)
committerJonas Tull <jonas@dalom.com>
Thu, 14 Jul 2011 14:21:01 +0000 (16:21 +0200)
net/systemeD/controls/DataGridWarningField.as

index dbc477784a9684485a32857b5e738e5d908dce64..c8750a316444e522d5f760e3f03e7c063e8901c8 100644 (file)
@@ -8,10 +8,12 @@ package net.systemeD.controls {
 
                private var _image:Image;
                [Embed(source="../../../embedded/warning.png")] private var warningIcon:Class;
+    private var _whiteList:Array = [];
 
                function DataGridWarningField():void {
                        super();
                        setStyle('paddingLeft',2);
+      _whiteList.push("ref","source","collection_times","service_times","smoking_hours","opening_hours");
                }
 
                override protected function createChildren():void {
@@ -25,8 +27,8 @@ package net.systemeD.controls {
 
                override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
                        super.updateDisplayList(unscaledWidth, unscaledHeight);
-                       if (data.value && data.value.indexOf(';')>-1) {
+
+      if ( (_whiteList.indexOf(data.key.toLowerCase()) == -1) && (data.value && data.value.indexOf(';')>-1)) { 
                                setStyle('color',0xFF0000);
                                _image.visible=true;
                                _image.x = width -_image.width -5;