mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Allow favorites from multiple apps to coexist
This commit is contained in:
parent
188ebbaec6
commit
4c54745cbb
@ -846,7 +846,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
public static function favorite_list($app, $default)
|
||||
{
|
||||
if(!$app) return '';
|
||||
$target = 'favorite_sidebox';
|
||||
$target = 'favorite_sidebox_'.$app;
|
||||
$pref_prefix = 'favorite_';
|
||||
$filters = array(
|
||||
'blank' => array(
|
||||
@ -858,7 +858,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
$default_filter = $GLOBALS['egw_info']['user']['preferences'][$app][$default];
|
||||
if(!$default_filter) $default_filter = "blank";
|
||||
|
||||
$html = "<span id='$target' class='ui-helper-clearfix'><ul class='ui-menu ui-widget-content ui-corner-all favorites' role='listbox'>\n";
|
||||
$html = "<span id='$target' class='ui-helper-clearfix sidebox-favorites'><ul class='ui-menu ui-widget-content ui-corner-all favorites' role='listbox'>\n";
|
||||
foreach($GLOBALS['egw_info']['user']['preferences'][$app] as $pref_name => $pref)
|
||||
{
|
||||
if(strpos($pref_name, $pref_prefix) === 0)
|
||||
|
@ -1409,7 +1409,8 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, {
|
||||
var widget_options = {
|
||||
default_pref: "nextmatch-" + this.nextmatch.options.settings.columnselection_pref + "-favorite",
|
||||
app: list[0],
|
||||
filters: filters
|
||||
filters: filters,
|
||||
sidebox_target:'favorite_sidebox_'+list[0]
|
||||
};
|
||||
this.favorites = et2_createWidget('favorites', widget_options, this);
|
||||
|
||||
|
@ -89,7 +89,7 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader],{
|
||||
if(this.sidebox_target.length == 0 && egw_getFramework() != null)
|
||||
{
|
||||
var egw_fw = egw_getFramework();
|
||||
this.sidebox_target = $j("#favorite_sidebox",egw_fw.sidemenuDiv);
|
||||
this.sidebox_target = $j("#"+this.options.sidebox_target,egw_fw.sidemenuDiv);
|
||||
}
|
||||
|
||||
var apps = egw().user('apps');
|
||||
|
@ -791,25 +791,25 @@ label input, label span, label div, label select, label textarea {
|
||||
/* TODO: This is template specific */
|
||||
background-image: url(../../../phpgwapi/templates/idots/images/orange-ball.png);
|
||||
}
|
||||
#favorite_sidebox ul {
|
||||
.sidebox-favorites ul.favorites {
|
||||
width: 99%;
|
||||
padding: 0px;
|
||||
border: none;
|
||||
background: white;
|
||||
}
|
||||
#favorite_sidebox .ui-menu .ui-menu-item a {
|
||||
.sidebox-favorites ul .ui-menu .ui-menu-item a {
|
||||
line-height: inherit;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
#favorite_sidebox .ui-menu .ui-menu-item a:hover {
|
||||
.sidebox-favorites ul .ui-menu .ui-menu-item a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#favorite_sidebox div.ui-icon-heart{
|
||||
.sidebox-favorites .favorites div.ui-icon-heart{
|
||||
float: left;
|
||||
display:inline-block;
|
||||
margin: -3px 1px 0px 1px;
|
||||
}
|
||||
#favorite_sidebox div.ui-icon-trash{
|
||||
.sidebox-favorites .favorites div.ui-icon-trash{
|
||||
margin-top: -3px;
|
||||
}
|
||||
.nextmatch_sortheader {
|
||||
|
Loading…
Reference in New Issue
Block a user