Code: Select all
//Function prototype inspired by http://molily.de/javascript-nodelist
Code: Select all
<!-- WARNING: Do not change spacing or breaks below. If you do, the JavaScript childNodes need to be edited. Newlines count as nodes! -->
Code: Select all
//Function prototype inspired by http://molily.de/javascript-nodelist
Code: Select all
<!-- WARNING: Do not change spacing or breaks below. If you do, the JavaScript childNodes need to be edited. Newlines count as nodes! -->
What exactly do you want to do? You can achieve much of the styling with CSS with no need to shuffle elements.benson wrote:There is not another way to do that? or there is a way to unable that?
Code: Select all
<div id="upload_template_1">
<table style="margin-top: 35px" id="upload_table" class="image_add_local">
<tr>
<td nowrap='nowrap'>{$CONST.ENTER_MEDIA_UPLOAD}</td>
<td><input id="userfile_1" name="serendipity[userfile][1]" onchange="checkInputs();" type="file" /></td>
</tr>
<tr>
<td align="center" colspan="2"><br /></td>
</tr>
<tr>
<td>{$CONST.SAVE_FILE_AS}</td>
<td><input type="text" id="target_filename_1" name="serendipity[target_filename][1]" value="" size="40" /></td>
</tr>
<tr>
<td>{$CONST.STORE_IN_DIRECTORY}</td>
<td>
<select id="target_directory_1" name="serendipity[target_directory][1]">
<option value="">{$CONST.BASE_DIRECTORY}</option>
{foreach from=$media.folders item="folder"}
<option {if $media.only_path == $folder.relpath}selected="selected"{/if} value="{$folder.relpath}">{' '|@str_repeat:$folder.depth*2} {$folder.name}</option>
{/foreach}
</select>
</td>
</tr>
</table>
<div id="ccounter"><input type="hidden" name="serendipity[column_count][1]" id="column_count_1" value="true" /></div>
</div>
<div id="upload_template_2">
</div>
Code: Select all
var fieldcount = 1;
function addField() {ldelim}
fieldcount++;
nextfieldcount=fieldcount+1;
iNew = document.getElementById('upload_template_' + fieldcount);
iNew.innerHTML='<span id="upload_template_' + fieldcount + '"><table style="margin-top: 35px" id="upload_table" class="image_add_local"><tr><td nowrap="nowrap">{$CONST.ENTER_MEDIA_UPLOAD}</td><td><input id="userfile_' + fieldcount + '" name="serendipity[userfile][' + fieldcount + ']" onchange="checkInputs();" type="file" /></td></tr><tr><td align="center" colspan="2"><br /></td></tr><tr><td>{$CONST.SAVE_FILE_AS}</td><td><input type="text" id="target_filename_' + fieldcount + '" name="serendipity[target_filename][' + fieldcount + ']" value="" size="40" /></td></tr><tr><td>{$CONST.STORE_IN_DIRECTORY}</td><td><select id="target_directory_' + fieldcount + '" name="serendipity[target_directory][' + fieldcount + ']"><option value="">{$CONST.BASE_DIRECTORY}</option>{foreach from=$media.folders item="folder"}<option {if $media.only_path == $folder.relpath}selected="selected"{/if} value="{$folder.relpath}">{' '|@str_repeat:$folder.depth*2} {$folder.name}</option>{/foreach}</select></td></tr></table><div id="ccounter"><input type="hidden" name="serendipity[column_count][' + fieldcount + ']" id="column_count_' + fieldcount + '" value="true" /></div></span><span id="upload_template_' + nextfieldcount + '"></span>'
{rdelim}
so if no JS available, cannot make another form to upload a 2ndo file<script type="text/javascript">
document.write('<input class="serendipityPrettyButton" type="button" value="{$CONST.IMAGE_MORE_INPUT}" onclick="hideForeign(); addField()"' + '/><br' + '/>');
</script>