From d221a84c29ef9de5b3af52fe8578225ed9aed4d3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 24 Feb 2014 23:50:51 +0000 Subject: [PATCH] Fix 'No filters' favorite handling to detect and use internal name 'blank' instead of translated label. Copied from parent. --- calendar/js/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 657f4f3dcb..caa12dadec 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -1078,7 +1078,7 @@ app.classes.calendar = AppJS.extend( // old calendar state handling on server-side (incl. switching to and from listview) var menuaction = 'calendar.calendar_uiviews.index'; - if (typeof state.state != 'undefined' && (state.state.view == 'undefined' || state.state.view == 'listview')) + if (typeof state.state != 'undefined' && (typeof state.state.view == 'undefined' || state.state.view == 'listview')) { // check if we already use et2 / are in listview if (this.et2 || etemplate2 && etemplate2.getByApplication('calendar')) @@ -1110,11 +1110,12 @@ app.classes.calendar = AppJS.extend( } } menuaction = 'calendar.calendar_uilist.listview'; - state.state.ajax = 'true'; if (state.name) { - state.state.favorite = state.name.replace(/[^A-Za-z0-9-_]/g, '_'); + // 'blank' is the special name for no filters, send that instead of the nice translated name + state.state.favorite = jQuery.isEmptyObject(state) || jQuery.isEmptyObject(state.state||state.filter) ? 'blank' : state.name.replace(/[^A-Za-z0-9-_]/g, '_'); } + state.state.ajax = 'true'; } // setting internal state now, that linkHandler does not intercept switching from listview to any old view this.state = state;