Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 486bde3753
Fetching contributors…

Cannot retrieve contributors at this time

86 lines (83 sloc) 2.948 kb
// include config with database definition
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<meta name="author" content="Darko Bunic"/>
<meta name="description" content="Drag and drop table content with JavaScript"/>
<meta name="viewport" content="width=device-width, user-scalable=no"/><!-- "position: fixed" fix for Android 2.2+ -->
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
<script type="text/javascript">
var redips_url = '/javascript/drag-and-drop-example-3/';
<script type="text/javascript" src="../header.js"></script>
<script type="text/javascript" src="../redips-drag-min.js"></script>
<script type="text/javascript" src="script.js"></script>
<title>Example 3: School timetable</title>
<div id="main_container">
<!-- tables inside this DIV could have draggable content -->
<div id="drag">
<!-- left container -->
<div id="left">
<table id="table1">
<col width="190"/>
<?php subjects() ?>
<tr><td class="trash" title="Trash">Trash</td></tr>
</div><!-- left container -->
<!-- right container -->
<div id="right">
<table id="table2">
<col width="50"/>
<col width="100"/>
<col width="100"/>
<col width="100"/>
<col width="100"/>
<col width="100"/>
<!-- if checkbox is checked, clone school subjects to the whole table row -->
<td class="mark blank">
<input id="week" type="checkbox" title="Apply school subjects to the week" checked/>
<input id="report" type="checkbox" title="Show subject report"/>
<td class="mark dark">Monday</td>
<td class="mark dark">Tuesday</td>
<td class="mark dark">Wednesday</td>
<td class="mark dark">Thursday</td>
<td class="mark dark">Friday</td>
<?php timetable('08:00', 1) ?>
<?php timetable('09:00', 2) ?>
<?php timetable('10:00', 3) ?>
<?php timetable('11:00', 4) ?>
<?php timetable('12:00', 5) ?>
<td class="mark dark">13:00</td>
<td class="mark lunch" colspan="5">Lunch</td>
<?php timetable('14:00', 7) ?>
<?php timetable('15:00', 8) ?>
<?php timetable('16:00', 9) ?>
</div><!-- right container -->
</div><!-- drag container -->
<div id="message">Drag school subjects to the timetable (clone subjects with SHIFT key)</div>
<div class="button_container">
<input type="button" value="Save" class="button" onclick="save()" title="Save timetable"/>
</div><!-- main container -->
Jump to Line
Something went wrong with that request. Please try again.