﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebScheduler - WebScheduler fails to color selected cell</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/WebScheduler-fails-to-color-selected-cell/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebScheduler fails to color selected cell</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/WebScheduler-fails-to-color-selected-cell/</link><pubDate>Wed, 02 Jun 2010 10:43:15 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Vincenzo,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; Just wanted to let you know that the issue has been fixed, you can simply apply the latest hotfix that I attached in here. However, this is a nightly build hotfix, disclaimer is on. Since this hotfix has not been tested intensively, any feedback regarding this will be highly appreciated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; In this scenario, the background color is applied manually in a button click. 
WebScheduler can't detect this custom action. So, we need to cache the 
background color when the specified cell is the selected cell. We have added 
CacheBackgroundColor client-side API that can be used to cache the bg color 
(needs latest build).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; However, the following code can be added when the color is applied 
to the cells.&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;&lt;span style="font-size: 9pt; "&gt;function SetBackgroundColor(elements, isHourArea) {
            var s = ISGetObject("WebScheduler1");
            for (var i = 0; i &amp;lt; elements.length; i&amp;#43;&amp;#43;) {
                var el = elements[i];
                if (el != null) {
                    var currentEl = null;
                    if (isHourArea) {
                        var child = el.children[0];
                        child.style.backgroundColor = "yellow";
                        currentEl = child;
                    }
                    else {
                        el.style.backgroundColor = "yellow";
                        currentEl = el;
                    }
                    if (currentEl == s.SelectedDateArea) {
                        s.CacheBackgroundColor("yellow"); //cache the background color if the specified cell is the selected date area
                    }
                }
            }
        }&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; I hope it helps. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso.&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebScheduler fails to color selected cell</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/WebScheduler-fails-to-color-selected-cell/</link><pubDate>Tue, 01 Jun 2010 10:06:54 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Vincenzo,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; I am able to replicate the issue of yours. I have forwarded this to our Developer team. I will inform you as soon as possible when it is fixed. Thank you and have a nice day.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebScheduler fails to color selected cell</title><link>http://www.intersoftsolutions.com/Community/WebScheduler/WebScheduler-fails-to-color-selected-cell/</link><pubDate>Tue, 01 Jun 2010 07:42:55 GMT</pubDate><dc:creator>vangeloni</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I have a problem coloring cells of WebScheduler when one cell is selected: I created a button that call the following code to color cells of 31/05/2010:&lt;/p&gt;&lt;pre&gt;function WebScheduler1_Color(controlId) {&lt;br /&gt;  var WebScheduler1 = ISGetObject(controlId);&lt;br /&gt;		 &lt;br /&gt;  var isHourArea = WebScheduler1.ViewSettings.SelectedViewMode != "Timeline"; &lt;br /&gt;  var arr = new ISArray();&lt;br /&gt;  arr.Add(new WebSchedulerDateRange(new Date(2010, 4, 31, 0, 0, 0, 0), new Date(2010, 4, 31, 23, 0, 0, 0), 1, "DateTime"));&lt;br /&gt;  var elements = WebScheduler1.GetCellElements(arr);&lt;br /&gt;  SetBackgroundColor(elements, "#555500", isHourArea);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function SetBackgroundColor(elements, color, isHourArea) {&lt;br /&gt;  for (var i = 0; i &amp;lt; elements.length; i&amp;#43;&amp;#43;) {&lt;br /&gt;    var el = elements[i];&lt;br /&gt;    if (el != null) {&lt;br /&gt;      if (isHourArea) {&lt;br /&gt;        el.children[0].style.backgroundColor = color;&lt;br /&gt;      }&lt;br /&gt;      else {&lt;br /&gt;        el.style.backgroundColor = color;&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;I attached some snap shots to show you the problem. In the Clipboard01.png, I selected the first cell of 31/05/2010.&lt;/p&gt;
&lt;p&gt;Then I push the button "Color", the result is in attachment Clipboard02.png.&lt;/p&gt;
&lt;p&gt;Finally I select another cell, and the cell previously selected become white instead of green, see Clipboard03.png&lt;/p&gt;
&lt;p&gt;Please can somebody help me?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vince&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>