* task#124.

This commit is contained in:
wangchunsheng
2010-03-01 07:23:06 +00:00
parent ae9eb756c5
commit 7e65a7b304
2 changed files with 34 additions and 9 deletions
+33 -9
View File
@@ -23,6 +23,35 @@
*/
?>
<?php include '../../common/header.html.php';?>
<?php include '../../common/colorbox.html.php';?>
<script language='javascript'>
/* 拷贝需求标题为任务标题。*/
function copyStoryTitle()
{
var storyTitle = $('#story option:selected').text();
storyTitle = storyTitle.substr(storyTitle.lastIndexOf('/') + 1);
$('#name').attr('value', storyTitle);
}
/* 设置预览的链接。*/
function setPreview()
{
if(!$('#story').val())
{
$('#preview').addClass('hidden');
}
else
{
storyLink = createLink('story', 'view', "storyID=" + $('#story').val());
$('#preview').removeClass('hidden');
$('#preview').attr('href', storyLink);
}
}
$(document).ready(function()
{
setPreview();
});
</script>
<div class='yui-d0'>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<table align='center' class='table-1 a-left'>
@@ -33,7 +62,10 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->story;?></th>
<td><?php echo html::select('story', $stories, $storyID, 'class=select-1');?></td>
<td>
<?php echo html::select('story', $stories, $storyID, 'class=select-1 onchange=setPreview();');?>
<a href='' id='preview' class='iframe' target='_blank'><?php echo $lang->preview;?></a>
</td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->name;?></th>
@@ -81,12 +113,4 @@
</table>
</form>
</div>
<script language='Javascript'>
function copyStoryTitle()
{
var storyTitle = $('#story option:selected').text();
storyTitle = storyTitle.substr(storyTitle.lastIndexOf('/') + 1);
$('#name').attr('value', storyTitle);
}
</script>
<?php include '../../common/footer.html.php';?>