Allow bulk move ML items to Uploads Root too
Fixes many issues like for renaming files and subdir handling, database placements and other issues. Structures case DIR, FILE and FILE vars for renaming, moving, select and replace. Touches directoryEdit and mediaproperties related boundaries. Adds better event messages, which fixes $ob_serendipity_moveMediaDirectory. Extends and fixes media_items realname issues and changes the length of the item title to be as long as possible. Added new constants to be executed to the lang files in near future, when some follow up commits have been added.
This commit is contained in:
@ -72,7 +72,6 @@
|
||||
{/if}
|
||||
{if $case_directoryEdit}
|
||||
{if !empty($smarty.post.save)}
|
||||
{if isset($ob_serendipity_moveMediaDirectory)}<span class="msg_notice"><span class="icon-info-circled"></span> {$ob_serendipity_moveMediaDirectory}</span>{/if}
|
||||
<span class="msg_notice"><span class="icon-info-circled"></span> {$print_CONST.SETTINGS_SAVED_AT}</span>
|
||||
{/if}
|
||||
<h2>{$CONST.MANAGE_DIRECTORIES}</h2>
|
||||
|
@ -47,7 +47,7 @@
|
||||
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
||||
{$img_src="{$file.path}"}
|
||||
{$img_title="{$file.path}"}
|
||||
$img_alt="{$file.realname}"}
|
||||
{$img_alt="{$file.realname}"}
|
||||
{else}
|
||||
{$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"}
|
||||
{$img_src="{$file.mimeicon}"}
|
||||
@ -67,7 +67,7 @@
|
||||
<label for="multidelete_image{$file.id}" class="visuallyhidden">{$CONST.TOGGLE_SELECT}</label>
|
||||
</div>
|
||||
|
||||
<h3 title="{$file.realname}">{$file.realname|truncate:30:"…"}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}</h3>
|
||||
<h3 title="{$file.realname}">{$file.realname|truncate:50:"…":true}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}</h3>
|
||||
{if $file.authorid != 0}<span class="author block_level">{$file.authorname}</span>{/if}
|
||||
|
||||
</header>
|
||||
@ -81,8 +81,7 @@
|
||||
<ul class="plainList">
|
||||
{if $file.hotlink}
|
||||
|
||||
<li>{$file.nice_hotlink}</li>
|
||||
<li>{$CONST.MEDIA_HOTLINKED}</li>
|
||||
<li><b>{$CONST.MEDIA_HOTLINKED}:</b> {$file.nice_hotlink}</li>
|
||||
{else}
|
||||
{if $file.realname != $file.diskname}
|
||||
|
||||
@ -151,7 +150,7 @@
|
||||
<li><b>{$CONST.SORT_ORDER_DATE}:</b> {if $file.authorid != 0}{$CONST.POSTED_BY} {$file.authorname} {/if}{$CONST.ON} {$file.date|formatTime:DATE_FORMAT_SHORT}</li>
|
||||
{if $file.hotlink}
|
||||
|
||||
<li>{$file.nice_hotlink}</li>
|
||||
<li><b>{$CONST.MEDIA_HOTLINKED}:</b> {$file.nice_hotlink}</li>
|
||||
{elseif $file.is_image}
|
||||
|
||||
<li><b>{$CONST.ORIGINAL_SHORT}:</b> {$file.dimensions_width}x{$file.dimensions_height}</li>
|
||||
@ -188,7 +187,7 @@
|
||||
<label for="newDir{$file@key}">{$CONST.FILTER_DIRECTORY}</label>
|
||||
<input type="hidden" name="serendipity[oldDir][{$file@key}]" value="{$file.path|escape}">
|
||||
<select id="newDir{$file@key}" name="serendipity[newDir][{$file@key}]">
|
||||
<option value=""></option>
|
||||
<option{if ($file.path == $folder.relpath)} selected{/if} value="">{$CONST.BASE_DIRECTORY}</option>
|
||||
{foreach $media.paths AS $folder}
|
||||
|
||||
<option{if ($file.path == $folder.relpath)} selected{/if} value="{$folder.relpath}">{' '|str_repeat:($folder.depth*2)}{$folder.name}</option>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</li>
|
||||
<li id="media_selector_bar">
|
||||
<fieldset>
|
||||
<input type="radio" id="serendipity[filter][fileCategory][All]" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == ""} checked{/if} value="">
|
||||
<input id="serendipity[filter][fileCategory][All]" type="radio" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == ""} checked{/if} value="">
|
||||
<label for="serendipity[filter][fileCategory][All]" class="media_selector button_link">{$CONST.COMMENTS_FILTER_ALL}</label>
|
||||
<input id="serendipity[filter][fileCategory][Image]" type="radio" name="serendipity[filter][fileCategory]"{if $media.filter.fileCategory == "image"} checked{/if} value="image">
|
||||
<label for="serendipity[filter][fileCategory][Image]" class="media_selector button_link">{$CONST.IMAGE}</label>
|
||||
@ -211,22 +211,32 @@
|
||||
<div class="form_buttons">
|
||||
<input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}">
|
||||
<input class="state_cancel" name="toggle" type="submit" value="{$CONST.DELETE}">
|
||||
<div class="form_select">
|
||||
</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>
|
||||
<option value="uploadRoot">{$CONST.BASE_DIRECTORY}</option>
|
||||
{foreach $media.paths AS $folderFoot}
|
||||
|
||||
<option{if ($media.only_path == $media.limit_path|cat:$folderFoot.relpath)} selected{/if} value="{$folderFoot.relpath}">{' '|str_repeat:($folderFoot.depth*2)}{$folderFoot.name}</option>
|
||||
<option{if ($media.only_path == $media.limit_path|cat:$folderFoot.relpath)} selected{/if} value="{$folderFoot.relpath}">{' '|str_repeat:($folderFoot.depth*2)}{$folderFoot.name}</option>{***}
|
||||
{/foreach}
|
||||
|
||||
</select>
|
||||
<input class="state_submit" name="toggle" type="submit" value="{$CONST.MOVE}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form_buttons">
|
||||
<input class="state_submit" name="toggle" 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}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.BULKMOVE}</span></a></span>
|
||||
</div>
|
||||
|
||||
<footer id="media_file_bulkmove" class="media_file_bulkmove additional_info">
|
||||
<span class="msg_notice">{$CONST.BULKMOVE_HELP_DESC}</span>
|
||||
</footer>
|
||||
{/if}
|
||||
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
</div>{* media library pane end *}
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* $Id$ */
|
||||
/*
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
@ -366,6 +365,11 @@
|
||||
+ '</div>';
|
||||
}
|
||||
|
||||
if (parent.self.opener.serendipity == undefined) {
|
||||
// in iframes, there is no opener, and the magnific popup is wrapped
|
||||
parent.self = window.parent.parent.$.magnificPopup;
|
||||
parent.self.opener = window.parent.parent;
|
||||
}
|
||||
parent.self.opener.serendipity.serendipity_imageSelector_addToBody(img, textarea);
|
||||
parent.self.close();
|
||||
}
|
||||
@ -493,7 +497,7 @@
|
||||
var media_rename = '{$CONST.ENTER_NEW_NAME}';
|
||||
if (newname = prompt(media_rename + fname, fname)) {
|
||||
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=rename&serendipity[fid]='+ escape(id) + '&serendipity[newname]='+ escape(newname) +'&serendipity[token]='+ media_token_url);
|
||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=rename&serendipity[fid]='+ escape(id) +'&serendipity[newname]='+ escape(newname) +'&serendipity[token]='+ media_token_url);
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,7 +505,7 @@
|
||||
serendipity.deleteFromML = function(id, fname) {
|
||||
if (confirm('{$CONST.DELETE}')) {
|
||||
var media_token_url = $('input[name*="serendipity[token]"]').val();
|
||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=doDelete&serendipity[fid]=' + escape(id) + '&serendipity[token]='+ media_token_url);
|
||||
$.post('?serendipity[adminModule]=images&serendipity[adminAction]=doDelete&serendipity[fid]='+ escape(id) +'&serendipity[token]='+ media_token_url);
|
||||
window.location.reload(false);
|
||||
}
|
||||
}
|
||||
|
@ -2291,6 +2291,13 @@ label .perm_name,
|
||||
.media_file h3 {
|
||||
margin: .5em 0 1em;
|
||||
}
|
||||
.media_file h3 {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 14em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.media_file .form_check input {
|
||||
position: relative;
|
||||
@ -2874,6 +2881,12 @@ img.mfp-img {
|
||||
}
|
||||
|
||||
/* SMALL SCREEN */
|
||||
@media only screen and (min-width: 360px) {
|
||||
.media_file h3 {
|
||||
width: 15em;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 480px) {
|
||||
#serendipityEntry {
|
||||
padding-top: 0;
|
||||
@ -3249,6 +3262,12 @@ img.mfp-img {
|
||||
|
||||
|
||||
/* LARGE SCREEN */
|
||||
@media only screen and (min-width: 860px) {
|
||||
.media_file h3 {
|
||||
width: 17em;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 900px) {
|
||||
#edit_entry_status_comments .form_check {
|
||||
margin-bottom: 0;
|
||||
@ -3324,6 +3343,12 @@ img.mfp-img {
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 950px) {
|
||||
.media_file h3 {
|
||||
width: 19em;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1024px) {
|
||||
#login .form_field input {
|
||||
width: auto;
|
||||
@ -3465,6 +3490,10 @@ img.mfp-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.media_file h3 {
|
||||
width: 14em;
|
||||
}
|
||||
|
||||
#login {
|
||||
margin: 4em auto 8em;
|
||||
}
|
||||
@ -3473,6 +3502,12 @@ img.mfp-img {
|
||||
|
||||
/* LARGER SCREENS */
|
||||
@media only screen and (min-width: 1280px) {
|
||||
.js .configuration_group .media_choose input {
|
||||
max-width: 42.5%;
|
||||
}
|
||||
.media_file h3 {
|
||||
width: 18em;
|
||||
}
|
||||
#edit_entry_metadata #categoryfilter {
|
||||
max-width: 22em;
|
||||
min-width: 0;
|
||||
@ -3483,4 +3518,7 @@ img.mfp-img {
|
||||
html {
|
||||
font-size: 1.125em;
|
||||
}
|
||||
.media_file h3 {
|
||||
width: 19em;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user