mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +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['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(
|
||||
'caption' => lang('Mail VCard'),
|
||||
@ -768,7 +768,8 @@ class addressbook_ui extends addressbook_bo
|
||||
'onExecute' => 'javaScript:app.addressbook.adb_mail_vcard',
|
||||
'enableClass' => 'contact_contact',
|
||||
'hideOnDisabled' => true,
|
||||
'hideOnMobile' => true
|
||||
'hideOnMobile' => true,
|
||||
'disableIfNoEPL' => true
|
||||
);
|
||||
}
|
||||
++$group;
|
||||
|
@ -268,7 +268,9 @@ var fw_base = (function(){ "use strict"; return Class.extend(
|
||||
|
||||
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 == '')
|
||||
{
|
||||
|
@ -824,7 +824,8 @@ class Nextmatch extends Etemplate\Widget
|
||||
}
|
||||
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.");
|
||||
}
|
||||
else if(!empty($action['disableIfNoEPL']))
|
||||
|
@ -258,7 +258,7 @@ abstract class Ajax extends Api\Framework
|
||||
'location' => 'framework_header',
|
||||
'popup' => !$do_framework,
|
||||
));
|
||||
|
||||
|
||||
$this->tpl->set_var($this->_get_header($extra));
|
||||
$content = $this->tpl->fp('out','head').$content;
|
||||
|
||||
@ -635,6 +635,10 @@ abstract class Ajax extends Api\Framework
|
||||
$var['target'] = $item_link['target'];
|
||||
}
|
||||
}
|
||||
if ($item_link['disableIfNoEPL'] && !$GLOBALS['egw_info']['apps']['stylite'])
|
||||
{
|
||||
$var['disableIfNoEPL'] = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2989,5 +2989,8 @@ tr.disableIfNoEPL {
|
||||
margin-right: 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;}
|
@ -41,16 +41,14 @@ class filemanager_hooks
|
||||
{
|
||||
$title = $GLOBALS['egw_info']['apps'][self::$appname]['title'] . ' '. lang('Menu');
|
||||
$file = array();
|
||||
if($GLOBALS['egw_info']['apps']['stylite'])
|
||||
{
|
||||
// add "file a file" (upload) dialog
|
||||
$file[] = array(
|
||||
'text' => 'File a file',
|
||||
'link' => "javascript:app.filemanager.fileafile()",
|
||||
'app' => 'api',
|
||||
'icon' => 'upload',
|
||||
);
|
||||
}
|
||||
// add "file a file" (upload) dialog
|
||||
$file[] = array(
|
||||
'text' => 'File a file',
|
||||
'link' => "javascript:app.filemanager.fileafile()",
|
||||
'app' => 'api',
|
||||
'icon' => 'upload',
|
||||
'disableIfNoEPL' => true
|
||||
);
|
||||
// add selection for available views, if we have more then one
|
||||
if (count(filemanager_ui::init_views()) > 1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user