[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [8255]
From: |
Erik Holm-Larsen |
Subject: |
[Fmsystem-commits] [8255] |
Date: |
Fri, 09 Dec 2011 06:47:38 +0000 |
Revision: 8255
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8255
Author: erikhl
Date: 2011-12-09 06:47:37 +0000 (Fri, 09 Dec 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/js/controller/ajax.js
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2011-12-09 06:47:09 UTC (rev
8254)
+++ trunk/controller/js/controller/ajax.js 2011-12-09 06:47:37 UTC (rev
8255)
@@ -31,6 +31,37 @@
});
+ // file: add_equipment_to_control.xsl
+ // When equipment category is selected, corresponding equipment types
are fetched from db and equipment type select list is populated
+ $("#ifc option").click(function () {
+ var ifc_id = $(this).val();
+
+ var requestUrl =
"index.php?menuaction=controller.uicheck_list_for_equipment.get_equipment_types_by_category&phpgw_return_as=json"
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl + "&ifc=" + ifc_id,
+ success: function(data) {
+ if( data != null){
+ var obj = jQuery.parseJSON(data);
+
+ $.each(obj, function(i) {
+ htmlString += "<option
value='" + obj[i].id + "'>" + obj[i].name + "</option>";
+ });
+
+ $("#bim_type_id").html( htmlString );
+ }else {
+ htmlString += "<option>Ingen
typer</option>"
+ $("#bim_type_id").html( htmlString );
+ }
+ }
+ });
+
+ });
+
// file: control.xsl
// When control area is selected, procedures are fetched from db and
procedure select list is populated
$("#control_area_id option").click(function () {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [8255],
Erik Holm-Larsen <=