Quote:
Originally Posted by willise
Since I want to move from Flash, I would like to use Javascript, Jquery and HTML5 to completely redo our website so it can be used on phones, tablets, etc.
I have built a calendar and can cycle through the months (i'd eventually like to get a year view), but I'm having issues with a couple of items I had built into the flash version. First of all, I want to be able to show each employees work schedule on the calendar. They all work rotating shifts of 5 on 4 off. In AS3 i've taken their rotation, paired it with a start date for that rotation and was able to indicate in the datagrid "WORKING" on their days of work. This enables them to pick leave on their correct working days. In Jquery, I'd like to color the calendar on the dates that they are scheduled to work. IS that possible?
|
there is not enough info here to make broad recommendations or discuss specific code implementations. Yes, you can color a calendar with js/jquery, but the devil is in the details.
the main thing here is connecting a date to a certain table cell. yes,, a table cell, not a calendar day. if you could alter the data going into whatever build your calendar, i would think that would be eaiser than trying to "bolt on" data to an existing view.
essentially, you massage the cal data to reflect one person, and draw the cal for that one person. so, you mod BEFORE you make the html calendar...
Quote:
Originally Posted by willise
Secondly, they pick 5 days of leave at a time. I'd like to display a token of some sort on the page that contains their name. They could then drag the token to a day that they would like to have off. Once they click submit, the selections are submitted to the MySQL database I have set up. How can I create these tokens based on the user's login name.
|
dragging is nogood for mobile, and that sounds overly-complicated in general. If you know who is using the app why the complex interaction?
if you simply had a <form> around the cal, and each day had a checkbox like
Code:
<td class='day'>
<b>14</b>
<br />
<label>
<input type='checkbox' name='feb142012' /> Off
</label>
</td>
, submitting the form would send a list of all requested days off for the logged-in user to php, which can them dump it to mysql.