mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°3123 - Fix popup menus for lists
This commit is contained in:
@@ -1864,6 +1864,7 @@ class MenuBlock extends DisplayBlock
|
||||
}
|
||||
|
||||
$oActionsBlock = new Toolbar("ibo-action-toolbar-{$sId}", 'ibo-action-toolbar');
|
||||
$oRenderBlock->AddSubBlock($oActionsBlock);
|
||||
$sMenuTogglerId = "ibo-actions-menu-toggler-{$sId}";
|
||||
$sPopoverMenuId = "ibo-other-action-popover-{$sId}";
|
||||
|
||||
@@ -1886,8 +1887,6 @@ $('#{$sMenuTogglerId}').on('click', function(oEvent) {
|
||||
var popover = $("#{$sPopoverMenuId}");
|
||||
|
||||
popover.css({
|
||||
// 'top': (aEventTargetPos.top + parseInt(oEventTarget.css('marginTop'), 10) + oEventTarget.height()) + 'px',
|
||||
// 'left': (aEventTargetPos.left + parseInt(oEventTarget.css('marginLeft'), 10) + oEventTarget.width() - popover.width()) + 'px',
|
||||
'top': (aEventTargetPos.top + oEventTarget.outerHeight(true)) + 'px',
|
||||
'left': (aEventTargetPos.left + oEventTarget.outerWidth(true) - popover.width()) + 'px',
|
||||
'z-index': 10060
|
||||
@@ -1954,7 +1953,7 @@ JS
|
||||
}
|
||||
}
|
||||
|
||||
return $oActionsBlock;
|
||||
return $oRenderBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1187,7 +1187,6 @@ class utils
|
||||
public static function GetPopupMenuItemsBlock($iMenuId, $param, &$aActions, $sDataTableId = null)
|
||||
{
|
||||
$oBlock = new UIContentBlock();
|
||||
$aActions = [];
|
||||
// 1st - add standard built-in menu items
|
||||
//
|
||||
switch($iMenuId)
|
||||
@@ -1201,9 +1200,9 @@ class utils
|
||||
$sOQL = addslashes($param->GetFilter()->ToOQL(true));
|
||||
$sFilter = urlencode($param->GetFilter()->serialize());
|
||||
$sUrl = utils::GetAbsoluteUrlAppRoot()."pages/$sUIPage?operation=search&filter=".$sFilter."&{$sContext}";
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath(utils::GetAbsoluteUrlAppRoot().'css/dragtable.css');
|
||||
$oBlock->AddJsFileRelPath('js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath('js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath('css/dragtable.css');
|
||||
|
||||
$aResult = array();
|
||||
if (strlen($sUrl) < SERVER_MAX_URL_LENGTH)
|
||||
@@ -1236,12 +1235,12 @@ class utils
|
||||
$oObj = $param;
|
||||
$sOQL = "SELECT ".get_class($oObj)." WHERE id=".$oObj->GetKey();
|
||||
$sUrl = ApplicationContext::MakeObjectUrl(get_class($oObj), $oObj->GetKey());
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath(utils::GetAbsoluteUrlAppRoot().'css/dragtable.css');
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath(utils::GetAbsoluteUrlAppRoot().'js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath(utils::GetAbsoluteUrlAppRoot().'css/dragtable.css');
|
||||
$oBlock->AddJsFileRelPath('js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath('js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath('css/dragtable.css');
|
||||
$oBlock->AddJsFileRelPath('js/tabularfieldsselector.js');
|
||||
$oBlock->AddJsFileRelPath('js/jquery.dragtable.js');
|
||||
$oBlock->AddCssFileRelPath('css/dragtable.css');
|
||||
|
||||
$aResult = array(
|
||||
new SeparatorPopupMenuItem(),
|
||||
|
||||
Reference in New Issue
Block a user