From e4373fbb2fea572bcfe292853670a8ca034810e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 May 2013 12:07:07 -0400 Subject: [PATCH] Filter function updates --- main/calendar/agenda.inc.php | 31 +++++++++++++++++++------- main/calendar/agenda.lib.php | 20 ++++++++++++----- main/inc/ajax/agenda.ajax.php | 7 +++++- main/template/default/agenda/month.tpl | 30 ++++++++++++++++++++++--- 4 files changed, 70 insertions(+), 18 deletions(-) diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php index 744b489251..ca29417963 100644 --- a/main/calendar/agenda.inc.php +++ b/main/calendar/agenda.inc.php @@ -26,8 +26,15 @@ $(function() { setFocus(); $("#selected_form_id_search").change(function() { var temp ="&user_id="+$("#selected_form_id_search").val(); - url = window.location+temp; - window.location.replace(url); + var position =String(window.location).indexOf("&user"); + var url_length = String(window.location).length; + var url = String(window.location).substring(0,position)+temp; + if (position > 0){ + window.location.replace(url); + } else { + url = String(window.location)+temp; + window.location.replace(url); + } }); }); '; @@ -956,7 +963,7 @@ function show_to_form($to_already_selected) */ function construct_not_selected_select_form($group_list = null, $user_list = null, $to_already_selected = array()) { - echo ''; // Adding the groups to the select form if (isset($to_already_selected) && $to_already_selected === 'everyone') { @@ -1011,15 +1018,23 @@ function show_to($filter = 0, $id = null) function construct_to_select_form($group_list = null, $user_list = null, $filter = 0, $id = null) { - $result = '