* adjust the file form width.

This commit is contained in:
wangchunsheng
2012-03-02 12:14:20 +00:00
parent 7325251f83
commit e0378274e9
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
<div id='fileform'>
<?php for($i = 0; $i < $fileCount; $i ++):?>
<span class='icon-file'></span><?php echo $lang->file->common . ($i + 1) . " "?><input type='file' name='files[]' id="file<?php echo $i;?>" tabindex='-1' />
<span class='icon'><span class='icon-file'></span><?php echo $lang->file->common . ($i + 1) . " "?></span><input type='file' name='files[]' id="file<?php echo $i;?>" tabindex='-1' />
<label id='label<?php echo $i;?>' tabindex='-1' class='strong'><?php echo $lang->file->label;?></label>
<input type='text' name='labels[]' class='text-3' tabindex='-1' /><br />
<?php endfor;?>
@@ -9,8 +9,9 @@
function setFileFormWidth(percent)
{
totalWidth = Math.round($('#fileform').parent().width() * percent);
titleWidth = totalWidth - $('#file0').width() - $('#label0').width();
if(!$.browser.mozilla) titleWidth -= 10;
titleWidth = totalWidth - $('#file0').width() - $('#label0').width() - $('.icon').width();
if($.browser.mozilla) titleWidth -= 8;
if(!$.browser.mozilla) titleWidth -= 12;
$('#fileform .text-3').css('width', titleWidth + 'px');
};
$(function(){setFileFormWidth(<?php echo $percent;?>)});
+1 -1
View File
@@ -89,7 +89,7 @@
<table class='table-1'>
<tr>
<th class='rowhead' valign='top'><?php echo $lang->story->legendAttatch;?></th>
<td><?php echo $this->fetch('file', 'buildform', "fileConte=2&precent=0.94");?></td>
<td><?php echo $this->fetch('file', 'buildform', "fileConte=2&precent=0.99");?></td>
</tr>
</table>
</div>