1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-29 10:38:08 +01:00

Update ready popover.

This commit is contained in:
Cameron 2017-04-03 10:16:23 -07:00
parent 0e2bb9e9f6
commit b9ad15c883
4 changed files with 38 additions and 3 deletions

View File

@ -63,14 +63,19 @@ if(in_array($pref['adminstyle'], array('infopanel', 'flexpanel')))
}
define('e_ADMIN_HOME', true); // used by some admin shortcodes.
require_once(e_ADMIN.'boot.php');
require_once(e_ADMIN.'auth.php');
require_once(e_HANDLER.'upload_handler.php');
new admin_start;
require_once(e_ADMIN.'auth.php');
e107::getDb()->db_Mark_Time('(Start Admin Checks)');
new admin_start;
e107::getDb()->db_Mark_Time('(After Admin Checks)');
$mes = e107::getMessage();
@ -254,6 +259,7 @@ class admin_start
return null;
}
$checked = e107::getSession()->get('core-update-checked');
if(!deftrue('e_DEBUG') && $checked === true && !deftrue('e_DEVELOPER'))
@ -275,8 +281,25 @@ class admin_start
e107::getSession()->set('core-update-checked',true);
e107::getMessage()->addDebug("Checking for core updates");
if(update_check() === true)
{
$JS = <<<TMPO
$(function () {
$('[data-toggle="popover"]').popover('show');
$('.popover').on('click', function() {
$('[data-toggle="popover"]').popover('hide');
}
);
});
TMPO;
e107::js('footer-inline', $JS);
e107::css('inline', '.hide.e-popover { display:block!important }');
if(e_DEBUG !== true)
{
$this->exit = true;

View File

@ -436,7 +436,7 @@ function update_check()
// $text = ADLAN_120. "<a class='btn btn-xs btn-inline' href='".e_ADMIN_ABS."e107_update.php'>". e107::getParser()->toGlyph('fa-chevron-circle-right')."</a>";
// $text .= "<hr />";
$mes->addInfo($text);
// $mes->addInfo($text);
}

View File

@ -1833,6 +1833,15 @@ Inverse 10 <span class="badge badge-inverse">10</span>
$tmpl = strtoupper(varset($parms['tmpl'], 'E_ADMIN_NAVIGATION'));
global $$tmpl;
if($parm == 'enav_popover') // @todo move to template and make generic.
{
$template = $$tmpl;
return $template['start']. '<li><a tabindex="0" href="'.e_ADMIN_ABS.'e107_update.php" class="hide e-popover text-primary" role="button" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="bottom" title="'.$tp->toAttribute(LAN_UPDATE_AVAILABLE).'" data-content="'.$tp->toAttribute(ADLAN_120).'"><span class="text-info">'.$tp->toGlyph('fa-database').'</span></a></li>' .$template['end'];
}
if($parm == self::ADMIN_NAV_HOME || $parm == self::ADMIN_NAV_LOGOUT || $parm == self::ADMIN_NAV_LANGUAGE || $parm == 'pm')
{
$template = $$tmpl;

View File

@ -47,6 +47,8 @@ $E_ADMIN_NAVIGATION['button_active'] = '
';
// Leave Admin Area.
$E_ADMIN_NAVIGATION['button_enav_home'] = '
<li class="dropdown">
@ -196,6 +198,7 @@ $ADMIN_HEADER = $ADMIN_MODAL . '
</div>
<div class="navbar-collapse collapse">
{ADMIN_NAVIGATION=no-main}
{ADMIN_NAVIGATION=enav_popover}
<div>
{ADMIN_NAVIGATION=enav_logout}
{ADMIN_NAVIGATION=enav_language}