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 know that using method visitPlanScheduler.GetCellElements(...) I can get cells and then I can change the background color, for example I use this to color a particular day if a resource is selected.
But after that, how I can reset colors of the cells if the resource is deselected?
Thanks in advance,
Vince.
If you are using following approach (as shown in the snippet script below) to set color on the specific cells of WebScheduler,
<script type="text/javascript"> <!-- function SetCellElementsByDateTime() { var s = ISGetObject("WebScheduler1"); var arr = new ISArray(); arr.Add(new WebSchedulerDateRange(new Date(2008, 1, 25, 5, 0, 0), new Date(2008, 1, 25, 21, 0, 0), 2, "DateTime")); var elements = s.GetCellElements(arr); var flag = s.ViewSettings.SelectedViewMode == "Timeline" ? false : true; SetBackgroundColor(elements, flag); } function SetBackgroundColor(elements, isHourArea) { for (var i = 0; i < elements.length; i++) { var el = elements[i]; if (el != null) { if (isHourArea) el.children[0].style.backgroundColor = "yellow"; else el.style.backgroundColor = "yellow"; } } } --> </script>
then you may simply set the same ‘backgroundColor’ style property to be blank (“”) in order to reset the color of the cells.
function SetBackgroundColor(elements, isHourArea) { for (var i = 0; i < elements.length; i++) { var el = elements[i]; if (el != null) { if (isHourArea) el.children[0].style.backgroundColor = ""; else el.style.backgroundColor = ""; } } }
Hope this helps.
Hi Yudy,
I solved with the week view: I'm using Internet Explorer 8, after I disabled the compatibility view and after i changed the doctype from
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
cells are colored correctly.
For the Month view I have still to use el.style.backgroundColor to have cells colored, and for me this is fine.
Regards,
Hi Yudithis work perfeclty, thanks.Anyway I do not understand the "if (isHourArea)" instruction: in my tests if I use
el.children[0].style.backgroundColor
el.style.backgroundColor
ThanksVince.
The “isHourArea” is used to determine whether the cell element is belongs to hour area of WebScheduler or the all day event cell area of WebScheduler.
For your information, your attached image is blank and I don’t see any hint in there. Could you please kindly re-attach it so that I can assist you further?
Hi Yudi,
here the image. As you can see there are white spaces between yellow cells.
... for Day and Week view the cells are colored like in the attached image ...
for Day and Week view the cells are colored like in the attached image
I have seen the attached screenshot and tried to reproduce the problem in my local end, but my effort was not successful. The cell of my WebScheduler is colored with yellow without any white-space between yellow cells. I have tested it on five different browsers: Internet Explorer 8; Mozilla Firefox 3.6.3; Safari 4.0.5; Google Chrome 4.1.249.1064 (45376); and Opera 10.53. The screenshots of the page on each browser are attached.
Could you please kindly let us know what browser and the version that you are using?
... in Month view the cells are not colored at all. So I'm usingel.style.backgroundColorfor all views. I'm doing right or there is something wrong with that? ...
in Month view the cells are not colored at all. So I'm using
In order to color cells in other view mode of WebScheduler, you’ll need to ensure that you have got the correct cell elements that you wish to be colored. You may use ‘el.style.backgroundColor’ as long as this line suits with the element structure that about to be colored.
Glad to hear the good news.
Should you need further assistance or run into any problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
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