mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-11 19:23:01 +02:00
fixes #1596 plugin filters work fine now
This commit is contained in:
@@ -160,11 +160,13 @@ if (count($missing_plugin_ids) > 0)
|
|||||||
{
|
{
|
||||||
$tpl_plugins[] = array(
|
$tpl_plugins[] = array(
|
||||||
'NAME' => $plugin_id,
|
'NAME' => $plugin_id,
|
||||||
|
'ID' => $plugin_id,
|
||||||
'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'],
|
'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'],
|
||||||
'DESC' => l10n('ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW.'),
|
'DESC' => l10n('ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW.'),
|
||||||
'U_ACTION' => sprintf($action_url, $plugin_id),
|
'U_ACTION' => sprintf($action_url, $plugin_id),
|
||||||
'STATE' => 'missing',
|
'STATE' => 'missing',
|
||||||
);
|
);
|
||||||
|
$count_types_plugins['missing']++;
|
||||||
}
|
}
|
||||||
$template->append('plugin_states', 'missing');
|
$template->append('plugin_states', 'missing');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,11 +213,16 @@ function uninstallPlugin(id) {
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
nb_plugin.other -=1;
|
nb_plugin.other -=1;
|
||||||
nb_plugin.all -=1;
|
nb_plugin.all -=1;
|
||||||
actualizeFilter()
|
actualizeFilter();
|
||||||
|
$("#"+id).remove();
|
||||||
},
|
},
|
||||||
error: function (e) {
|
error: function (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
console.log("It didn't work");
|
console.log("It didn't work");
|
||||||
|
$("#" + id + " .pluginNotif").stop(false, true);
|
||||||
|
$("#" + id + " .PluginActionError label span:first").html(plugin_action_error);
|
||||||
|
$("#" + id + " .PluginActionError").css("display", "flex");
|
||||||
|
$("#" + id + " .PluginActionError").delay(1500).fadeOut(2500);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -264,7 +269,8 @@ $(document).ready(function () {
|
|||||||
if (!$(this).hasClass("plugin-active")) {
|
if (!$(this).hasClass("plugin-active")) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
$("#seeActive").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$(".pluginMiniBox").show();
|
$(".pluginMiniBox").show();
|
||||||
}
|
}
|
||||||
@@ -405,7 +411,7 @@ $(document).ready(function () {
|
|||||||
let plugin_name = $(this).closest(".pluginContent").find(".pluginMiniBoxNameCell").html().trim();
|
let plugin_name = $(this).closest(".pluginContent").find(".pluginMiniBoxNameCell").html().trim();
|
||||||
let plugin_id = $(this).closest(".pluginContent").parent().attr("id");
|
let plugin_id = $(this).closest(".pluginContent").parent().attr("id");
|
||||||
$.confirm({
|
$.confirm({
|
||||||
title: restore_plugin_msg.replace('%s', plugin_name),
|
title: uninstall_plugin_msg.replace('%s', plugin_name),
|
||||||
buttons: {
|
buttons: {
|
||||||
confirm: {
|
confirm: {
|
||||||
text: confirm_msg,
|
text: confirm_msg,
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ const cancel_msg = "{"No, I have changed my mind"|@translate}";
|
|||||||
let delete_plugin_msg = '{'Are you sure you want to delete the plugin "%s"?'|@translate|@escape:'javascript'}';
|
let delete_plugin_msg = '{'Are you sure you want to delete the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||||
let deleted_plugin_msg = '{'Plugin "%s" deleted!'|@translate|@escape:'javascript'}';
|
let deleted_plugin_msg = '{'Plugin "%s" deleted!'|@translate|@escape:'javascript'}';
|
||||||
let restore_plugin_msg = '{'Are you sure you want to restore the plugin "%s"?'|@translate|@escape:'javascript'}';
|
let restore_plugin_msg = '{'Are you sure you want to restore the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||||
|
let uninstall_plugin_msg = '{'Are you sure you want to uninstall the plugin "%s"?'|@translate|@escape:'javascript'}';
|
||||||
const restore_tip_msg = "{'Restore default configuration. You will lose your plugin settings!'|@translate|@escape:'javascript'}";
|
const restore_tip_msg = "{'Restore default configuration. You will lose your plugin settings!'|@translate|@escape:'javascript'}";
|
||||||
const plugin_added_str = '{'Activated'|@translate|@escape:'javascript'}';
|
const plugin_added_str = '{'Activated'|@translate|@escape:'javascript'}';
|
||||||
const plugin_deactivated_str = '{'Deactivated'|@translate|@escape:'javascript'}';
|
const plugin_deactivated_str = '{'Deactivated'|@translate|@escape:'javascript'}';
|
||||||
@@ -262,6 +263,8 @@ function actualizeFilter() {
|
|||||||
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
|
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
|
||||||
$("label[for='seeOther'] .filter-badge").html(nb_plugin.other);
|
$("label[for='seeOther'] .filter-badge").html(nb_plugin.other);
|
||||||
|
|
||||||
|
console.log(nb_plugin)
|
||||||
|
|
||||||
$(".filterLabel").show();
|
$(".filterLabel").show();
|
||||||
$(".pluginMiniBox").each(function () {
|
$(".pluginMiniBox").each(function () {
|
||||||
if (nb_plugin.active == 0) {
|
if (nb_plugin.active == 0) {
|
||||||
@@ -405,11 +408,11 @@ jQuery(".pluginMiniBox").each(function(index){
|
|||||||
{/if}
|
{/if}
|
||||||
{elseif $plugin.STATE == 'missing'}
|
{elseif $plugin.STATE == 'missing'}
|
||||||
<div class="tiptip" title="{'Uninstall'|@translate}">
|
<div class="tiptip" title="{'Uninstall'|@translate}">
|
||||||
<a class="uninstall-plugin-button" href="{$plugin.U_ACTION}&action=uninstall"></a>
|
<a class="uninstall-plugin-button">{'Uninstall'|@translate}</a>
|
||||||
</div>
|
</div>
|
||||||
{elseif $plugin.STATE == 'merged'}
|
{elseif $plugin.STATE == 'merged'}
|
||||||
<div class="tiptip" title="{'Delete'|@translate}">
|
<div class="tiptip" title="{'Delete'|@translate}">
|
||||||
<a class="" href="{$plugin.U_ACTION}&action=delete"></a>
|
<a class="" href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
@@ -442,7 +445,7 @@ jQuery(".pluginMiniBox").each(function(index){
|
|||||||
<a class="pluginUnavailableAction icon-cog tiptip" title="{'N/A'|translate}">{'Settings'|@translate}</a>
|
<a class="pluginUnavailableAction icon-cog tiptip" title="{'N/A'|translate}">{'Settings'|@translate}</a>
|
||||||
{/if}
|
{/if}
|
||||||
{elseif $plugin.STATE == 'missing'}
|
{elseif $plugin.STATE == 'missing'}
|
||||||
<a class="pluginActionLevel3 uninstall-plugin-button" href="{$plugin.U_ACTION}&action=uninstall">{'Uninstall'|@translate}</a>
|
<a class="pluginActionLevel3 uninstall-plugin-button">{'Uninstall'|@translate}</a>
|
||||||
{elseif $plugin.STATE == 'merged'}
|
{elseif $plugin.STATE == 'merged'}
|
||||||
<a class="pluginActionLevel3" href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
<a class="pluginActionLevel3" href="{$plugin.U_ACTION}&action=delete">{'Delete'|@translate}</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -1066,6 +1066,7 @@ $lang['Are you sure you want to delete the ratings of the user "%s"?'] = 'Are yo
|
|||||||
$lang['Are you sure you want to install the plugin "%s"?'] = 'Are you sure you want to install the plugin "%s"?';
|
$lang['Are you sure you want to install the plugin "%s"?'] = 'Are you sure you want to install the plugin "%s"?';
|
||||||
$lang['Are you sure you want to delete the plugin "%s"?'] = 'Are you sure you want to delete the plugin "%s"?';
|
$lang['Are you sure you want to delete the plugin "%s"?'] = 'Are you sure you want to delete the plugin "%s"?';
|
||||||
$lang['Are you sure you want to restore the plugin "%s"?'] = 'Are you sure you want to restore the plugin "%s"?';
|
$lang['Are you sure you want to restore the plugin "%s"?'] = 'Are you sure you want to restore the plugin "%s"?';
|
||||||
|
$lang['Are you sure you want to uninstall the plugin "%s"?'] = 'Are you sure you want to uninstall the plugin "%s"?';
|
||||||
$lang['Are you sure you want to delete all sizes?'] = 'Are you sure you want to delete all sizes?';
|
$lang['Are you sure you want to delete all sizes?'] = 'Are you sure you want to delete all sizes?';
|
||||||
$lang['Are you sure you want to lock the gallery?'] = 'Are you sure you want to lock the gallery?';
|
$lang['Are you sure you want to lock the gallery?'] = 'Are you sure you want to lock the gallery?';
|
||||||
$lang['Are you sure you want to unlock the gallery?'] = 'Are you sure you want to unlock the gallery?';
|
$lang['Are you sure you want to unlock the gallery?'] = 'Are you sure you want to unlock the gallery?';
|
||||||
|
|||||||
@@ -1064,6 +1064,7 @@ $lang['Are you sure you want to delete the ratings of the user "%s"?'] = 'Êtes-
|
|||||||
$lang['Are you sure you want to install the plugin "%s"?'] = 'Êtes-vous sûr de vouloir installer le plugin "%s" ?';
|
$lang['Are you sure you want to install the plugin "%s"?'] = 'Êtes-vous sûr de vouloir installer le plugin "%s" ?';
|
||||||
$lang['Are you sure you want to delete the plugin "%s"?'] = 'Êtes-vous sûr de vouloir supprimer le plugin "%s" ?';
|
$lang['Are you sure you want to delete the plugin "%s"?'] = 'Êtes-vous sûr de vouloir supprimer le plugin "%s" ?';
|
||||||
$lang['Are you sure you want to restore the plugin "%s"?'] = 'Êtes-vous sûr de vouloir restaurer le plugin "%s" ?';
|
$lang['Are you sure you want to restore the plugin "%s"?'] = 'Êtes-vous sûr de vouloir restaurer le plugin "%s" ?';
|
||||||
|
$lang['Are you sure you want to uninstall the plugin "%s"?'] = 'Êtes-vous sûr de vouloir désinstaller le plugin "%s" ?';
|
||||||
$lang['Are you sure you want to delete all sizes?'] = 'Êtes-vous sûr de vouloir supprimer toutes les tailles ?';
|
$lang['Are you sure you want to delete all sizes?'] = 'Êtes-vous sûr de vouloir supprimer toutes les tailles ?';
|
||||||
$lang['Are you sure you want to lock the gallery?'] = 'Êtes-vous sûr de vouloir verrouiller la galerie ?';
|
$lang['Are you sure you want to lock the gallery?'] = 'Êtes-vous sûr de vouloir verrouiller la galerie ?';
|
||||||
$lang['Are you sure you want to unlock the gallery?'] = 'Êtes-vous sûr de vouloir déverrouiller la galerie ?';
|
$lang['Are you sure you want to unlock the gallery?'] = 'Êtes-vous sûr de vouloir déverrouiller la galerie ?';
|
||||||
|
|||||||
Reference in New Issue
Block a user