[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8811] Fixed url-generation
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [8811] Fixed url-generation |
Date: |
Wed, 08 Feb 2012 09:50:03 +0000 |
Revision: 8811
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8811
Author: erikhl
Date: 2012-02-08 09:50:00 +0000 (Wed, 08 Feb 2012)
Log Message:
-----------
Fixed url-generation
Modified Paths:
--------------
trunk/controller/js/controller/ajax.js
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2012-02-08 09:10:43 UTC (rev
8810)
+++ trunk/controller/js/controller/ajax.js 2012-02-08 09:50:00 UTC (rev
8811)
@@ -10,9 +10,19 @@
var month = $(thisForm).find("input[name='month']").val();
if(period_type == 'view_month')
- var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_month&location_code="
+ location_code + "&year=" + year + "&month=" + month;
+ {
+ var oArgs =
{menuaction:'controller.uicalendar.view_calendar_for_month'};
+ var baseUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = baseUrl + "&location_code=" +
location_code + "&year=" + year + "&month=" + month;
+ //var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_month&location_code="
+ location_code + "&year=" + year + "&month=" + month;
+ }
else
- var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_year&location_code="
+ location_code + "&year=" + year;
+ {
+ var oArgs =
{menuaction:'controller.uicalendar.view_calendar_for_year'};
+ var baseUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = baseUrl + "&location_code=" +
location_code + "&year=" + year;
+ //var requestUrl =
"index.php?menuaction=controller.uicalendar.view_calendar_for_year&location_code="
+ location_code + "&year=" + year;
+ }
window.location.href = requestUrl;
});
@@ -21,8 +31,9 @@
// When control area is selected, controls are fetched from db and
control select list is populated
$("#control_area_list option").click(function () {
var control_area_id = $(this).val();
-
- var requestUrl =
"index.php?menuaction=controller.uicontrol.get_controls_by_control_area&phpgw_return_as=json"
+ var oArgs =
{menuaction:'controller.uicontrol.get_controls_by_control_area',
phpgw_return_as:'json'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ //var requestUrl =
"index.php?menuaction=controller.uicontrol.get_controls_by_control_area&phpgw_return_as=json"
var htmlString = "";
@@ -52,8 +63,10 @@
// When control area is selected, controls are fetched from db and
control select list is populated
$("#control_group_area_list option").click(function () {
var control_area_id = $(this).val();
-
- var requestUrl =
"index.php?menuaction=controller.uicontrol_group.get_control_groups_by_control_area&phpgw_return_as=json"
+ var oArgs =
{menuaction:'controller.uicontrol_group.get_control_groups_by_control_area',
phpgw_return_as:'json'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ //var requestUrl =
"index.php?menuaction=controller.uicontrol_group.get_control_groups_by_control_area&phpgw_return_as=json"
var htmlString = "";
@@ -85,7 +98,9 @@
$("#ifc option").click(function () {
var ifc_id = $(this).val();
- var requestUrl =
"index.php?menuaction=controller.uicheck_list_for_component.get_component_types_by_category&phpgw_return_as=json"
+ var oArgs =
{menuaction:'controller.uicheck_list_for_component.get_component_types_by_category',
phpgw_return_as:'json'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ //var requestUrl =
"index.php?menuaction=controller.uicheck_list_for_component.get_component_types_by_category&phpgw_return_as=json"
var htmlString = "";
@@ -115,7 +130,10 @@
// When control area is selected, procedures are fetched from db and
procedure select list is populated
$("#control_area_id option").click(function () {
var control_area_id = $(this).val();
- var requestUrl =
"index.php?menuaction=controller.uiprocedure.get_procedures&phpgw_return_as=json"
+
+ var oArgs =
{menuaction:'controller.uiprocedure.get_procedures'};
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ //var requestUrl =
"index.php?menuaction=controller.uiprocedure.get_procedures&phpgw_return_as=json"
var htmlString = "";
@@ -262,8 +280,12 @@
var add_param = $(thisA).find("span").text();
- var requestUrl =
"http://portico/pe/index.php?menuaction=controller.uicheck_list.get_cases_for_check_list"
+ add_param;
+ var oArgs =
{menuaction:'controller.uicheck_list.get_cases_for_check_list'};
+ var baseUrl = phpGWLink('index.php', oArgs, true);
+ var requestUrl = baseUrl + add_param
+ //var requestUrl =
"http://portico/pe/index.php?menuaction=controller.uicheck_list.get_cases_for_check_list"
+ add_param;
+
$.ajax({
type: 'POST',
url: requestUrl,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8811] Fixed url-generation,
Erik Holm-Larsen <=