Cosmetics: the refresh button is now displayed as part of the "actions" at the top-right of the "details".

SVN:trunk[3756]
This commit is contained in:
Denis Flaven
2015-09-12 14:38:06 +00:00
parent d2e78d0292
commit 7f64982fc0
5 changed files with 32 additions and 6 deletions

View File

@@ -179,13 +179,10 @@ EOF
}
$oPage->add("<div class=\"page_header\"><h1>".$this->GetIcon()."&nbsp;\n");
if (!$oPage->IsPrintableVersion() && ($_SERVER['REQUEST_METHOD'] == 'GET'))
{
$aIcons[] = '<img src="../images/reload.png" style="cursor:pointer;vertical-align:middle;margin-left:1em;" onclick="window.location.reload();" title="'.htmlentities(Dict::S('UI:Button:Refresh'), ENT_QUOTES, 'UTF-8').'"/>';
}
// Master data sources
$bSynchronized = false;
$aIcons = array();
if (!$oPage->IsPrintableVersion())
{
$oCreatorTask = null;

View File

@@ -1382,6 +1382,7 @@ class MenuBlock extends DisplayBlock
}
}
$bIsCreationAllowed = (UserRights::IsActionAllowed($sClass, UR_ACTION_CREATE) == UR_ALLOWED_YES) && ($oReflectionClass->IsSubclassOf('cmdbAbstractObject'));
$sRefreshAction = '';
switch($oSet->Count())
{
case 0:
@@ -1401,6 +1402,15 @@ class MenuBlock extends DisplayBlock
else
{
$id = $oObj->GetKey();
if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
$sRefreshAction = "window.location.reload();";
}
else
{
$sRefreshAction = "window.location.href='".ApplicationContext::MakeObjectUrl(get_class($oObj), $id)."';";
}
$bLocked = false;
if (MetaModel::GetConfig()->Get('concurrent_lock_enabled'))
{
@@ -1671,8 +1681,12 @@ class MenuBlock extends DisplayBlock
{
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:Actions')."\n<ul>\n";
}
$sHtml .= $oPage->RenderPopupMenuItems($aActions, $aFavoriteActions);
if (!$oPage->IsPrintableVersion() && ($sRefreshAction!=''))
{
$sHtml .= "<div class=\"actions_button\" title=\"".htmlentities(Dict::S('UI:Button:Refresh'), ENT_QUOTES, 'UTF-8')."\"><span class=\"refresh-button\" onclick=\"$sRefreshAction\"></span></div>";
}
}
static $bPopupScript = false;

View File

@@ -2069,3 +2069,12 @@ select.multiselect {
}
span.refresh-button {
display: inline-block;
width: 21px;
height: 18px;
cursor: pointer;
background: transparent url(../images/refresh-fff.png) left center no-repeat;
}

View File

@@ -302,7 +302,6 @@ input.textSearch {
border: 1px solid #7f9db9;
background: #fff url(../images/ac-background.gif) no-repeat right;
}
/* By Rom */
.csvimport_createobj {
color: #AA0000;
@@ -1524,4 +1523,11 @@ h2.printable-tab-title {
}
select.multiselect {
max-width: 150px;
}
span.refresh-button {
display: inline-block;
width: 21px;
height: 18px;
cursor: pointer;
background: transparent url(../images/refresh-fff.png) left center no-repeat;
}

BIN
images/refresh-fff.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B