@@ -530,7 +549,7 @@ jQuery(".pluginMiniBox").each(function(index){
display: flex;
}
-.pluginMiniBox.active .pluginActionsSmallIcons a span {
+.pluginBox.active .pluginActionsSmallIcons a span {
display: flex;
align-items: center;
justify-content: center;
@@ -539,7 +558,7 @@ jQuery(".pluginMiniBox").each(function(index){
border-radius: 5px;
}
-.pluginMiniBox.active .pluginActionsSmallIcons a span:hover {
+.pluginBox.active .pluginActionsSmallIcons a span:hover {
display: flex;
align-items: center;
justify-content: center;
@@ -548,7 +567,7 @@ jQuery(".pluginMiniBox").each(function(index){
border-radius: 5px;
}
-.pluginMiniBox.inactive .pluginActionsSmallIcons a span {
+.pluginBox.inactive .pluginActionsSmallIcons a span {
display: flex;
align-items: center;
justify-content: center;
@@ -562,7 +581,7 @@ jQuery(".pluginMiniBox").each(function(index){
text-decoration: none;
}
-.pluginMiniBox {
+.pluginBox {
transition: 0.5s;
position: relative;
}
@@ -669,26 +688,26 @@ jQuery(".pluginMiniBox").each(function(index){
background: transparent;
}
-.pluginContainer.line .pluginMiniBox {
+.pluginContainer.line .pluginBox {
width: 100%;
height: 50px;
margin: 0 0 10px 0;
}
-.pluginContainer.line .pluginMiniBox .pluginContent{
+.pluginContainer.line .pluginBox .pluginContent{
display: flex;
flex-direction: row;
align-items: center;
width: calc(100% - 35px);
}
-.pluginContainer.line .pluginMiniBox .pluginActions{
+.pluginContainer.line .pluginBox .pluginActions{
width: auto;
margin: 0 25px 0 auto;
}
-.pluginContainer.line .pluginMiniBox .PluginOptionsBlock{
+.pluginContainer.line .pluginBox .PluginOptionsBlock{
display:none;
position:absolute;
right: 30px;
@@ -697,7 +716,7 @@ jQuery(".pluginMiniBox").each(function(index){
transform: translateY(calc(50% - 30px));
}
-.pluginContainer.line .pluginMiniBox .dropdown::after {
+.pluginContainer.line .pluginBox .dropdown::after {
content: " ";
position: absolute;
bottom: 55%;
@@ -710,15 +729,15 @@ jQuery(".pluginMiniBox").each(function(index){
}
-.pluginContainer.line .pluginMiniBox .pluginActions a,
-.pluginContainer.classic .pluginMiniBox .pluginActions a{
+.pluginContainer.line .pluginBox .pluginActions a,
+.pluginContainer.classic .pluginBox .pluginActions a{
margin: 0;
padding: 2px 10px;
border-radius: 5px;
color: #3c3c3c;
}
-.pluginContainer.line .pluginMiniBox .pluginDesc{
+.pluginContainer.line .pluginBox .pluginDesc{
margin: auto 10px auto 10px;
display: block !important;
align-items: center;
@@ -740,7 +759,7 @@ jQuery(".pluginMiniBox").each(function(index){
flex-wrap: wrap;
}
-.pluginContainer.classic .pluginMiniBoxNameCell {
+.pluginContainer.classic .pluginName {
position: relative;
margin-right: 10px;
}
@@ -750,7 +769,7 @@ jQuery(".pluginMiniBox").each(function(index){
top: 45px;
}
-.pluginContainer.classic .pluginMiniBox .pluginActions {
+.pluginContainer.classic .pluginBox .pluginActions {
position: absolute;
top: 47px;
right: 17px;
@@ -769,13 +788,13 @@ jQuery(".pluginMiniBox").each(function(index){
flex-wrap: wrap;
}
-.pluginContainer.compact .pluginMiniBox {
+.pluginContainer.compact .pluginBox {
width: 350px;
margin: 15px 15px 0 0;
}
-.pluginContainer.compact .pluginMiniBox .pluginContent {
+.pluginContainer.compact .pluginBox .pluginContent {
display: flex;
flex-direction: row;
diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl
index 1b7be30d7..a9d07f8b9 100644
--- a/admin/themes/default/template/plugins_new.tpl
+++ b/admin/themes/default/template/plugins_new.tpl
@@ -1,123 +1,213 @@
{combine_script id='jquery.sort' load='footer' path='themes/default/js/plugins/jquery.sort.js'}
+{combine_script id='jquery.ui.slider' require='jquery.ui' load='header' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'}
+{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
+
+{combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'}
+{combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"}
+
{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'}
{combine_script id='jquery.confirm' load='footer' require='jquery' path='themes/default/js/plugins/jquery-confirm.min.js'}
+{combine_script id='pluginsNew' load='footer' require='jquery.ui.effect-blind,jquery.sort' path='admin/themes/default/js/plugins_new.js'}
{combine_css path="themes/default/js/plugins/jquery-confirm.min.css"}
-{footer_script require='jquery.ui.effect-blind,jquery.sort'}
-const install_title = '{'Are you sure you want to install this plugin?'|@translate|@escape:'javascript'}';
-const confirm_msg = '{"Yes, I am sure"|@translate}';
-const cancel_msg = "{"No, I have changed my mind"|@translate}";
-let title = '{'Are you sure you want to install the plugin "%s"?'|@translate|@escape:'javascript'}';
-{literal}
-var sortOrder = 'date';
-var sortPlugins = (function(a, b) {
- if (sortOrder == 'downloads' || sortOrder == 'revision' || sortOrder == 'date')
- return parseInt($(a).find('input[name="'+sortOrder+'"]').val())
- < parseInt($(b).find('input[name="'+sortOrder+'"]').val()) ? 1 : -1;
- else
- return $(a).find('input[name="'+sortOrder+'"]').val().toLowerCase()
- > $(b).find('input[name="'+sortOrder+'"]').val().toLowerCase() ? 1 : -1;
-});
+{combine_css path="admin/themes/default/css/components/general.css"}
-jQuery(document).ready(function(){
- jQuery("td[id^='desc_']").click(function() {
- id = this.id.split('_');
- nb_lines = jQuery("#bigdesc_"+id[1]).html().split('
').length;
-
- jQuery("#smalldesc_"+id[1]).toggle('blind', 1);
- if (jQuery(this).hasClass('bigdesc')) {
- jQuery("#bigdesc_"+id[1]).toggle('blind', 1);
- } else {
- jQuery("#bigdesc_"+id[1]).toggle('blind', 50 + (nb_lines * 30));
- }
- jQuery(this).toggleClass('bigdesc');
- return false;
- });
-
- jQuery('select[name="selectOrder"]').change(function() {
- sortOrder = this.value;
- $('.pluginBox').sortElements(sortPlugins);
- $.get("admin.php?plugins_new_order="+sortOrder);
- });
-
- jQuery('#filter').keyup(function(){
- var filter = $(this).val();
- if (filter.length>2) {
- $('.pluginBox').hide();
- $('#availablePlugins .pluginBox input[name="name"]').each(function(){
- if ($(this).val().toUpperCase().indexOf(filter.toUpperCase()) != -1) {
- $(this).parents('div').show();
- }
- });
- } else {
- $('.pluginBox').show();
- }
- jQuery("#filter").focus();
- });
- $(".install-plugin-button").each(function() {
- let plugin_name = $(this).closest(".pluginBox").find("input[name=\"name\"]").val();
- $(this).pwg_jconfirm_follow_href({
- alert_title: title.replace("%s", plugin_name),
- alert_confirm: confirm_msg,
- alert_cancel: cancel_msg
- });
- });
-});
-{/literal}{/footer_script}
+{footer_script}
+const str_confirm_msg = '{"Yes, I am sure"|@translate}';
+const str_cancel_msg = "{"No, I have changed my mind"|@translate}";
+const str_install_title = '{'Are you sure you want to install the plugin "%s"?'|@translate|@escape:'javascript'}';
+const strs_certification = {
+ "-1" : '{'This plugin is incompatible with your version'|@translate}',
+ "0" : '{'This plugin have no update since 3 years ! It may be outdated'|@translate}',
+ "1" : '{'This plugin has no recent update'|@translate}',
+ "2" : '{'This plugin was updated less than 6 months ago'|@translate}',
+ "3" : '{'This plugin have been updated recently'|@translate}',
+};
+const str_all = '{"All of them"|@translate}'
+const str_x_month = '{"%d month"|@translate}';
+const str_x_months = '{"%d months"|@translate}';
+const str_x_year = '{"%d year"|@translate}';
+const str_x_years = '{"%d years"|@translate}';
+{/footer_script}
-
- {'Filter'|@translate}
- {'Sort order'|@translate}
-{html_options name="selectOrder" options=$order_options selected=$order_selected}
-
+
+
+
+
+
+
+
+
+
+
+ {html_options name="selectOrder" options=$order_options selected=$order_selected}
+
+
+
+
{'Filters'|@translate}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{'Plugins'|@translate}
{if not empty($plugins)}
-