upload box style

This commit is contained in:
Shish 2012-02-12 12:00:19 +00:00
parent 766cc9e959
commit 2da52689cf
3 changed files with 8 additions and 4 deletions

3
ext/upload/style.css Normal file
View File

@ -0,0 +1,3 @@
.mini_upload INPUT {
width: 100%;
}

View File

@ -236,20 +236,21 @@ class UploadTheme extends Themelet {
for($i=0; $i<$upload_count; $i++) { for($i=0; $i<$upload_count; $i++) {
if($i == 0) $style = ""; // "style='display:visible'"; if($i == 0) $style = ""; // "style='display:visible'";
else $style = "style='display:none'"; else $style = "style='display:none'";
$upload_list .= "<input size='10' ". $upload_list .= "<input id='data$i' name='data$i' $style onchange=\"$('#data".($i+1)."').show()\" type='file'>\n";
"id='data$i' name='data$i' $style onchange=\"$('#data".($i+1)."').show()\" type='file'>\n";
} }
$max_size = $config->get_int('upload_size'); $max_size = $config->get_int('upload_size');
$max_kb = to_shorthand_int($max_size); $max_kb = to_shorthand_int($max_size);
// <input type='hidden' name='max_file_size' value='$max_size' /> // <input type='hidden' name='max_file_size' value='$max_size' />
return " return "
<div class='mini_upload'>
".make_form(make_link("upload"), "POST", $multipart=True)." ".make_form(make_link("upload"), "POST", $multipart=True)."
$upload_list $upload_list
<input name='tags' type='text' placeholder='tagme' class='autocomplete_tags'> <input name='tags' type='text' placeholder='tagme' class='autocomplete_tags'>
<input type='submit' value='Post'> <input type='submit' value='Post'>
</form> </form>
<div id='upload_completions' style='clear: both;'><small>(Max file size is $max_kb)</small></div> <small>(Max file size is $max_kb)</small></div>
<noscript><a href='".make_link("upload")."'>Larger Form</a></noscript> <noscript><a href='".make_link("upload")."'>Larger Form</a></noscript>
</div>
"; ";
} }
} }

View File

@ -46,7 +46,7 @@ TD {
text-align: center; text-align: center;
} }
#body SELECT {width: 150px;} #body SELECT {width: 150px;}
TD>INPUT, TEXTAREA {box-sizing: border-box;} INPUT, TEXTAREA {box-sizing: border-box;}
TD>INPUT[type="button"] {width: 100%;} TD>INPUT[type="button"] {width: 100%;}
TD>INPUT[type="submit"] {width: 100%;} TD>INPUT[type="submit"] {width: 100%;}
TD>INPUT[type="text"] {width: 100%;} TD>INPUT[type="text"] {width: 100%;}