Use png instead of gif, fix ajax get

This commit is contained in:
onli 2015-01-28 23:45:37 +01:00
parent c3d6d57db3
commit 100c344a14
7 changed files with 32 additions and 31 deletions

View File

@ -434,7 +434,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
if (count($serendipity['memSnaps']) > 0) {
$data['$memsnaps'] = $serendipity['memSnaps'];
}
$data['updateAllMsg'] = isset($serendipity['GET']['updateAllMsg']);
}
echo serendipity_smarty_show('admin/plugins.inc.tpl', $data);

View File

@ -71,29 +71,12 @@ if ($is_logged_in) {
$self_info = '';
}
if (isset($serendipity['GET']['noBanner']) || isset($serendipity['POST']['noBanner'])) {
$no_banner = true;
} else {
$no_banner = false;
}
$ajax = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
$no_banner = (isset($serendipity['GET']['noBanner']) || isset($serendipity['POST']['noBanner']));
$no_sidebar = (isset($serendipity['GET']['noSidebar']) || isset($serendipity['POST']['noSidebar']));
$no_footer = (isset($serendipity['GET']['noFooter']) || isset($serendipity['POST']['noFooter']));
if (isset($serendipity['GET']['noSidebar']) || isset($serendipity['POST']['noSidebar'])) {
$no_sidebar = true;
} else {
$no_sidebar = false;
}
if (isset($serendipity['GET']['noFooter']) || isset($serendipity['POST']['noFooter'])) {
$no_footer = true;
} else {
$no_footer = false;
}
if (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2date === false ) {
$use_installer = true;
} else {
$use_installer = false;
}
$use_installer = (!isset($serendipity['serendipityPath']) || IS_installed === false || IS_up2date === false );
$post_action = $serendipity['POST']['action'];
@ -234,7 +217,10 @@ if (!$use_installer && $is_logged_in) {
ob_end_clean();
}
if (!$use_installer) {
if ($ajax) {
// if that is an ajax request we can stop here, since we by convention don't want to wrap the content in the usual backend code
echo $main_content;
} elseif (!$use_installer) {
$poll_admin_vars = array('main_content', 'no_banner', 'no_sidebar', 'no_footer', 'post_action', 'is_logged_in', 'admin_installed', 'self_info', 'use_installer', 'title');
$admin_vars = array();
foreach($poll_admin_vars AS $poll_admin_var) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -147,7 +147,7 @@
{elseif $adminAction == 'overlay'}
<div id="progressWidget">
<span id="updateMessage">Starting Update…</span>
<img id="updateIndicator" src="{serendipity_getFile file='admin/img/activity.gif'}" />
<div id="updateIndicator" />
<progress id="updateProgress" value="0" />
</div>
{else}
@ -158,6 +158,9 @@
{if $new_plugin_failed}
<span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.ERROR}: {$CONST.PLUGIN_ALREADY_INSTALLED}</span>
{/if}
{if $updateAllMsg}
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}: All Plugins updated</span> {* i18n *}
{/if}
<div class="tabs" id="pluginlist_tabs">
<section id="pluginlist_sidebar" class="panel">
<h3>{$CONST.SIDEBAR_PLUGINS}</h3>

View File

@ -795,7 +795,7 @@
}
serendipity.updateAll = function() {
var $overlay = $('<div id="overlay"/>');
var $overlay = $('<div id="overlay" />');
$.get('?serendipity[adminModule]=plugins&serendipity[adminAction]=renderOverlay')
.done(function(data) {
$overlay.append(data);
@ -806,17 +806,17 @@
}
serendipity.updateNext = function() {
$('#updateMessage').text("Updating " + $('.plugins_installable > li:visible h4').first().text());
$.get($('.plugin_status .button_link:visible').first().attr('href'))
.done(function() {
$('#updateMessage').text("Updating " + $('.plugins_installable > li:visible h4').first().text());
$('.plugins_installable > li:visible').first().fadeOut();
$('#updateProgress').attr('value', parseInt($('#updateProgress').attr('value')) + 1);
if ($('.plugins_installable > li:visible').length > 0) {
serendipity.updateNext();
} else {
$('#updateAll').hide();
$('#overlay').fadeOut();
$('#content').append('<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.SUCCESS} </span>');
$('#overlay').fadeOut("normal", function () {
window.location = $('#back').attr('href') + '&serendipity[updateAllMsg]=true';
});
}
})
.fail(function() {

View File

@ -2416,7 +2416,7 @@ input[name="serendipity[filter][fileCategory]"] {
#progressWidget {
display: block;
margin: auto;
position: fixed;
position: relative;
top: 40%;
text-align: center;
}
@ -2436,6 +2436,18 @@ input[name="serendipity[filter][fileCategory]"] {
margin: auto;
}
@-webkit-keyframes loaderSprite { from { background-position: 0px; } to { background-position: -2500px; } }
@-moz-keyframes loaderSprite { from { background-position: 0px; } to { background-position: -2500px; } }
@keyframes loaderSprite { from { background-position: 0px; } to { background-position: -2500px; } }
#updateIndicator {
width: 100px;
height: 100px;
background-image: url('{TEMPLATE_PATH}img/activity.png');
-webkit-animation: loaderSprite 1s steps(25, end) infinite;
animation: loaderSprite 1s steps(25, end) infinite;
}
/* MAGNIFIC POPUP */
.mfp-bg {
top: 0;