Archived
Re-added change filename/target dir for media db uploads
References #136
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div id="downloads">
|
||||
<div class="clearfix form_field">
|
||||
<label for="imageurl">{$CONST.ENTER_MEDIA_URL}</label>
|
||||
<input id="imageurl" class="check_input" name="serendipity[imageurl]" type="text" value="">
|
||||
<input id="imageurl" name="serendipity[imageurl]" type="text" value="">
|
||||
</div>
|
||||
|
||||
<div class="clearfix form_select">
|
||||
@@ -61,6 +61,21 @@
|
||||
<option value="hotlink">{$CONST.FETCH_METHOD_HOTLINK}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form_field clearfix">
|
||||
<label for="imagefilename" class="uploadform_target_filename_label">{$CONST.SAVE_FILE_AS} <span>{$CONST.PLAIN_ASCII_NAMES}</span></label>
|
||||
<input id="imagefilename" class="uploadform_target_filename" name="serendipity[target_filename][]" type="text" value="">
|
||||
</div>
|
||||
|
||||
<div class="form_select clearfix">
|
||||
<label for="imagetargetdirectory" class="uploadform_target_directory_label">{$CONST.STORE_IN_DIRECTORY}</label>
|
||||
<select id="imagetargetdirectory" class="uploadform_target_directory" name="serendipity[target_directory][]">
|
||||
<option value="">{$CONST.BASE_DIRECTORY}</option>
|
||||
{foreach from=$media.folders item="folder"}
|
||||
<option{if $media.only_path == $folder.relpath} selected{/if} value="{$folder.relpath}">{' '|@str_repeat:($folder.depth*2)} {$folder.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1142,6 +1142,15 @@ $(function() {
|
||||
serendipity.checkInputs();
|
||||
});
|
||||
|
||||
// Extra function for media db download
|
||||
$('#imageurl').change(function() {
|
||||
sourceval = serendipity.getfilename(document.getElementById('imageurl').value);
|
||||
|
||||
if (sourceval.length > 0) {
|
||||
document.getElementById('imagefilename').value = sourceval;
|
||||
}
|
||||
});
|
||||
|
||||
// Dashboard bookmarklet hint
|
||||
$('.s9y_bookmarklet').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user