ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsProjectsltwCalendar

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 21st, 2004, 06:23 PM
lurking lurking is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 lurking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

Is there a quick and easy way to change the color of the table cells that are before the beginning of the month and after the end of the month? :

Thanks.

Reply With Quote
  #2  
Old June 25th, 2004, 11:54 AM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

Indeed there is. I did exactly this for our calendar.

Search through the PHP files for the text <!--empty Cell -->. Immediately below this text you will find a <td> tag. Change this tag and add class=calempty to it. For example, this is a copy and paste from my calendar....
php Code:
Original - php Code
  1. <td width="14%"  height=" . (100 / $num_of_rows) . "%">
change the line to...
php Code:
Original - php Code
  1. <td [b]class="calempty"[/b] width="14%"  height="" . (100 / $num_of_rows) . "%">

NOTE: I have removed the slashes for clarity. You will need to escape the quotes marks accordingly

In your CSS file you now need to add the calempty class definition. Again, here is a copy and paste from my CSS...
Code:
td.calempty {
	background-color: #ddd;
	text-align: left;
	vertical-align: top;
      }


Hope this helps.

Reply With Quote
  #3  
Old June 25th, 2004, 12:00 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

Sorry, made a bit of a **** up on the previous post. I tried to make the changes to new code using the bold tags, unfortunately, they printed out in the code and didn't actually make the text bold, so ignore the [code][code] in the text. I would have edited the posting, but I don't seem to be able to.

Reply With Quote
  #4  
Old June 25th, 2004, 12:01 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

q

Reply With Quote
  #5  
Old June 25th, 2004, 05:16 PM
lurking lurking is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 11 lurking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

Leigh,

Thanks very much for your kind assistance. As an alternative, I was able to create cells that match the table background color by using the "empty cells" CSS syntax. Your code is much more flexible, however, and I will take advantage of it when I need a color change.

Thanks!

Reply With Quote
  #6  
Old October 12th, 2004, 12:42 PM
JStevenT JStevenT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Monroe, MI - USA
Posts: 47 JStevenT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

I followed the instructions above and added the slashes for the quotes and was able to change the color of the empty cells. The problem is the actual calendar changed. The blank cells moved to the opposite side of the calendar (both before and end blanks). I could not see why the structure of the calendar changed and reverted back to the previous ltwdisplaymonth.php

Please advise what caused the shift.

Thanks
JStevenT

Reply With Quote
  #7  
Old October 12th, 2004, 01:17 PM
Leigh Leigh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Ontario, Canada
Posts: 99 Leigh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 20 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

John,

Are you sure you correctly escaped all the quotes marks? It sounds like something went awry. Below it the code I use copy & pasted directly from our live calendar, complete with slashes...
php Code:
Original - php Code
  1.  
  2. echo "<!--empty Cell -->
  3. <td class="calempty" width="14%"  height="" . (100 / $num_of_rows) . "%">";


Copy and paste that into your ltwdisplaymonth.php file and give it a try. It occurs at line 267 approx.

Reply With Quote
  #8  
Old October 12th, 2004, 02:00 PM
JStevenT JStevenT is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Monroe, MI - USA
Posts: 47 JStevenT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)

Hello Leigh,

I pasted the php code as shown and it corrected the problem. I believe I might have missed the slash after the final % sign. Thanks again to Leigh.

Code:
echo "<!--empty Cell -->
<td class="calempty" width="14%"  height="" . (100 / $num_of_rows) . "%">";


JStevenT

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > How to Change Table Cell Color for Blank Cells? (i.e. before beginning and after end of month)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek