More improvements to the uploader.
This commit is contained in:
parent
ee1fc7e3ae
commit
394f4518a3
BIN
ext/upload/minus.png
Normal file
BIN
ext/upload/minus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 B |
BIN
ext/upload/plus.png
Normal file
BIN
ext/upload/plus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 269 B |
@ -5,5 +5,10 @@
|
|||||||
#radio_button {
|
#radio_button {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
#wrapper {
|
||||||
|
opacity : 0.4;
|
||||||
|
filter: alpha(opacity=40); // msie
|
||||||
|
}
|
||||||
|
|
||||||
/* This is needed since the theme style.css forcibly sets vertical align to "top". */
|
/* This is needed since the theme style.css forcibly sets vertical align to "top". */
|
||||||
TABLE.vert TD, TABLE.vert TH {vertical-align: middle;}
|
TABLE.vert TD, TABLE.vert TH {vertical-align: middle;}
|
||||||
|
@ -16,13 +16,44 @@ class UploadTheme extends Themelet {
|
|||||||
// Uploader 2.0!
|
// Uploader 2.0!
|
||||||
$upload_list = "";
|
$upload_list = "";
|
||||||
for($i=0; $i<$config->get_int('upload_count'); $i++) {
|
for($i=0; $i<$config->get_int('upload_count'); $i++) {
|
||||||
$n = $i + 1;
|
$a=$i+1;
|
||||||
$upload_list .= "
|
$s=$i-1;
|
||||||
<tr>
|
if(!$i==0){
|
||||||
<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url$i").style.display = "none";document.getElementById("url$i").value = "";document.getElementById("data$i").style.display = "inline"' /> File<br>";
|
$upload_list .="<tr id='row$i' style='display:none'>";
|
||||||
|
}else{
|
||||||
|
$upload_list .= "<tr id='row$i'>";
|
||||||
|
}
|
||||||
|
$upload_list .= "<td width='15'>";
|
||||||
|
|
||||||
|
if($i==0){
|
||||||
|
$upload_list .= "<div id='hide$i'><img id='wrapper' src='ext/upload/minus.png' />" .
|
||||||
|
"<a href='javascript:document.getElementById("row$a").style.display = "";javascript:document.getElementById("hide$i").style.display = "none";javascript:document.getElementById("hide$a").style.display = "";'>".
|
||||||
|
"<img src='ext/upload/plus.png'></a></div></td>";
|
||||||
|
}else{
|
||||||
|
$upload_list .="<div id='hide$i'>
|
||||||
|
<a href='javascript:document.getElementById("row$i").style.display = "none";".
|
||||||
|
"document.getElementById("hide$i").style.display = "none";".
|
||||||
|
"document.getElementById("hide$s").style.display = "";".
|
||||||
|
"document.getElementById("data$i").value = "";".
|
||||||
|
"document.getElementById("url$i").value = "";'>".
|
||||||
|
"<img src='ext/upload/minus.png' /></a>";
|
||||||
|
if($a==$config->get_int('upload_count')){
|
||||||
|
$upload_list .="<img id='wrapper' src='ext/upload/plus.png' />";
|
||||||
|
}else{
|
||||||
|
$upload_list .=
|
||||||
|
"<a href='javascript:document.getElementById("row$a").style.display = "";".
|
||||||
|
"document.getElementById("hide$i").style.display = "none";".
|
||||||
|
"document.getElementById("hide$a").style.display = "";'>".
|
||||||
|
"<img src='ext/upload/plus.png' /></a>";
|
||||||
|
}
|
||||||
|
$upload_list .= "</div></td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$upload_list .=
|
||||||
|
"<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url$i").style.display = "none";document.getElementById("url$i").value = "";document.getElementById("data$i").style.display = ""' /> File<br>";
|
||||||
if($tl_enabled) {
|
if($tl_enabled) {
|
||||||
$upload_list .="
|
$upload_list .=
|
||||||
<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data$i").style.display = "none";document.getElementById("data$i").value = "";document.getElementById("url$i").style.display = "inline"' /> URL</ br></td></form>
|
"<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data$i").style.display = "none";document.getElementById("data$i").value = "";document.getElementById("url$i").style.display = ""' /> URL</ br></td></form>
|
||||||
|
|
||||||
<td><input id='data$i' name='data$i' class='wid' type='file'><input id='url$i' name='url$i' class='wid' type='text' style='display:none'></td>
|
<td><input id='data$i' name='data$i' class='wid' type='file'><input id='url$i' name='url$i' class='wid' type='text' style='display:none'></td>
|
||||||
";
|
";
|
||||||
@ -58,8 +89,8 @@ class UploadTheme extends Themelet {
|
|||||||
".make_form(make_link("upload"), "POST", $multipart=True)."
|
".make_form(make_link("upload"), "POST", $multipart=True)."
|
||||||
<table id='large_upload_form' class='vert'>
|
<table id='large_upload_form' class='vert'>
|
||||||
$upload_list
|
$upload_list
|
||||||
<tr><td>Tags</td><td colspan='3'><input id='tag_box' name='tags' type='text'></td></tr>
|
<tr><td></td><td>Tags<td colspan='3'><input id='tag_box' name='tags' type='text'></td></tr>
|
||||||
<tr><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
<tr><td></td><td>Source</td><td colspan='3'><input name='source' type='text'></td></tr>
|
||||||
<tr><td colspan='4'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
<tr><td colspan='4'><input id='uploadbutton' type='submit' value='Post'></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
@ -110,10 +141,10 @@ class UploadTheme extends Themelet {
|
|||||||
$upload_list = '';
|
$upload_list = '';
|
||||||
$upload_list .= "
|
$upload_list .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url0").style.display = "none";document.getElementById("url0").value = "";document.getElementById("data0").style.display = "inline"' /> File<br>";
|
<td width='60'><form><input id='radio_buttona' type='radio' name='method' value='file' checked='checked' onclick='javascript:document.getElementById("url0").style.display = "none";document.getElementById("url0").value = "";document.getElementById("data0").style.display = ""' /> File<br>";
|
||||||
if($tl_enabled) {
|
if($tl_enabled) {
|
||||||
$upload_list .="
|
$upload_list .="
|
||||||
<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data0").style.display = "none";document.getElementById("data0").value = "";document.getElementById("url0").style.display = "inline"' /> URL</ br></td></form>
|
<input id='radio_buttonb' type='radio' name='method' value='url' onclick='javascript:document.getElementById("data0").style.display = "none";document.getElementById("data0").value = "";document.getElementById("url0").style.display = ""' /> URL</ br></td></form>
|
||||||
<td><input id='data0' name='data0' class='wid' type='file'><input id='url0' name='url0' class='wid' type='text' style='display:none'></td>
|
<td><input id='data0' name='data0' class='wid' type='file'><input id='url0' name='url0' class='wid' type='text' style='display:none'></td>
|
||||||
";
|
";
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user