diff --git a/calendar/js/app.js b/calendar/js/app.js index 3e993e2a08..58a818f789 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1741,7 +1741,9 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( */ add_dialog_save: function(event, widget) { - this.quick_add = widget.getInstanceManager().getValues(widget.getRoot()); + // Include all sent values so we can pass on things that we don't have UI widgets for + this.quick_add = this._add_dialog_values(widget); + // Close the dialog jQuery(widget.getInstanceManager().DOMContainer.parentNode).dialog('close'); @@ -1770,7 +1772,7 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( } // Open regular edit - egw.open(null,'calendar','edit',widget.getInstanceManager().getValues(widget.getRoot())); + egw.open(null,'calendar','edit',this._add_dialog_values(widget)); // Close the dialog jQuery(widget.getInstanceManager().DOMContainer.parentNode).dialog('close'); @@ -1779,6 +1781,27 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( return false; }, + /** + * Include some additional values so we can pass on things that we don't have + * UI widgets for in the add template + * + * @param {et2_widget} widget + * @returns {Object} + */ + _add_dialog_values: function(widget) + { + // Some select things to pass on + var mgr = widget.getRoot().getArrayMgr('content'); + var values = { + participants: mgr.getEntry('participants'), + whole_day: mgr.getEntry('whole_day') + }; + return jQuery.extend( + values, + widget.getInstanceManager().getValues(widget.getRoot()) + ); + }, + /** * Open calendar entry, taking into accout the calendar integration of other apps *