parent
a58cdb2902
commit
ca6ac5eef9
@ -71,7 +71,7 @@
|
|||||||
<input type="submit" value="{$CONST.GO}">
|
<input type="submit" value="{$CONST.GO}">
|
||||||
</div>
|
</div>
|
||||||
{else}
|
{else}
|
||||||
<a class="button_link" href="?serendipity[adminModule]=plugins">{$CONST.BACK}</a>
|
<a class="button_link" id="back" href="?serendipity[adminModule]=plugins">{$CONST.BACK}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -82,6 +82,7 @@
|
|||||||
{foreach $pluggroups AS $pluggroup => $groupstack}
|
{foreach $pluggroups AS $pluggroup => $groupstack}
|
||||||
{if $only_group && $pluggroup != $only_group}{continue}{/if}
|
{if $only_group && $pluggroup != $only_group}{continue}{/if}
|
||||||
<h3>{foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}</h3>
|
<h3>{foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}</h3>
|
||||||
|
{if $only_group == UPGRADE}<button id="updateAll">Update All</button>{/if}
|
||||||
<ul class="plugins_installable plainList clearfix">
|
<ul class="plugins_installable plainList clearfix">
|
||||||
{foreach $groupstack as $plug}
|
{foreach $groupstack as $plug}
|
||||||
<li class="clearfix">
|
<li class="clearfix">
|
||||||
|
@ -794,6 +794,35 @@
|
|||||||
}, time);
|
}, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serendipity.updateAll = function() {
|
||||||
|
var overlay = $('<div id="overlay"/>');
|
||||||
|
overlay.appendTo(document.body);
|
||||||
|
var progress = $('<progress id="updateProgress" />');
|
||||||
|
progress.attr('max', $('.plugin_status').length);
|
||||||
|
progress.appendTo(overlay);
|
||||||
|
$('#updateProgress').attr('value', 0);
|
||||||
|
serendipity.updateNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
serendipity.updateNext = function() {
|
||||||
|
return $.get($('.plugin_status .button_link:visible').first().attr('href'))
|
||||||
|
.done(function() {
|
||||||
|
$('.plugins_installable > li:visible').first().fadeOut();
|
||||||
|
$('#updateProgress').attr('value', parseInt($('#updateProgress').attr('value')) + 1);
|
||||||
|
console.log($('.plugins_installable > li:visible').length);
|
||||||
|
if ($('.plugins_installable > li:visible').length > 0) {
|
||||||
|
return serendipity.updateNext();
|
||||||
|
} else {
|
||||||
|
$('#updateAll').hide();
|
||||||
|
$('#overlay').fadeOut();
|
||||||
|
$('#content').append('<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.SUCCESS} </span>');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.fail(function() {
|
||||||
|
$('#overlay').fadeOut();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}( window.serendipity = window.serendipity || {}, jQuery ))
|
}( window.serendipity = window.serendipity || {}, jQuery ))
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
@ -1361,6 +1390,13 @@ $(function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update all button in plugin upgrade menu
|
||||||
|
if ($('#updateAll').length > 0) {
|
||||||
|
$('#updateAll').click(function() {
|
||||||
|
serendipity.updateAll();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// minify images before upload, approach taken from https://github.com/joelvardy/javascript-image-upload/
|
// minify images before upload, approach taken from https://github.com/joelvardy/javascript-image-upload/
|
||||||
{if {serendipity_getConfigVar key='uploadResize'} && ({serendipity_getConfigVar key='maxImgWidth'} > 0 || {serendipity_getConfigVar key='maxImgHeight'} > 0)}
|
{if {serendipity_getConfigVar key='uploadResize'} && ({serendipity_getConfigVar key='maxImgWidth'} > 0 || {serendipity_getConfigVar key='maxImgHeight'} > 0)}
|
||||||
if ($('#uploadform').length > 0) {
|
if ($('#uploadform').length > 0) {
|
||||||
|
@ -2402,6 +2402,28 @@ input[name="serendipity[filter][fileCategory]"] {
|
|||||||
}
|
}
|
||||||
/* end TEMP fixes */
|
/* end TEMP fixes */
|
||||||
|
|
||||||
|
#overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#updateProgress {
|
||||||
|
margin: auto;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
top: 48%;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#updateAll {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
/* MAGNIFIC POPUP */
|
/* MAGNIFIC POPUP */
|
||||||
.mfp-bg {
|
.mfp-bg {
|
||||||
top: 0;
|
top: 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user