mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-10-30 21:52:00 +01:00
fixes #2595 batch manager: add multi-fields edition action
This commit is contained in:
1 parent
edb1c2a4aa
commit
49369fbbf9
11 files changed
+629
-22
No files matched your search
@@ -36,6 +36,7 @@ check_input_parameter('del_tags', $_POST, true, PATTERN_ID);
|
||||
check_input_parameter('associate', $_POST, true, PATTERN_ID);
|
||||
check_input_parameter('move', $_POST, false, PATTERN_ID);
|
||||
check_input_parameter('dissociate', $_POST, false, PATTERN_ID);
|
||||
check_input_parameter('mf_albums', $_POST, true, PATTERN_ID);
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | current selection |
|
||||
@@ -419,6 +420,186 @@ DELETE
|
||||
}
|
||||
}
|
||||
|
||||
else if ('multi_fields' == $action)
|
||||
{
|
||||
$enabled = isset($_POST['mf_enable']) ? $_POST['mf_enable'] : array();
|
||||
$enabled = array_flip($enabled);
|
||||
|
||||
if (count($enabled) == 0)
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one field');
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = array(
|
||||
'title' => array('col' => 'name', 'post' => 'mf_title', 'mode' => 'mf_title_mode'),
|
||||
'author' => array('col' => 'author', 'post' => 'mf_author', 'mode' => 'mf_author_mode'),
|
||||
'comment' => array('col' => 'comment', 'post' => 'mf_comment', 'mode' => 'mf_comment_mode'),
|
||||
);
|
||||
|
||||
$update_cols = array();
|
||||
foreach ($base as $key => $def)
|
||||
{
|
||||
if (isset($enabled[$key]))
|
||||
{
|
||||
$update_cols[] = $def['col'];
|
||||
}
|
||||
}
|
||||
|
||||
if (count($update_cols) > 0)
|
||||
{
|
||||
$datas = array();
|
||||
foreach ($collection as $image_id)
|
||||
{
|
||||
$row = array('id' => $image_id);
|
||||
foreach ($base as $key => $def)
|
||||
{
|
||||
if (isset($enabled[$key]))
|
||||
{
|
||||
$mode = $_POST[$def['mode']];
|
||||
if ('empty' == $mode)
|
||||
{
|
||||
$row[$def['col']] = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = $_POST[$def['post']];
|
||||
$row[$def['col']] = ($value === '') ? null : $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$datas[] = $row;
|
||||
}
|
||||
|
||||
mass_updates(
|
||||
IMAGES_TABLE,
|
||||
array('primary' => array('id'), 'update' => $update_cols),
|
||||
$datas
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($enabled['albums']))
|
||||
{
|
||||
check_input_parameter('mf_albums_mode', $_POST, false, '/^(associate|dissociate)$/');
|
||||
$mode = $_POST['mf_albums_mode'];
|
||||
|
||||
if (empty($_POST['mf_albums']))
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one album');
|
||||
}
|
||||
else
|
||||
{
|
||||
$album_ids = $_POST['mf_albums'];
|
||||
|
||||
if ('dissociate' == $mode)
|
||||
{
|
||||
foreach ($album_ids as $album_id)
|
||||
{
|
||||
dissociate_images_from_category($collection, $album_id);
|
||||
}
|
||||
$redirect = true;
|
||||
}
|
||||
else if ('associate' == $mode)
|
||||
{
|
||||
associate_images_to_categories($collection, $album_ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($enabled['tags']))
|
||||
{
|
||||
check_input_parameter('mf_tags_mode', $_POST, false, '/^(replace|add|empty|remove)$/');
|
||||
$mode = $_POST['mf_tags_mode'];
|
||||
|
||||
if ('empty' == $mode)
|
||||
{
|
||||
$tags_of = array();
|
||||
foreach ($collection as $image_id)
|
||||
{
|
||||
$tags_of[$image_id] = array();
|
||||
}
|
||||
set_tags_of($tags_of);
|
||||
}
|
||||
else if (empty($_POST['mf_tags']))
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one tag');
|
||||
}
|
||||
else
|
||||
{
|
||||
if ('remove' == $mode)
|
||||
{
|
||||
check_input_parameter('mf_tags', $_POST, true, PATTERN_ID);
|
||||
$tag_ids = $_POST['mf_tags'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$tag_ids = get_tag_ids($_POST['mf_tags']);
|
||||
}
|
||||
if ('replace' == $mode)
|
||||
{
|
||||
$tags_of = array();
|
||||
foreach ($collection as $image_id)
|
||||
{
|
||||
$tags_of[$image_id] = $tag_ids;
|
||||
}
|
||||
set_tags_of($tags_of);
|
||||
}
|
||||
else if ('remove' == $mode)
|
||||
{
|
||||
$taglist_before = get_image_tag_ids($collection);
|
||||
|
||||
$query = '
|
||||
DELETE
|
||||
FROM '.IMAGE_TAG_TABLE.'
|
||||
WHERE image_id IN ('.implode(',', $collection).')
|
||||
AND tag_id IN ('.implode(',', $tag_ids).')
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$taglist_after = get_image_tag_ids($collection);
|
||||
$images_to_update = compare_image_tag_lists($taglist_before, $taglist_after);
|
||||
update_images_lastmodified($images_to_update);
|
||||
|
||||
if (isset($_SESSION['bulk_manager_filter']['tags'])
|
||||
&& count(array_intersect($_SESSION['bulk_manager_filter']['tags'], $tag_ids)))
|
||||
{
|
||||
$redirect = true;
|
||||
}
|
||||
}
|
||||
else if ('add' == $mode)
|
||||
{
|
||||
add_tags($tag_ids, $collection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$mode_rules = array(
|
||||
'title' => array('post' => 'mf_title_mode', 'allowed' => array('replace', 'empty'), 'default' => 'replace'),
|
||||
'author' => array('post' => 'mf_author_mode', 'allowed' => array('replace', 'empty'), 'default' => 'replace'),
|
||||
'comment' => array('post' => 'mf_comment_mode', 'allowed' => array('replace', 'empty'), 'default' => 'replace'),
|
||||
'albums' => array('post' => 'mf_albums_mode', 'allowed' => array('associate', 'dissociate'), 'default' => 'associate'),
|
||||
'tags' => array('post' => 'mf_tags_mode', 'allowed' => array('add', 'replace', 'empty', 'remove'), 'default' => 'add'),
|
||||
);
|
||||
|
||||
$activity_fields = array();
|
||||
foreach ($mode_rules as $field => $rule)
|
||||
{
|
||||
if (isset($enabled[$field]))
|
||||
{
|
||||
$mode = isset($_POST[$rule['post']]) ? $_POST[$rule['post']] : $rule['default'];
|
||||
$activity_fields[$field] = in_array($mode, $rule['allowed'], true) ? $mode : $rule['default'];
|
||||
}
|
||||
}
|
||||
|
||||
pwg_activity('photo', $collection, 'edit', array('action' => 'multi_fields', 'fields' => $activity_fields));
|
||||
|
||||
if (empty($page['errors']))
|
||||
{
|
||||
$page['infos'][] = l10n('Information data registered in database');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!in_array($action, array('remove_from_caddie','add_to_caddie','delete_derivatives','generate_derivatives')))
|
||||
{
|
||||
invalidate_user_cache();
|
||||
|
||||
@@ -834,7 +834,9 @@ li.plupload_delete a.remove-format:hover{color: #474747;}
|
||||
background-color: #fafafa;
|
||||
box-shadow: 0px 2px #00000024;
|
||||
}
|
||||
.breadcrumb-item:hover {
|
||||
.breadcrumb-item:hover,
|
||||
#batchManagerGlobal .head-button-2:hover,
|
||||
#batchManagerGlobal .head-button-2:hover p {
|
||||
background: #ffd7ad;
|
||||
}
|
||||
.breadcrumb-item .icon-cancel-circled:hover {
|
||||
|
||||
@@ -19,6 +19,10 @@ or
|
||||
align-items: baseline;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
transition: all 125ms ease-out;
|
||||
}
|
||||
.head-button-2 p {
|
||||
transition: all 125ms ease-out;
|
||||
}
|
||||
|
||||
.head-button-1:active, .head-button-2:active {
|
||||
|
||||
@@ -59,6 +59,22 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
const ab_multi_fields = new AlbumSelector({
|
||||
adminMode: true,
|
||||
selectAlbum: select_multi_fields_album,
|
||||
removeSelectedAlbum: remove_multi_fields_album,
|
||||
});
|
||||
|
||||
$('#multi_fields_select_album').on('click', function () {
|
||||
ab_multi_fields.open();
|
||||
});
|
||||
|
||||
$('.multi-fields-selected-albums').on('click', (e) => {
|
||||
if (e.target.classList.contains("remove-associate")) {
|
||||
ab_multi_fields.remove_selected_album($(e.target).attr('id'));
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/* ********** Album Selector */
|
||||
@@ -81,6 +97,47 @@ function remove_album_action({ id_album, getSelectedAlbum }) {
|
||||
}
|
||||
}
|
||||
|
||||
function select_multi_fields_album({ album, addSelectedAlbum }) {
|
||||
$('#multi_fields_select_album p').html(str_add_alb_associate);
|
||||
$('.multi-fields-selected-albums').append(
|
||||
`<div class="selected-associate-item">
|
||||
<span>${album.name}</span><span id="${album.id}" class="remove-associate icon-cancel-circled"></span>
|
||||
<input type="hidden" name="mf_albums[]" value="${album.id}">
|
||||
</div>`
|
||||
);
|
||||
hideError("form");
|
||||
update_multi_fields_album_button();
|
||||
addSelectedAlbum();
|
||||
}
|
||||
|
||||
function remove_multi_fields_album({ id_album, getSelectedAlbum }) {
|
||||
$('.multi-fields-selected-albums').find(`#${id_album}`).parent().remove();
|
||||
const selected = getSelectedAlbum();
|
||||
if (!selected.length) {
|
||||
$('#multi_fields_select_album p').html(str_select_alb_associate);
|
||||
}
|
||||
if (selected.length) {
|
||||
hideError("form");
|
||||
}
|
||||
update_multi_fields_album_button();
|
||||
}
|
||||
|
||||
function update_multi_fields_album_button() {
|
||||
const hasSelectedAlbums = $('.multi-fields-selected-albums').children().length > 0;
|
||||
$('#multi_fields_select_album')
|
||||
.toggleClass('head-button-2', !hasSelectedAlbums)
|
||||
.toggleClass('head-button-1', hasSelectedAlbums);
|
||||
}
|
||||
|
||||
function displayError(error, text) {
|
||||
var $error = $("[data-error='" + error + "']");
|
||||
$error.text(text).css("visibility", "visible");
|
||||
}
|
||||
|
||||
function hideError(error) {
|
||||
$("[data-error='" + error + "']").css("visibility", "hidden");
|
||||
}
|
||||
|
||||
|
||||
jQuery("a.preview-box").colorbox( {photo: true} );
|
||||
|
||||
@@ -102,6 +159,112 @@ jQuery(function() {
|
||||
jQuery('[data-add-album]').pwgAddAlbum();
|
||||
});
|
||||
|
||||
jQuery(function() {
|
||||
$("#action_multi_fields .mf-row").each(function() {
|
||||
var $row = $(this);
|
||||
var $toggle = $row.find(".switch input");
|
||||
var $mode = $row.find(".mf-modes input[type=radio]");
|
||||
var $content = $row.find(".mf-content");
|
||||
var $tagSelect = $content.find("select[name='mf_tags[]']");
|
||||
var tagsMode = null;
|
||||
var selectizeCreate;
|
||||
|
||||
function switchTagsList(mode) {
|
||||
var selectize = $tagSelect[0] && $tagSelect[0].selectize;
|
||||
if (!selectize) return;
|
||||
|
||||
if (selectizeCreate === undefined) {
|
||||
selectizeCreate = selectize.settings.create;
|
||||
}
|
||||
|
||||
var isRemove = (mode === "remove");
|
||||
if (tagsMode === isRemove) return;
|
||||
tagsMode = isRemove;
|
||||
|
||||
selectize.clear(true);
|
||||
|
||||
if (isRemove) {
|
||||
if (!selectize._allOptions) {
|
||||
selectize._allOptions = $.extend(true, {}, selectize.options);
|
||||
}
|
||||
selectize.clearOptions();
|
||||
selectize.settings.create = false;
|
||||
var delTagsSelectize = $("select[name='del_tags[]']")[0];
|
||||
var removeOptions = delTagsSelectize && delTagsSelectize.selectize
|
||||
? delTagsSelectize.selectize.options
|
||||
: {};
|
||||
$.each(removeOptions, function (id, tag) {
|
||||
selectize.addOption(tag);
|
||||
});
|
||||
} else {
|
||||
if (selectize._allOptions) {
|
||||
selectize.clearOptions();
|
||||
$.each(selectize._allOptions, function (id, opt) {
|
||||
selectize.addOption(opt);
|
||||
});
|
||||
}
|
||||
selectize.settings.create = selectizeCreate;
|
||||
}
|
||||
selectize.refreshOptions(false);
|
||||
}
|
||||
|
||||
function resetRow() {
|
||||
$content.find("input[type=text], textarea").val("");
|
||||
$row.find(".multi-fields-selected-albums").empty();
|
||||
update_multi_fields_album_button();
|
||||
|
||||
$content.find("select").each(function() {
|
||||
if (this.selectize) {
|
||||
this.selectize.clear();
|
||||
} else {
|
||||
$(this).val(null);
|
||||
}
|
||||
});
|
||||
|
||||
$mode.each(function() {
|
||||
this.checked = this.defaultChecked;
|
||||
});
|
||||
tagsMode = null;
|
||||
switchTagsList($mode.filter(":checked").val());
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
var on = $toggle.is(":checked");
|
||||
var mode = $mode.filter(":checked").val();
|
||||
$row.toggleClass("mf-active", on);
|
||||
$row.find(".mf-modes").toggle(on);
|
||||
$content.toggle(on && mode !== "empty");
|
||||
if ($row.data("field") === "tags") {
|
||||
switchTagsList(mode);
|
||||
}
|
||||
}
|
||||
|
||||
$toggle.on("change", function() {
|
||||
hideError("form");
|
||||
if (!this.checked) {
|
||||
resetRow();
|
||||
}
|
||||
refresh();
|
||||
});
|
||||
|
||||
$mode.on("change", function() {
|
||||
if ($row.data("field") === "tags" && $(this).val() === "empty") {
|
||||
hideError("form");
|
||||
}
|
||||
refresh();
|
||||
});
|
||||
|
||||
$tagSelect.on("change", function() {
|
||||
var selectedTags = $(this).val();
|
||||
if (selectedTags && selectedTags.length) {
|
||||
hideError("form");
|
||||
}
|
||||
});
|
||||
|
||||
refresh();
|
||||
});
|
||||
});
|
||||
|
||||
$("input[name=remove_author]").click(function () {
|
||||
if ($(this).is(':checked')) {
|
||||
$("input[name=author]").hide();
|
||||
@@ -244,7 +407,35 @@ jQuery('#applyAction').click(function(e) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (jQuery('[name="selectAction"]').val() == 'metadata') {
|
||||
var action = jQuery('[name="selectAction"]').val();
|
||||
if (action == 'multi_fields') {
|
||||
var $enabledFields = jQuery('input[name="mf_enable[]"]:checked');
|
||||
var $tagsField = jQuery('input[name="mf_enable[]"][value="tags"]');
|
||||
var tagsMode = jQuery('input[name="mf_tags_mode"]:checked').val();
|
||||
|
||||
if (!$enabledFields.length) {
|
||||
displayError("form", lang.selectField);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
if (jQuery('input[name="mf_enable[]"][value="albums"]').is(':checked')
|
||||
&& !jQuery('input[name="mf_albums[]"]').length) {
|
||||
displayError("form", str_select_album);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
var selectedTags = jQuery('select[name="mf_tags[]"]').val();
|
||||
if ($tagsField.is(':checked')
|
||||
&& tagsMode !== 'empty'
|
||||
&& (!selectedTags || !selectedTags.length)) {
|
||||
displayError("form", str_select_tag);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
hideError("form");
|
||||
|
||||
if (action == 'metadata') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
jQuery('.bulkAction').hide();
|
||||
@@ -318,7 +509,10 @@ jQuery('#applyAction').click(function(e) {
|
||||
|
||||
if (jQuery('[name="selectAction"]').val() == 'delete') {
|
||||
if (!jQuery("#confirmDel input[name=confirm_deletion]").is(':checked')) {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "visible");
|
||||
displayError(
|
||||
"form",
|
||||
lang.confirmDeletion
|
||||
);
|
||||
return false;
|
||||
}
|
||||
e.stopPropagation();
|
||||
@@ -422,7 +616,7 @@ function progress_bar(val, max, success) {
|
||||
}
|
||||
|
||||
jQuery("#confirmDel input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "hidden");
|
||||
hideError("form");
|
||||
});
|
||||
|
||||
jQuery('#sync_md5sum').click(function(e) {
|
||||
@@ -524,4 +718,3 @@ function delete_orphans_block(blockSize) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ var lang = {
|
||||
deleteProgressMessage: "{'Deletion in progress'|translate|escape:'javascript'}",
|
||||
syncProgressMessage: "{'Synchronization in progress'|translate|escape:'javascript'}",
|
||||
AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}",
|
||||
confirmDeletion: "{'You need to confirm deletion'|translate|escape:'javascript'}",
|
||||
selectField: "{'Select at least one field'|translate|escape:'javascript'}",
|
||||
generateMsg: "{'Generate multiple size images'|@translate}"
|
||||
};
|
||||
|
||||
@@ -242,7 +244,7 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
jQuery("input[name=confirm_deletion]").change(function() {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "hidden");
|
||||
hideError("form");
|
||||
});
|
||||
|
||||
jQuery('#applyAction').click(function() {
|
||||
@@ -251,7 +253,10 @@ $(document).ready(function() {
|
||||
let d_count = $('#confirmDel input[type=checkbox]').filter(':checked').length
|
||||
let e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length;
|
||||
if (!jQuery("#confirmDel input[name=confirm_deletion]").is(':checked')) {
|
||||
jQuery("#confirmDel span.errors").css("visibility", "visible");
|
||||
displayError(
|
||||
"form",
|
||||
lang.confirmDeletion
|
||||
);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@@ -420,6 +425,7 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
{/if}
|
||||
<option value="delete_derivatives">{'Delete multiple size images'|@translate}</option>
|
||||
<option value="generate_derivatives">{'Generate multiple size images'|@translate}</option>
|
||||
<option value="multi_fields">{'Multi-fields edition'|@translate}</option>
|
||||
{if !empty($element_set_global_plugins_actions)}
|
||||
{foreach from=$element_set_global_plugins_actions item=action}
|
||||
<option value="{$action.ID}">{$action.NAME}</option>
|
||||
@@ -432,7 +438,7 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
<span class="icon-check"></span>
|
||||
<input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</input>
|
||||
</label><br/><br/>
|
||||
<span class="errors" style="visibility:hidden;margin:0;">{"You need to confirm deletion"|translate}</span>
|
||||
<span class="errors" data-error="form" style="display:block;min-height:1.2em;visibility:hidden;margin:0;"></span>
|
||||
</p>
|
||||
<p id="applyActionBlock" style="display:none;margin:1em 0 0 0;" class="actionButtons">
|
||||
<button id="applyAction" name="submit" type="submit" class="buttonLike">
|
||||
@@ -546,6 +552,76 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
<!-- multi_fields -->
|
||||
<div id="action_multi_fields" class="bulkAction">
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_begin *}
|
||||
<div class="mf-row" data-field="title">
|
||||
<label class="switch"><input type="checkbox" name="mf_enable[]" value="title"><span class="slider round"></span></label>
|
||||
<span class="mf-label">{'Title'|@translate}</span>
|
||||
<div class="mf-modes">
|
||||
<label><input type="radio" name="mf_title_mode" value="replace" checked> {'Replace'|@translate}</label>
|
||||
<label><input type="radio" name="mf_title_mode" value="empty"> {'Empty'|@translate}</label>
|
||||
</div>
|
||||
<div class="mf-content">
|
||||
<input type="text" class="large" name="mf_title">
|
||||
</div>
|
||||
</div>
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_under_title *}
|
||||
<div class="mf-row" data-field="author">
|
||||
<label class="switch"><input type="checkbox" name="mf_enable[]" value="author"><span class="slider round"></span></label>
|
||||
<span class="mf-label">{'Author'|@translate}</span>
|
||||
<div class="mf-modes">
|
||||
<label><input type="radio" name="mf_author_mode" value="replace" checked> {'Replace'|@translate}</label>
|
||||
<label><input type="radio" name="mf_author_mode" value="empty"> {'Empty'|@translate}</label>
|
||||
</div>
|
||||
<div class="mf-content">
|
||||
<input type="text" class="large" name="mf_author">
|
||||
</div>
|
||||
</div>
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_under_author *}
|
||||
<div class="mf-row" data-field="albums">
|
||||
<label class="switch"><input type="checkbox" name="mf_enable[]" value="albums"><span class="slider round"></span></label>
|
||||
<span class="mf-label">{'Linked albums'|@translate}</span>
|
||||
<div class="mf-modes">
|
||||
<label><input type="radio" name="mf_albums_mode" value="associate" checked> {'Associate'|@translate}</label>
|
||||
<label><input type="radio" name="mf_albums_mode" value="dissociate"> {'Dissociate'|@translate}</label>
|
||||
</div>
|
||||
<div class="mf-content">
|
||||
<div class="head-button-2 icon-plus-circled" id="multi_fields_select_album">
|
||||
<p>{"Add"|translate}</p>
|
||||
</div>
|
||||
<div class="multi-fields-selected-albums"></div>
|
||||
</div>
|
||||
</div>
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_under_albums *}
|
||||
<div class="mf-row" data-field="tags">
|
||||
<label class="switch"><input type="checkbox" name="mf_enable[]" value="tags"><span class="slider round"></span></label>
|
||||
<span class="mf-label">{'Tags'|@translate}</span>
|
||||
<div class="mf-modes">
|
||||
<label><input type="radio" name="mf_tags_mode" value="add" checked> {'Add'|@translate}</label>
|
||||
<label><input type="radio" name="mf_tags_mode" value="replace"> {'Replace'|@translate}</label>
|
||||
<label><input type="radio" name="mf_tags_mode" value="remove"> {'Remove'|@translate}</label>
|
||||
<label><input type="radio" name="mf_tags_mode" value="empty"> {'Empty'|@translate}</label>
|
||||
</div>
|
||||
<div class="mf-content">
|
||||
<select data-selectize="tags" data-create="true" name="mf_tags[]" multiple class="large" placeholder="{'Type in a search term'|translate}"></select>
|
||||
</div>
|
||||
</div>
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_under_tags *}
|
||||
<div class="mf-row" data-field="comment">
|
||||
<label class="switch"><input type="checkbox" name="mf_enable[]" value="comment"><span class="slider round"></span></label>
|
||||
<span class="mf-label">{'Description'|@translate}</span>
|
||||
<div class="mf-modes">
|
||||
<label><input type="radio" name="mf_comment_mode" value="replace" checked> {'Replace'|@translate}</label>
|
||||
<label><input type="radio" name="mf_comment_mode" value="empty"> {'Empty'|@translate}</label>
|
||||
</div>
|
||||
<div class="mf-content">
|
||||
<textarea name="mf_comment" rows="4"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
{* tplhook_admin_bulkmanager_multifieldsedition_end *}
|
||||
</div>
|
||||
|
||||
<!-- plugins -->
|
||||
{if !empty($element_set_global_plugins_actions)}
|
||||
{foreach from=$element_set_global_plugins_actions item=action}
|
||||
@@ -584,27 +660,41 @@ UL.thumbnails SPAN.wrap2 {ldelim}
|
||||
}
|
||||
|
||||
#action_add_tags .item,
|
||||
#action_add_tags .item.active {
|
||||
#action_add_tags .item.active,
|
||||
#action_multi_fields .selectize-input .item,
|
||||
#action_multi_fields .selectize-input .item.active {
|
||||
background-image:none;
|
||||
background-color: #ffa646;
|
||||
border-color: transparent;
|
||||
color: black;
|
||||
|
||||
border: 0px;
|
||||
color: #3C3C3C;
|
||||
margin: -1px 8px -1px 0;
|
||||
border-radius: 20px;
|
||||
padding: 4px 20px 4px 7px;
|
||||
font-family: "Open Sans";
|
||||
font-weight: 600;
|
||||
line-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#action_add_tags .item .remove,
|
||||
#action_add_tags .item .remove {
|
||||
background-color: transparent;
|
||||
border-top-right-radius: 20px;
|
||||
border-bottom-right-radius: 20px;
|
||||
color: black;
|
||||
|
||||
border-left: 1px solid transparent;
|
||||
|
||||
#action_multi_fields .selectize-input .item .remove {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0;
|
||||
font-size: 15px;
|
||||
color: #3C3C3C;
|
||||
border: 0;
|
||||
}
|
||||
#action_add_tags .item .remove:hover,
|
||||
#action_add_tags .item .remove:hover {
|
||||
#action_multi_fields .selectize-input .item .remove:hover {
|
||||
background-color: #ff7700;
|
||||
border-top-right-radius: 20px;
|
||||
border-bottom-right-radius: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -7221,6 +7221,7 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.selected-associate-item:hover {
|
||||
@@ -7236,6 +7237,119 @@ li.plupload_delete a:hover {background: url("images/cancelhover.svg")!important;
|
||||
color: #ff7700;
|
||||
}
|
||||
|
||||
.permitActionItem:has(#action_multi_fields[style="display: block;"]) {
|
||||
width: 100%;
|
||||
max-width: 650px;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#action_multi_fields {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#action_multi_fields .mf-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
gap: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
#action_multi_fields .mf-label {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
font-family: "Open Sans";
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
color: #323232;
|
||||
}
|
||||
#action_multi_fields .mf-modes {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
margin-left: auto;
|
||||
gap: 0;
|
||||
}
|
||||
#action_multi_fields .mf-modes label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin: 0;
|
||||
padding: 3px 10px 2px;
|
||||
background: #F3F3F3;
|
||||
border-bottom: 2px solid #DBDBDB;
|
||||
color: #898989;
|
||||
}
|
||||
#action_multi_fields .mf-modes label:has(input:checked) {
|
||||
background: #F4A83C;
|
||||
border-bottom: 2px solid #C88A2F;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
#action_multi_fields .mf-modes input[type="radio"] {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
flex: 0 0 auto;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
margin-bottom: -2px;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #898989;
|
||||
position: relative;
|
||||
background-color: transparent;
|
||||
}
|
||||
#action_multi_fields .mf-modes input[type="radio"]:checked {
|
||||
border-color: #493C21;
|
||||
background: radial-gradient(circle at center, #493C21 0, #493C21 2.5px, transparent 3px);
|
||||
}
|
||||
#action_multi_fields .mf-content {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
min-width: 0;
|
||||
margin-left: 70px;
|
||||
max-width: calc(100% - 70px);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#action_multi_fields .mf-content select,
|
||||
#action_multi_fields .mf-content .selectize-control,
|
||||
#action_multi_fields .mf-content input[type="text"],
|
||||
#action_multi_fields .mf-content textarea {
|
||||
width: 100%;
|
||||
}
|
||||
#action_multi_fields input[type="text"],
|
||||
#action_multi_fields textarea,
|
||||
#action_multi_fields .selectize-input {
|
||||
padding: 6px 8px;
|
||||
box-shadow: none;
|
||||
border: 2px solid #D3D3D3;
|
||||
background: #ffffff;
|
||||
border-radius: 5px;
|
||||
font-family: "Open Sans";
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #3C3C3C;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#action_multi_fields .head-button-1,
|
||||
#action_multi_fields .head-button-1 p {
|
||||
color: #3C3C3C;
|
||||
background: #ffa646;
|
||||
}
|
||||
#action_multi_fields .mf-row[data-field="albums"] .mf-content {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
#action_multi_fields .multi-fields-selected-albums {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
#action_multi_fields .mf-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* album manager */
|
||||
.selectedAlbum.cat-list-album-path {
|
||||
margin: 30px 0 30px 0;
|
||||
|
||||
@@ -988,7 +988,7 @@ table.qsearch_help_table td {
|
||||
.afterUploadActions a.secondary_button:hover {background-color: #ffa744;color: #3C3C3C;}
|
||||
|
||||
|
||||
.font-checkbox {color: #898888;}
|
||||
.font-checkbox, #action_multi_fields .mf-label {color: #898888;}
|
||||
.font-checkbox:hover {color: #ededed;}
|
||||
.font-checkbox:hover .icon-check-empty, .font-checkbox:hover .icon-check {color: #FF7700;}
|
||||
.font-checkbox .icon-check {color: #FFA646;}
|
||||
@@ -1132,6 +1132,17 @@ li.plupload_delete a.remove-format:hover{color: #c0c0c0;}
|
||||
|
||||
.pageNumberSelected {background-color: #b4b4b4;}
|
||||
#action_title .large, #action_author .large {background-color: #333; color: #fefefe;}
|
||||
#action_multi_fields input[type="text"], #action_multi_fields textarea, #action_multi_fields .selectize-input {background-color: #333; color: #fefefe; border-color: #787777a6}
|
||||
#action_multi_fields .mf-modes label:has(input:checked) {
|
||||
background: #F4A83C;
|
||||
border-bottom: 2px solid #C88A2F;
|
||||
color: rgb(73, 60, 33);
|
||||
}
|
||||
#action_multi_fields .mf-modes label {
|
||||
background: #333;
|
||||
border-bottom: 2px solid #0000007a;
|
||||
color: #898989;
|
||||
}
|
||||
#addFilter optgroup, #batchManagerGlobal option[disabled] {background-color: #555;}
|
||||
.dimension-cancel {background-color: #555 !important;}
|
||||
.pageNumberSelected {color: #777 !important; font-weight: bold;}
|
||||
|
||||
@@ -1443,5 +1443,7 @@ $lang['You are about to delete %s groups, are you sure?'] = 'You are about to de
|
||||
$lang['Users not logged in will have these permissions applied. Grant access to private albums only with great caution.'] = 'Users not logged in will have these permissions applied. Grant access to private albums only with great caution.';
|
||||
$lang['single day'] = 'Single day';
|
||||
$lang['period'] = 'Period';
|
||||
$lang['Multi-fields edition']='Multi-fields edition';
|
||||
$lang['Select at least one field']='Select at least one field';
|
||||
|
||||
// Leave this line empty
|
||||
@@ -534,3 +534,7 @@ $lang['If you changed your password because you think it was stolen, we recommen
|
||||
$lang['Too many attempts, please try later..'] = 'Too many attempts, please try later..';
|
||||
$lang['Verification successful! You can now choose a new password.'] = 'Verification successful! You can now choose a new password.';
|
||||
$lang['If your account exists, a verification code has been sent to your email address.'] = 'If your account exists, a verification code has been sent to your email address.';
|
||||
$lang['Replace'] = 'Replace';
|
||||
$lang['Empty'] = 'Empty';
|
||||
$lang['Associate'] = 'Associate';
|
||||
$lang['Dissociate'] = 'Dissociate';
|
||||
@@ -1450,5 +1450,7 @@ $lang['You are about to delete %s groups, are you sure?'] = 'Vous êtes sur le p
|
||||
$lang['Users not logged in will have these permissions applied. Grant access to private albums only with great caution.'] = 'Ces permissions s\'appliqueront aux utilisateurs non connectés. Faites ainsi preuve de la plus grande précaution en accordant l\'accès aux albums privés.';
|
||||
$lang['single day'] = 'Jour unique';
|
||||
$lang['period'] = 'Période';
|
||||
$lang['Multi-fields edition']='Édition multi-champs';
|
||||
$lang['Select at least one field']='Sélectionnez au moins un champ';
|
||||
|
||||
// Leave this line empty
|
||||
@@ -533,3 +533,7 @@ $lang['If you changed your password because you think it was stolen, we recommen
|
||||
$lang['Too many attempts, please try later..'] = 'Trop de tentatives, veuillez réessayer plus tard..';
|
||||
$lang['Verification successful! You can now choose a new password.'] = 'Vérification réussie ! Vous pouvez maintenant choisir un nouveau mot de passe.';
|
||||
$lang['If your account exists, a verification code has been sent to your email address.'] = 'Si votre compte existe, un code de vérification a été envoyé à votre adresse email.';
|
||||
$lang['Replace'] = 'Remplacer';
|
||||
$lang['Empty'] = 'Vider';
|
||||
$lang['Associate'] = 'Associer';
|
||||
$lang['Dissociate'] = 'Dissocier';
|
||||
Reference in new issue
Block a user