diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 60a7e1a98f..e3250494fa 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -454,11 +454,11 @@ var et2_link_apps = et2_selectbox.extend( // Preset to last application if(!this.options.value) { - this.set_value(egw.preference('link_app','common')); + this.set_value(egw.preference('link_app',self.options.value.to_app || window.egw_appName)); } // Register to update preference this.input.on("click", jQuery.proxy(function() { - egw.set_preference('common','link_app',this.getValue()); + egw.set_preference(self.options.value.to_app || window.egw_appName,'link_app',this.getValue()); }),this); } } @@ -560,7 +560,7 @@ var et2_link_entry = et2_inputWidget.extend( self.cache = {}; // Update preference with new value - egw.set_preference('common','link_app',self.app_select.val()); + egw.set_preference(self.options.value.to_app || window.egw_appName,'link_app',self.app_select.val()); if(typeof self.options.value != 'object') self.options.value = {}; self.options.value.app = self.app_select.val(); @@ -577,9 +577,9 @@ var et2_link_entry = et2_inputWidget.extend( { this.app_select.val(self.options.value.app); } - else if (egw.preference('link_app','common')) + else if (egw.preference('link_app',self.options.value.to_app || window.egw_appName)) { - this.app_select.val(egw.preference('link_app','common')); + this.app_select.val(egw.preference('link_app',self.options.value.to_app || window.egw_appName)); } else {