Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Color of events in timeline not shown if showEventDescriptions is false

    Hi,

    we are using the backgroundColor of events to show different eventcategories in the timeline.
    The timeline is just an overview and most of the information itself we handle with the overlay. Therefore we have set the "showEventDescriptions" to false. Using this results in not displaying the color of the event itself.
    We are using SmartClient_v100p_2014-10-19_Pro and testet it with altest firefox and chrome.

    Instead of the color of the event a defautl color is used.


    After activation the "showEventsDescriptions" the color of the event is displayed, but only as a little block inside the event.


    In Smartclient 9.1 the whole event was colored and the boolean could be set to false. It should set the background color whatever the value of showEventsDescriptions is.

    With this code you can reproduce the behavior.
    Code:
    isc.Timeline.create({
    	"width" : "100%",
    	"height" : "100%",
    	"hideUsingDisplayNone" : false,
    	"startDate" : new Date(2014, 9, 13),
    	"endDate" : new Date(2014, 10, 9),
    	"firstDayOfWeek" : 1,
    	"alternateLaneStyles" : true,
    	"showEventDescriptions" : false,
    	"laneFields" :
    	[{
    			"name" : "title",
    			"title" : "&nbsp",
    			"type" : "text",
    			"canEdit" : false
    		}
    	],	
    	"lanes" :
    	[{
    			"height" : 30,
    			"name" : "1",
    			"title" : "Item 1"
    		}, {
    			"height" : 30,
    			"name" : "2",
    			"title" : "Item 2"
    		}
    	],
    	"data" :
    	[{
    			"lane" : "1",
    			"description" : "this is a description",
    			"startDate" : new Date(2014, 9, 17, 12, 0),
    			"backgroundColor" : "#00BD02",
    			"showDate" : true,
    			"endDate" : new Date(2014, 9, 20, 23, 59),
    			"name" : "&nbsp"
    		}
    	]
    })
    Best regards

    #2
    backgroundColor only applies to the body part of an EventCanvas - so you can either switch to using showEventHeaders:false to hide the un-colored area, or apply a custom CSS style to the event, via event.styleName - that's the recommended approach.

    Comment


      #3
      I have tried with showEventHeaders:false and the latest smartclient build.

      with "showEventHeaders:false" it is displayed like this


      in difference here is it with "showEventHeaders:true"


      The only difference i see is that the blue is not so dark, but the element is definetly visible.

      In Smartclient 9.1 we have sponsored the feature that we can color each event with a hex-color like so:


      How do we achieve this with the latest smartclient edition?

      Comment


        #4
        There was a bug where the headerHeight was being taken into account, even when the header was not visible.

        That's now been fixed - so, hiding the header will cause the body to fill the event, in the backgroundColor that you expect - but it will show the description text of the event.

        If you don't want to show any text at all, you can also now set both showEventHeaders and showEventDescriptions to false and the eventCanvas itself will still have the specified backgroundColor.

        Please retest with a build dated October 21 or later.

        Comment


          #5
          thanks, in the build SmartClient_v100p_2014-10-21_Pro its fixed as you said.

          Comment


            #6
            Note that we've now also exposed CalendarEvent.headerBackgroundColor, which will be available in builds dated October 22 and later.

            Comment

            Working...
            X