* finish task#892.
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
<div id='<?php echo "nameBox" . ($i+1);?>' class='hidden'><?php echo html::input("names[$i]", '', 'class="f-left text-1"'); echo "<span class='star'>*</span>";?></div>
|
||||
<div class='<?php echo "nameBox" . ($i+1);?>'><?php echo html::input("names[$i]", '', 'class="f-left text-1"'); echo "<span class='star'>*</span>";?></div>
|
||||
</td>
|
||||
<td><?php echo html::textarea("descs[$i]", '', "rows='2' class=text-1");?></td>
|
||||
<td><?php echo html::select('begins[]', $times, '') . html::select('ends[]', $times, '');?><td>
|
||||
<td><?php echo html::textarea("descs[$i]", '', "rows='1' class=text-1");?></td>
|
||||
<td><?php echo html::select("begins[$i]", $times, $time, "onchange=setBeginsAndEnds($i)") . html::select("ends[$i]", $times, '');?><td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr>
|
||||
@@ -48,4 +48,7 @@
|
||||
</table>
|
||||
</form>
|
||||
<?php include './footer.html.php';?>
|
||||
<script language='Javascript'>selectNext();</script>
|
||||
<script language='Javascript'>
|
||||
var batchCreateNum = '<?php echo $config->todo->batchCreate;?>';
|
||||
setBeginsAndEnds();
|
||||
</script>
|
||||
|
||||
@@ -49,8 +49,28 @@ function loadList(type, id)
|
||||
|
||||
function selectNext()
|
||||
{
|
||||
endIndex = $("#begin ").get(0).selectedIndex + 2;
|
||||
$("#end ").get(0).selectedIndex = endIndex;
|
||||
$("#end ").get(0).selectedIndex = $("#begin ").get(0).selectedIndex + 2;
|
||||
}
|
||||
|
||||
function setBeginsAndEnds(i)
|
||||
{
|
||||
if(typeof i == 'undefined')
|
||||
{
|
||||
for(j = 0; j < batchCreateNum; j++)
|
||||
{
|
||||
endIndex = $("#begins" + j).get(0).selectedIndex + 2;
|
||||
$("#ends" + j).get(0).selectedIndex = endIndex;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin = $("#begins" + i).val();
|
||||
for(j = i; j < batchCreateNum; j++)
|
||||
{
|
||||
$("#begins" + j).val(begin);
|
||||
$("#ends" + j).get(0).selectedIndex = $("#begins" + i).get(0).selectedIndex + 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switchDateFeature(switcher)
|
||||
|
||||
Reference in New Issue
Block a user