iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi all,
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:
function WebScheduler1_Color(controlId) { var WebScheduler1 = ISGetObject(controlId); var isHourArea = WebScheduler1.ViewSettings.SelectedViewMode != "Timeline"; var arr = new ISArray(); arr.Add(new WebSchedulerDateRange(new Date(2010, 4, 31, 0, 0, 0, 0), new Date(2010, 4, 31, 23, 0, 0, 0), 1, "DateTime")); var elements = WebScheduler1.GetCellElements(arr); SetBackgroundColor(elements, "#555500", isHourArea);}function SetBackgroundColor(elements, color, isHourArea) { for (var i = 0; i < elements.length; i++) { var el = elements[i]; if (el != null) { if (isHourArea) { el.children[0].style.backgroundColor = color; } else { el.style.backgroundColor = color; } } }}
I attached some snap shots to show you the problem. In the Clipboard01.png, I selected the first cell of 31/05/2010.
Then I push the button "Color", the result is in attachment Clipboard02.png.
Finally I select another cell, and the cell previously selected become white instead of green, see Clipboard03.png
Please can somebody help me?
Regards,
Vince
Hi Vincenzo,
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.
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).
However, the following code can be added when the color is applied to the cells.
function SetBackgroundColor(elements, isHourArea) { var s = ISGetObject("WebScheduler1"); for (var i = 0; i < elements.length; i++) { 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 } } } }
I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso.
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.
Andi Santoso
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname