From 1f2764c3514f9d1009676cc2fcf175b423597a6d Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 12 Jun 2017 12:35:43 -0600 Subject: [PATCH] Resources - do not clear currently set calendar owners, add to what's selected --- resources/js/app.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/js/app.js b/resources/js/app.js index 61b1d3c098..8565ba3f44 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -77,8 +77,12 @@ app.classes.resources = AppJS.extend( var show_calendar = function(res_ids) { egw_message(this.egw.lang('%1 resource(s) View calendar',res_ids.length)); - - this.egw.open_link('calendar.calendar_uiviews.index&view=planner&sortby=user&owner=0,r'+res_ids.join(',r')+'&ajax=true'); + var current_owners = (app.calendar ? app.calendar.state.owner || [] : []).join(','); + if(current_owners) + { + current_owners += ','; + } + this.egw.open_link('calendar.calendar_uiviews.index&view=planner&sortby=user&owner='+current_owners+'r'+res_ids.join(',r')+'&ajax=true'); }; if(selection && selection.all)