From 6fbdd38e330bf3a5d4b208ec026989602d5764b2 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 17 Jun 2016 12:29:23 +0200 Subject: [PATCH] Implement update status for nm header objects used for mobile template (eg. action button) --- api/js/etemplate/et2_extension_nextmatch.js | 13 +++++++------ .../etemplate/et2_extension_nextmatch_controller.js | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index a2ccc1388c..0bb5358602 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -1800,16 +1800,16 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ /** * Directly change filter value, with no server query. - * + * * This allows the server app code to change filter value, and have it * updated in the client UI. - * + * * @param {String|number} value */ set_filter: function(value) { var update = this.update_in_progress; this.update_in_progress = true; - + this.activeFilters.filter = value; // Update the header @@ -1829,7 +1829,7 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ set_filter2: function(value) { var update = this.update_in_progress; this.update_in_progress = true; - + this.activeFilters.filter2 = value; // Update the header @@ -2473,6 +2473,7 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e // Context menu this.action_header = jQuery(document.createElement('button')) .addClass('nm_action_header') + .hide() .click (function(e){ jQuery('tr.selected',self.nextmatch.div).trigger({type:'contextmenu',which:3,originalEvent:e}); }) @@ -3418,7 +3419,7 @@ et2_register_widget(et2_nextmatch_accountfilterheader, ['nextmatch-accountfilter /** * Filter allowing multiple values to be selected, base on a taglist instead * of a regular selectbox - * + * * @augments et2_taglist */ var et2_nextmatch_taglistheader = (function(){ "use strict"; return et2_taglist.extend([et2_INextmatchHeader, et2_IResizeable], @@ -3504,7 +3505,7 @@ et2_register_widget(et2_nextmatch_taglistheader, ['nextmatch-taglistheader']); /** * Filter allowing multiple values to be selected, base on a taglist instead * of a regular selectbox - * + * * @augments et2_taglist */ var et2_nextmatch_taglistheader = (function(){ "use strict"; return et2_taglist.extend([et2_INextmatchHeader, et2_IResizeable], diff --git a/api/js/etemplate/et2_extension_nextmatch_controller.js b/api/js/etemplate/et2_extension_nextmatch_controller.js index 975eaba7c1..d0015f36a4 100644 --- a/api/js/etemplate/et2_extension_nextmatch_controller.js +++ b/api/js/etemplate/et2_extension_nextmatch_controller.js @@ -661,6 +661,10 @@ var et2_nextmatch_controller = (function(){ "use strict"; return et2_dataview_co senders = []; } if(!this._widget) return; + + // inform mobile framework about nm selections, need to update status of header objects on selection + if (egwIsMobile()) framework.nm_onselect_ctrl(this._widget, action, senders); + this._widget.onselect.call(this._widget, action,senders); },