mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
make dynamic resizable sidebox width app specific
This commit is contained in:
parent
d18f839cbf
commit
221473ce0f
@ -285,7 +285,8 @@ abstract class egw_framework
|
||||
else
|
||||
{
|
||||
$var['current_app_title']=$apps[$GLOBALS['egw_info']['flags']['currentapp']]['title'];
|
||||
}
|
||||
}
|
||||
$var['currentapp'] = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||
|
||||
// current users for admins
|
||||
$var['current_users'] = $this->_current_users();
|
||||
|
@ -8,5 +8,5 @@ function dragSidebar()
|
||||
function dropSidebar()
|
||||
{
|
||||
var mainbox = dd.elements.thesideboxcolumn;
|
||||
xajax_doXMLHTTP("preferences.ajaxpreferences.storeEGWPref","common","idotssideboxwidth",mainbox.w);
|
||||
xajax_doXMLHTTP("preferences.ajaxpreferences.storeEGWPref",currentapp,"idotssideboxwidth",mainbox.w);
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
<!-- BEGIN navbar_header -->
|
||||
<div style="position:relative"><div id="divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" border="0" title="{logo_title}" alt="eGroupWare"/></a></div></div>
|
||||
<div style="position:relative"><div id="divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" border="0" title="{logo_title}" alt="EGroupware"/></a></div></div>
|
||||
<script language="javascript">
|
||||
var currentapp = '{currentapp}';
|
||||
</script>
|
||||
|
||||
<!-- BEGIN app_extra_icons_div -->
|
||||
<script language="javascript">
|
||||
|
@ -216,9 +216,9 @@ class idots_framework extends egw_framework
|
||||
{
|
||||
$prefs = array();
|
||||
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['common'])
|
||||
if (isset($GLOBALS['egw_info']['user']['preferences'][$GLOBALS['egw_info']['flags']['currentapp']]['idotssideboxwidth']))
|
||||
{
|
||||
$sideboxwidth = $GLOBALS['egw_info']['user']['preferences']['common']['idotssideboxwidth'];
|
||||
$sideboxwidth = $GLOBALS['egw_info']['user']['preferences'][$GLOBALS['egw_info']['flags']['currentapp']]['idotssideboxwidth'];
|
||||
}
|
||||
if((int)$sideboxwidth < 1)
|
||||
{
|
||||
@ -370,7 +370,7 @@ class idots_framework extends egw_framework
|
||||
}
|
||||
else
|
||||
{
|
||||
$var['logo_file'] = $GLOBALS['egw']->common->image('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo');
|
||||
$var['logo_file'] = common::image('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo');
|
||||
}
|
||||
$var['logo_url'] = $GLOBALS['egw_info']['server']['login_logo_url']?$GLOBALS['egw_info']['server']['login_logo_url']:'http://www.eGroupWare.org';
|
||||
if (substr($var['logo_url'],0,4) != 'http')
|
||||
@ -386,7 +386,7 @@ class idots_framework extends egw_framework
|
||||
$tmpl->set_var(array(
|
||||
'lang_language' => lang('Language'),
|
||||
'select_language' => html::select('lang',$GLOBALS['egw_info']['user']['preferences']['common']['lang'],
|
||||
$GLOBALS['egw']->translation->get_installed_langs(),true),
|
||||
translation::get_installed_langs(),true),
|
||||
));
|
||||
}
|
||||
else
|
||||
@ -750,7 +750,7 @@ class idots_framework extends egw_framework
|
||||
if(isset($item_link['icon']))
|
||||
{
|
||||
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['egw_info']['flags']['currentapp'];
|
||||
$var['icon_or_star'] = $item_link['icon'] ? '<img style="margin:0px 2px 0px 2px; height: 16px;" src="'.$GLOBALS['egw']->common->image($app,$item_link['icon']).'"/>' : False;
|
||||
$var['icon_or_star'] = $item_link['icon'] ? '<img style="margin:0px 2px 0px 2px; height: 16px;" src="'.common::image($app,$item_link['icon']).'"/>' : False;
|
||||
}
|
||||
$var['lang_item'] = isset($item_link['no_lang']) && $item_link['no_lang'] ? $item_link['text'] : lang($item_link['text']);
|
||||
$var['item_link'] = $item_link['link'];
|
||||
|
@ -1,5 +1,8 @@
|
||||
<!-- BEGIN navbar_header -->
|
||||
<div style="position:relative"><div id="divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" border="0" title="{logo_title}" alt="eGroupWare"/></a></div></div>
|
||||
<div style="position:relative"><div id="divLogo"><a href="{logo_url}" target="_blank"><img src="{logo_file}" border="0" title="{logo_title}" alt="EGroupware"/></a></div></div>
|
||||
<script language="javascript">
|
||||
var currentapp = '{currentapp}';
|
||||
</script>
|
||||
|
||||
<!-- BEGIN app_extra_icons_div -->
|
||||
<script language="javascript">
|
||||
|
@ -1,35 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* ajaxpreferences
|
||||
*
|
||||
* @package preferences
|
||||
* @abstract script which is called to store prefs using AJAX
|
||||
* @copyright Lingewoud B.V.
|
||||
* @link http://www.egroupware.org
|
||||
* @author Pim Snel <pim-AT-lingewoud-DOT-nl>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
class ajaxpreferences
|
||||
{
|
||||
function ajaxpreferences(){}
|
||||
/**
|
||||
* ajaxpreferences
|
||||
*
|
||||
* @package preferences
|
||||
* @copyright Lingewoud B.V.
|
||||
* @link http://www.egroupware.org
|
||||
* @author Pim Snel <pim-AT-lingewoud-DOT-nl>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* storeEGWPref
|
||||
*
|
||||
* @param mixed $repository egroupware preferences repository
|
||||
* @param mixed $key key to preference
|
||||
* @param mixed $value new value
|
||||
* @access public
|
||||
* @return mixed returns null when no erro, else return error message.
|
||||
*/
|
||||
function storeEGWPref($repository,$key,$value)
|
||||
{
|
||||
$response = new xajaxResponse();
|
||||
$GLOBALS['egw']->preferences->read_repository();
|
||||
$GLOBALS['egw']->preferences->change($repository,$key,$value);
|
||||
$GLOBALS['egw']->preferences->save_repository(True);
|
||||
return $response->getXML();
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Script which is called to store prefs using AJAX
|
||||
*/
|
||||
class ajaxpreferences
|
||||
{
|
||||
/**
|
||||
* storeEGWPref
|
||||
*
|
||||
* @param mixed $repository egroupware preferences repository
|
||||
* @param mixed $key key to preference
|
||||
* @param mixed $value new value
|
||||
* @access public
|
||||
* @return mixed returns null when no erro, else return error message.
|
||||
*/
|
||||
function storeEGWPref($repository,$key,$value)
|
||||
{
|
||||
$response = new xajaxResponse();
|
||||
$GLOBALS['egw']->preferences->read_repository();
|
||||
$GLOBALS['egw']->preferences->change($repository,$key,$value);
|
||||
$GLOBALS['egw']->preferences->save_repository(True);
|
||||
//$response->addAlert(__METHOD__."('$repository','$key','$value')");
|
||||
return $response->getXML();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user