mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
W.I.P. of disableIfNoEPL attribute:
- Implement the same attribute for sidebox menu - Fix if hideOnDisabled is enabled it will ignore the disableIfNoEPL and it will not show the menu at all - Adopt addressbook Mail VCard menu
This commit is contained in:
parent
e4ef2007a4
commit
fd36f854a3
@ -759,7 +759,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
$this->prefs['document_dir'], $group, 'Insert in document', 'document_',
|
$this->prefs['document_dir'], $group, 'Insert in document', 'document_',
|
||||||
$this->prefs['default_document'], $this->config['contact_export_limit']
|
$this->prefs['default_document'], $this->config['contact_export_limit']
|
||||||
);
|
);
|
||||||
if (isset($GLOBALS['egw_info']['apps']['stylite']) && ($GLOBALS['egw_info']['user']['apps']['felamimail']||$GLOBALS['egw_info']['user']['apps']['mail']))
|
if ($GLOBALS['egw_info']['user']['apps']['felamimail']||$GLOBALS['egw_info']['user']['apps']['mail'])
|
||||||
{
|
{
|
||||||
$actions['mail'] = array(
|
$actions['mail'] = array(
|
||||||
'caption' => lang('Mail VCard'),
|
'caption' => lang('Mail VCard'),
|
||||||
@ -768,7 +768,8 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'onExecute' => 'javaScript:app.addressbook.adb_mail_vcard',
|
'onExecute' => 'javaScript:app.addressbook.adb_mail_vcard',
|
||||||
'enableClass' => 'contact_contact',
|
'enableClass' => 'contact_contact',
|
||||||
'hideOnDisabled' => true,
|
'hideOnDisabled' => true,
|
||||||
'hideOnMobile' => true
|
'hideOnMobile' => true,
|
||||||
|
'disableIfNoEPL' => true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
++$group;
|
++$group;
|
||||||
|
@ -268,7 +268,9 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
|||||||
|
|
||||||
if (_data[i].entries[j].icon_or_star)
|
if (_data[i].entries[j].icon_or_star)
|
||||||
{
|
{
|
||||||
catContent += '<div class="egw_fw_ui_sidemenu_listitem"><img class="egw_fw_ui_sidemenu_listitem_icon" src="' + _data[i].entries[j].icon_or_star + '" />';
|
var disableIfNoEPL = _data[i].entries[j].disableIfNoEPL ? ' disableIfNoEPL" title="'+egw.lang("This feature is only available in EPL version.") : "";
|
||||||
|
catContent += '<div class="egw_fw_ui_sidemenu_listitem'+disableIfNoEPL+
|
||||||
|
'"><img class="egw_fw_ui_sidemenu_listitem_icon" src="' + _data[i].entries[j].icon_or_star + '" />';
|
||||||
}
|
}
|
||||||
if (_data[i].entries[j].item_link == '')
|
if (_data[i].entries[j].item_link == '')
|
||||||
{
|
{
|
||||||
|
@ -824,7 +824,8 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
}
|
}
|
||||||
if (!empty($action['disableIfNoEPL']) && $action['disableIfNoEPL'] && !$GLOBALS['egw_info']['apps']['stylite'])
|
if (!empty($action['disableIfNoEPL']) && $action['disableIfNoEPL'] && !$GLOBALS['egw_info']['apps']['stylite'])
|
||||||
{
|
{
|
||||||
$action['enabled'] = false;
|
$action['enabled'] =
|
||||||
|
$action['hideOnDisabled'] = false;
|
||||||
$action['hint'] = Lang("This feature is only available in EPL version.");
|
$action['hint'] = Lang("This feature is only available in EPL version.");
|
||||||
}
|
}
|
||||||
else if(!empty($action['disableIfNoEPL']))
|
else if(!empty($action['disableIfNoEPL']))
|
||||||
|
@ -635,6 +635,10 @@ abstract class Ajax extends Api\Framework
|
|||||||
$var['target'] = $item_link['target'];
|
$var['target'] = $item_link['target'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($item_link['disableIfNoEPL'] && !$GLOBALS['egw_info']['apps']['stylite'])
|
||||||
|
{
|
||||||
|
$var['disableIfNoEPL'] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2989,5 +2989,8 @@ tr.disableIfNoEPL {
|
|||||||
margin-right: 1px;
|
margin-right: 1px;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
.egw_fw_ui_sidemenu_listitem.disableIfNoEPL > * {
|
||||||
|
opacity: 0.5;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
.inactive_blur > * {opacity: 0.4; filter:blur(2px); pointer-events: none;}
|
.inactive_blur > * {opacity: 0.4; filter:blur(2px); pointer-events: none;}
|
@ -41,16 +41,14 @@ class filemanager_hooks
|
|||||||
{
|
{
|
||||||
$title = $GLOBALS['egw_info']['apps'][self::$appname]['title'] . ' '. lang('Menu');
|
$title = $GLOBALS['egw_info']['apps'][self::$appname]['title'] . ' '. lang('Menu');
|
||||||
$file = array();
|
$file = array();
|
||||||
if($GLOBALS['egw_info']['apps']['stylite'])
|
// add "file a file" (upload) dialog
|
||||||
{
|
$file[] = array(
|
||||||
// add "file a file" (upload) dialog
|
'text' => 'File a file',
|
||||||
$file[] = array(
|
'link' => "javascript:app.filemanager.fileafile()",
|
||||||
'text' => 'File a file',
|
'app' => 'api',
|
||||||
'link' => "javascript:app.filemanager.fileafile()",
|
'icon' => 'upload',
|
||||||
'app' => 'api',
|
'disableIfNoEPL' => true
|
||||||
'icon' => 'upload',
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
// add selection for available views, if we have more then one
|
// add selection for available views, if we have more then one
|
||||||
if (count(filemanager_ui::init_views()) > 1)
|
if (count(filemanager_ui::init_views()) > 1)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user