diff --git a/admin/themes/default/js/plugins_installated.js b/admin/themes/default/js/plugins_installated.js index 612845173..ed82daf03 100644 --- a/admin/themes/default/js/plugins_installated.js +++ b/admin/themes/default/js/plugins_installated.js @@ -1,5 +1,5 @@ function setDisplayClassic() { - $(".pluginContainer").removeClass("line").removeClass("compact").addClass("classic"); + $(".pluginContainer").removeClass("line-form").removeClass("compact-form").addClass("classic-form"); $(".pluginDesc").show(); $(".pluginDescCompact").hide(); @@ -12,7 +12,7 @@ function setDisplayClassic() { } function setDisplayCompact() { - $(".pluginContainer").removeClass("line").addClass("compact").removeClass("classic"); + $(".pluginContainer").removeClass("line-form").addClass("compact-form").removeClass("classic-form"); $(".pluginDesc").hide(); $(".pluginDescCompact").show(); @@ -25,7 +25,7 @@ function setDisplayCompact() { } function setDisplayLine() { - $(".pluginContainer").addClass("line").removeClass("compact").removeClass("classic"); + $(".pluginContainer").addClass("line-form").removeClass("compact-form").removeClass("classic-form"); $(".pluginDesc").show(); $(".pluginDescCompact").hide(); diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl index a36ee6fa3..e1b62d906 100644 --- a/admin/themes/default/template/plugins_installed.tpl +++ b/admin/themes/default/template/plugins_installed.tpl @@ -332,23 +332,28 @@ jQuery(".pluginMiniBox").each(function(index){ {assign var='field_name' value='null'} {* *} {counter start=0 assign=i} {* *} -
- 0} checked {/if}> +
+
+ +
+ +
+ +
+ + + +
+ +
+ +
+
-
+
{'No plugins found'|@translate}
-
- - - -
- -
- -
- -
+
{foreach from=$plugins item=plugin name=plugins_loop} @@ -475,346 +480,4 @@ jQuery(".pluginMiniBox").each(function(index){
{/foreach}
-{/if} - - - \ No newline at end of file +{/if} \ No newline at end of file diff --git a/admin/themes/default/template/updates_ext.tpl b/admin/themes/default/template/updates_ext.tpl index 6dea5ca69..f7c858d3c 100644 --- a/admin/themes/default/template/updates_ext.tpl +++ b/admin/themes/default/template/updates_ext.tpl @@ -43,6 +43,7 @@ function resetIgnored() { success: function(data) { if (data['stat'] == 'ok') { jQuery(".pluginBox, fieldset").show(); + jQuery(".pluginBox").attr('data-ignored', 'false') jQuery("#update_all").show(); jQuery("#ignore_all").show(); jQuery("#up_to_date").hide(); @@ -60,11 +61,11 @@ function checkFieldsets() { var ignored = 0; for (i=0;i<3;i++) { nbExtensions = 0; - jQuery("div[id^='"+types[i]+"_']").each(function(index) { - if (jQuery(this).css('display') == 'block') - nbExtensions++; - else + jQuery("fieldset[data-type="+types[i]+"] .pluginBox").each(function(index) { + if (jQuery(this).attr('data-ignored')== 'true') ignored++; + else + nbExtensions++; }); total = total + nbExtensions; if (nbExtensions == 0) @@ -111,6 +112,7 @@ function ignoreExtension(type, id) { success: function(data) { if (data['stat'] == 'ok') { jQuery("#"+type+"_"+id).hide(); + jQuery("#"+type+"_"+id).attr('data-ignored', 'true') jQuery("#reset_ignore").show(); checkFieldsets(); } @@ -124,16 +126,6 @@ function autoupdate_bar_toggle(i) { jQuery('.autoupdate_bar').toggle(); } -jQuery(document).ready(function() { - jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() { - id = this.id.split('_'); - jQuery("#revdesc_"+id[1]).toggle(); - jQuery(".button_"+id[1]).toggle(); - jQuery("#revdesc_"+id[1]).closest('tr').toggle(); - return false; - }); -}); - checkFieldsets(); {/literal} {/footer_script} @@ -183,130 +175,37 @@ $("#update_all").click(function() { -{if not empty($update_plugins)} -
-
-{'Plugins'|@translate} -{foreach from=$update_plugins item=plugin name=plugins_loop} -
- - - - - - - - - - - - - -
- {$plugin.EXT_NAME} - - {'Install'|@translate} - | {'Download'|@translate} - | {'Ignore this update'|@translate} -
- {'Version'|@translate} {$plugin.CURRENT_VERSION} - - {'Downloads'|@translate}: {$plugin.DOWNLOADS} - - - {'New Version'|@translate} : {$plugin.NEW_VERSION} - | {'By %s'|@translate:$plugin.AUTHOR} -
- -
-
-{/foreach} -
-
-{/if} - -{if not empty($update_themes)} -
-
-{'Themes'|@translate} -{foreach from=$update_themes item=theme name=themes_loop} -
- - - - - - - - - - - - - -
- {$theme.EXT_NAME} - - {'Install'|@translate} - | {'Download'|@translate} - | {'Ignore this update'|@translate} -
- {'Version'|@translate} {$theme.CURRENT_VERSION} - - {'Downloads'|@translate}: {$theme.DOWNLOADS} - - - {'New Version'|@translate} : {$theme.NEW_VERSION} - | {'By %s'|@translate:$theme.AUTHOR} -
- -
-
-{/foreach} -
-
-{/if} - -{if not empty($update_languages)} -
-
-{'Languages'|@translate} -{foreach from=$update_languages item=language name=languages_loop} -
- - - - - - - - - - - - - -
- {$language.EXT_NAME} - - {'Install'|@translate} - | {'Download'|@translate} - | {'Ignore this update'|@translate} -
- {'Version'|@translate} {$language.CURRENT_VERSION} - - {'Downloads'|@translate}: {$language.DOWNLOADS} - - - {'New Version'|@translate} : {$language.NEW_VERSION} - | {'By %s'|@translate:$language.AUTHOR} -
- -
-
-{/foreach} -
-
-{/if} - -{/if} +{foreach from=$UPDATES_EXTENSION key=type item=updates} + {if not empty($updates)} +
+ + {if $type=='plugins'} + {'Plugins'|@translate} + {elseif $type=='themes'} + {'Themes'|@translate} + {elseif $type=='languages'} + {'Languages'|@translate} + {/if} + + + {foreach from=$updates item=extension} + + {/foreach} +
+ {/if} +{/foreach} \ No newline at end of file diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index ec98fd8a6..d6594566b 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -2303,6 +2303,19 @@ h2:lang(en) { text-transform:capitalize; } margin-top:15px; font-size:12px; } + +.pluginUpdateContainer { + margin-bottom: 5px !important; +} + +.pluginUpdateContainer legend{ + margin-bottom: 16px; +} + +.pluginUpdateContainer .pluginActions { + margin-right: 0 !important; +} + /* .pluginActions > * { padding: 10px 4px; @@ -2310,19 +2323,43 @@ h2:lang(en) { text-transform:capitalize; } display:block; } */ .pluginEmptyInput {width: 90px;} -.pluginContent .pluginUnavailableAction { + +.pluginActionLevel1, .pluginActionLevel2, .pluginUnavailableAction { + color: #3c3c3c; + margin: 0; + font-weight:700; +} + +.pluginActionLevel1 { + background-color: #ffc17e; + font-weight: bold; + padding: 2px 10px; + border-radius: 5px; +} +.pluginActionLevel1:hover { + background-color: #ff7700; + color: white; + text-decoration: none; +} + +.pluginActionLevel2 { + padding-left:5px; +} + +.pluginUnavailableAction { opacity: 0.5; font-size: 12px; padding: 2px 10px; - /* margin-top: 15px; */ background-color:#dddddddd; - font-weight:700; border-radius: 5px; } -.pluginActionLevel1 {background-color: #ffc17e; font-weight: bold;} -.pluginActionLevel1:hover {background-color: #ff7700; color: white; text-decoration: none;} -.pluginActionLevel2 {padding:5px 0;} -.pluginActionLevel3 {/*padding-left: 10px; opacity: 0.9;*/padding:5px 0} + +.pluginUnavailableAction:hover { + text-decoration: none; + color: #3c3c3c !important; + cursor: default; +} + .plugin-inactive .pluginContent{ border:none; border-left: solid 5px #999999; @@ -2410,17 +2447,17 @@ h2:lang(en) { text-transform:capitalize; } background: #ffd7ad; } -.pluginContainer.line .pluginBox:hover.plugin-inactive .slider { +.pluginContainer.line-form .pluginBox:hover.plugin-inactive .slider { transition: 0.4s; background: #999999; } -.pluginContainer.line .pluginBox:hover .pluginContent .pluginActions a{ +.pluginContainer.line-form .pluginBox:hover .pluginContent .pluginActions a{ /* color: #ffffff; */ opacity: 1; } -.pluginContainer.line .pluginBox.inactive:hover .pluginContent .pluginActions a{ +.pluginContainer.line-form .pluginBox.inactive:hover .pluginContent .pluginActions a{ background: transparent; opacity: 0.7; } @@ -2524,6 +2561,337 @@ h2:lang(en) { text-transform:capitalize; } legend {text-align:left;} +/* Plugin page multiple views */ + +.AlbumViewSelector { + position: absolute; + + right: 20px; + z-index: 2; + + height: 43px; + display: flex; + align-items: center; + + transform: translateY(6px); +} + +.AlbumViewSelector { + padding: 0px; + margin-right: 0px; + border-radius: 7px; +} + +.AlbumViewSelector span { + border-radius: 0; + padding: 8px; +} + +/* Should be done with :first-child and :last-child but doesn't work */ + +.AlbumViewSelector label span.firstIcon{ + border-radius: 7px 0 0 7px; +} + +.AlbumViewSelector label span.lastIcon{ + border-radius: 0 7px 7px 0; +} + +.icon-th-large, .icon-th-list, .icon-pause { + padding: 10px; + font-size: 19px; + + transition: 0.3s; +} + +.switchLayout { + display: none; +} + +/****************************************/ + +.pluginActionsSmallIcons a, .PluginOptionsIcons a{ + width: 25px; + height: 25px; + + display: flex; + justify-content: center; + align-items: center; + + color: #777; +} + +.pluginActionsSmallIcons a:hover, .PluginOptionsIcons a:hover { + color: #000000; + transition: 0.2s; +} + +.pluginActionsSmallIcons { + position: absolute; + right: 20px; + padding: 13px; + top: 0px; + display: flex; +} + +.pluginBox.active .pluginActionsSmallIcons a span { + display: flex; + align-items: center; + justify-content: center; + + padding: 5px 2px; + background: #ffc17e; + border-radius: 5px; +} + +.pluginBox.active .pluginActionsSmallIcons a span:hover { + display: flex; + align-items: center; + justify-content: center; + + padding: 5px 2px; + background: #ff7700; + border-radius: 5px; +} + +.pluginBox.inactive .pluginActionsSmallIcons a span { + display: flex; + align-items: center; + justify-content: center; + + padding: 5px 2px; + background: #e0e0e0; + border-radius: 5px; +} + +.pluginActionsSmallIcons a:hover { + text-decoration: none; +} + +.pluginBox { + transition: 0.5s; + position: relative; +} + +.unavailablePlugin { + cursor: default; + opacity: 0.5; +} + +.unavailablePlugin:hover { + cursor: default; + color: #7f7f7f !important; + opacity: 0.5; +} + +.pluginDescCompact { + max-width: 200px; + padding: 5px 10px; +} + +.dropdown-option-content { + font-weight: bold; +} + +.separator-top { + border-top: 1px solid #ffffff45; +} + +.dropdown-option.icon-cancel-circled { + margin-bottom: -5px; +} + +.dropdown-option { + font-weight: bold; +} + +.pluginContainer { + padding: 0 20px; + margin : 0; +} + +.pluginInstalledFilters { + height: 75px; +} + +.switch { + margin: 0 10px 0 0; +} + +.plugin-inactive .pluginActions a { + pointer-events: none; +} + +.plugin-active .dropdown .delete-plugin-button { + display: none; +} + +.plugin-inactive .dropdown .plugin-restore { + display: none; +} + +.plugin-inactive .dropdown .delete-plugin-button { + display: block; +} + +.plugin-active .dropdown .plugin-restore { + display: block; +} + +.plugin-inactive .pluginActionsSmallIcons { + opacity: 0.5; +} + +.pluginNotif { + display:none; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: -20px; + font-weight:bold; + z-index: 2; + white-space: nowrap; +} + +.AddPluginSuccess span, +.RestorePluginSuccess span, +.DeactivatePluginSuccess span { + color: #0a0; +} + +.AddPluginSuccess label, +.DeactivatePluginSuccess label, +.RestorePluginSuccess label { + padding: 10px; + background-color: #c2f5c2; + cursor: default; + color: #0a0; + border-radius: 30px; +} + +.PluginActionError span { + color: rgb(170, 0, 0); +} + +.PluginActionError label { + padding: 10px; + background-color: #f5c2c2; + cursor: default; + color: rgb(170, 0, 0); + border-radius: 30px; +} + +/* Line view */ + +.pluginContainer.line-form { + display: flex; + flex-direction: column; +} + +.pluginContainer.line-form .pluginBox { + width: 100%; + height: 50px; + + margin: 0 0 10px 0; +} + +.pluginContainer.line-form .pluginBox .pluginContent{ + display: flex; + flex-direction: row; + align-items: center; + width: calc(100% - 35px); +} + +.pluginContainer.line-form .pluginBox .pluginActions{ + width: auto; + margin: 0 25px 0 auto; +} + +.pluginContainer.line-form .pluginBox .PluginOptionsBlock{ + display:none; + position:absolute; + right: 30px; + top: 0; + z-index: 2; + transform: translateY(calc(50% - 30px)); +} + +.pluginContainer.line-form .pluginBox .dropdown::after { + content: " "; + position: absolute; + bottom: 55%; + left: calc(100% + 5px); + margin-left: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent transparent #ff7700 transparent; + transform: rotate(90deg); +} + +.pluginContainer.line-form .pluginBox .pluginDesc{ + margin: auto 10px auto 10px; + display: block !important; + align-items: center; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + max-width: 1000px; + flex: 1; +} + +/* Classic view */ + +.pluginContainer.classic-form { + display: flex; + flex-direction: row; + + flex-wrap: wrap; +} + +.pluginContainer.classic-form .pluginName { + position: relative; + margin-right: 10px; +} + +.pluginContainer.classic-form .switch { + position: absolute; + top: 45px; +} + +.pluginContainer.classic-form .pluginBox .pluginActions { + position: absolute; + top: 47px; + right: 17px; +} + +/* Compact view */ + +.plugin-inactive .pluginActionsSmallIcons a { + pointer-events: none; +} + +.pluginContainer.compact-form { + display: flex; + flex-direction: row; + + flex-wrap: wrap; +} + +.pluginContainer.compact-form .pluginBox { + width: 350px; + + margin: 15px 15px 0 0; +} + +.pluginContainer.compact-form .pluginBox .pluginContent { + display: flex; + flex-direction: row; + + align-items: center; +} + /* local-layout */ /* You can modify this file */ diff --git a/admin/themes/roma/theme.css b/admin/themes/roma/theme.css index 3bacb01d7..24dd17467 100644 --- a/admin/themes/roma/theme.css +++ b/admin/themes/roma/theme.css @@ -288,11 +288,12 @@ a.stat-box:hover { #helpContent, #pLoaderPage, #ftpPage, #ftpPage LEGEND {color:#aaa;} .pluginBox, .pluginContent, .groups .GroupContainer {background-color:#333;color:#999;border-right-color:#333; box-shadow: none;border-left: none;} +.pluginContainer.line-form .pluginBox:hover .pluginContent {background: #1e1e1d;} .pluginName {color:#aaa;} .pluginBox.incompatible {border-color:#800 !important;} -.pluginActionLevel1, .pluginActionLevel2 {color: #333;} -.pluginActionLevel2 {background-color: #bbbbbb;} +.pluginActionLevel1 {color: #333;} +.pluginActionLevel2 {color: #bbbbbb;} .pluginFilter {color: #c1c1c1;} .pluginFilter input {border-color: #c1c1c1;} .languageBox {background-color:#333;} diff --git a/admin/updates_ext.php b/admin/updates_ext.php index 3b4fa2082..916e07061 100644 --- a/admin/updates_ext.php +++ b/admin/updates_ext.php @@ -28,6 +28,8 @@ if (!$autoupdate->get_server_extensions()) return; // TODO: remove this return and add a proper "page killer" } +$updates_extension = []; //The array of the updates of a type of extension is stored in $updates_extension[type] + foreach ($autoupdate->types as $type) { $fs = 'fs_'.$type; @@ -40,6 +42,8 @@ foreach ($autoupdate->types as $type) continue; } + $updates_extension[$type] = []; + foreach($fs_ext as $ext_id => $fs_ext) { if (!isset($fs_ext['extension']) or !isset($server_ext[$fs_ext['extension']])) @@ -51,7 +55,7 @@ foreach ($autoupdate->types as $type) if (!safe_version_compare($fs_ext['version'], $ext_info['revision_name'], '>=')) { - $template->append('update_'.$type, array( + array_push($updates_extension[$type], array( 'ID' => $ext_info['extension_id'], 'REVISION_ID' => $ext_info['revision_id'], 'EXT_ID' => $ext_id, @@ -76,6 +80,7 @@ foreach ($autoupdate->types as $type) } } +$template->assign('UPDATES_EXTENSION', $updates_extension); $template->assign('SHOW_RESET', $show_reset); $template->assign('PWG_TOKEN', get_pwg_token()); $template->assign('EXT_TYPE', $page['page'] == 'updates' ? 'extensions' : $page['page']);