Covnert bulk mover into a single button + popup (fixes #409)
This commit is contained in:
@ -267,33 +267,30 @@
|
||||
|
||||
<div class="form_buttons">
|
||||
<input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}">
|
||||
<a href="#move-popup" class="image_move button_link hidden">{$CONST.MOVE}</a>
|
||||
<input class="state_cancel" name="toggle_delete" type="submit" value="{$CONST.DELETE}">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form_select">
|
||||
<label for="newDir">{$CONST.FILTER_DIRECTORY}</label>
|
||||
<input type="hidden" name="serendipity[oldDir]" value="">
|
||||
<select id="newDir" name="serendipity[newDir]">
|
||||
<option value=""></option>
|
||||
{/if}
|
||||
<input class="state_submit hidden" name="toggle_move" type="submit" value="{$CONST.MOVE}">
|
||||
<input type="hidden" name="serendipity[oldDir]" value="">
|
||||
<input type="hidden" id="newDir" name="serendipity[newDir]">
|
||||
</form>
|
||||
<div id="move-popup" class="mfp-hide">
|
||||
<h3>Move images to directory</h3>
|
||||
<form>
|
||||
<div class="form_select">
|
||||
<select >
|
||||
<option value="uploadRoot">{$CONST.BASE_DIRECTORY}</option>
|
||||
{foreach $media.paths AS $folderFoot}
|
||||
|
||||
<option value="{$folderFoot.relpath}">{' '|str_repeat:($folderFoot.depth*2)}{$folderFoot.name}</option>
|
||||
{/foreach}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="form_buttons">
|
||||
<input class="state_submit" name="toggle_move" type="submit" value="{$CONST.MOVE}">
|
||||
<span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_file_bulkmove" title="{$CONST.BULKMOVE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.BULKMOVE_INFO}</span></a></span>
|
||||
</div>
|
||||
|
||||
<footer id="media_file_bulkmove" class="media_file_bulkmove additional_info">
|
||||
<span class="msg_notice">{$CONST.BULKMOVE_INFO_DESC}</span>
|
||||
</footer>
|
||||
{/if}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="form_buttons">
|
||||
<input class="state_submit" type="submit" value="{$CONST.MOVE}">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>{* media library pane end *}
|
||||
|
@ -1673,6 +1673,19 @@ $(function() {
|
||||
serendipity.SetCookie('serendipity_only_path', $('#serendipity_only_path').val());
|
||||
});
|
||||
}
|
||||
|
||||
if ($('.image_move').length > 0) {
|
||||
$('.image_move').removeClass('hidden');
|
||||
$('.image_move').magnificPopup({
|
||||
type: 'inline',
|
||||
});
|
||||
$('#move-popup form').submit(function(e) {
|
||||
e.preventDefault();
|
||||
$('#newDir').val($('#move-popup form select').val());
|
||||
$.magnificPopup.close();
|
||||
$('input[name="toggle_move"]').click();
|
||||
});
|
||||
}
|
||||
|
||||
// reopen detail element after spamblock action
|
||||
if ($('#serendipity_comments_list').length > 0 && window.location.hash && $('#' + window.location.hash.replace('#', '')).length > 0) {
|
||||
|
@ -2576,6 +2576,15 @@ input[name="serendipity[filter][fileCategory]"] {
|
||||
animation: loaderSprite 1s steps(25, end) infinite;
|
||||
}
|
||||
|
||||
#move-popup {
|
||||
position: relative;
|
||||
background: #FFF;
|
||||
padding: 20px;
|
||||
width: auto;
|
||||
max-width: 500px;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
/* TEMP fixes for tree view */
|
||||
#expandcontractdiv {
|
||||
font-size: 1em !important;
|
||||
|
Reference in New Issue
Block a user