[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15172]
From: |
nelson . guerra |
Subject: |
[Fmsystem-commits] [15172] |
Date: |
Thu, 19 May 2016 00:26:43 +0000 (UTC) |
Revision: 15172
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15172
Author: nelson224
Date: 2016-05-19 00:26:42 +0000 (Thu, 19 May 2016)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/property/js/portico/generic_document.edit.js
Modified: branches/dev-syncromind-2/property/js/portico/generic_document.edit.js
===================================================================
--- branches/dev-syncromind-2/property/js/portico/generic_document.edit.js
2016-05-18 00:34:33 UTC (rev 15171)
+++ branches/dev-syncromind-2/property/js/portico/generic_document.edit.js
2016-05-19 00:26:42 UTC (rev 15172)
@@ -24,14 +24,68 @@
var requestUrl = phpGWLink('index.php', oArgs1, true);
JqueryPortico.updateinlineTableHelper(oTable0, requestUrl);
});
+
+ $('select#type_id').change( function()
+ {
+ filterData({'type_id': $(this).val(), 'cat_id': ''});
+
+ var oArgs1 = {menuaction:
'property.uigeneric_document.get_categories_for_type'};
+ var requestUrl = phpGWLink('index.php', oArgs1, true);
+ var data = {"type_id": $(this).val()};
+ JqueryPortico.execute_ajax(requestUrl,
+ function(result){
+ var $el = $("#cat_location_id");
+ $el.empty();
+ $.each(result, function(key, value) {
+
$el.append($("<option></option>").attr("value", value.id).text(value.name));
+ });
+ }, data, "GET", "json"
+ );
+ });
+
+ $('select#cat_location_id').change( function()
+ {
+ filterData({'cat_id': $(this).val()});
+ });
+ $('select#district_id').change( function()
+ {
+ filterData({'district_id': $(this).val()});
+
+ var oArgs1 = {menuaction:
'property.uigeneric_document.get_part_of_town'};
+ var requestUrl = phpGWLink('index.php', oArgs1, true);
+ var data = {"district_id": $(this).val()};
+ JqueryPortico.execute_ajax(requestUrl,
+ function(result){
+ var $el = $("#part_of_town_id");
+ $el.empty();
+ $.each(result, function(key, value) {
+
$el.append($("<option></option>").attr("value", value.id).text(value.name));
+ });
+ }, data, "GET", "json"
+ );
+ });
+
+ $('select#part_of_town_id').change( function()
+ {
+ filterData({'part_of_town_id': $(this).val()});
+ });
});
-function setRelations(oArgs)
+function filterData(objParams)
{
+ $.each(objParams, function(key, value) {
+ oTable1.dataTableSettings[1]['ajax']['data'][key] = value;
+ });
+
+ oTable1.fnDraw();
+}
+
+function setRelationsComponents(oArgs)
+{
var values = {};
- var select_check = $('.mychecks');
+ var select_check = $('.components');
select_check.each(function (i, obj)
{
if (obj.checked)
@@ -50,6 +104,29 @@
}, data, "POST", "JSON");
}
+function setRelationsLocations(oArgs)
+{
+ var values = {};
+
+ var select_check = $('.locations');
+ select_check.each(function (i, obj)
+ {
+ if (obj.checked)
+ {
+ values[obj.value] = obj.value;
+ }
+ });
+
+ oArgs['type_id'] = $('#type_id').val();
+ oArgs['file_id'] = $('#id').val();
+ var requestUrl = phpGWLink('index.php', oArgs);
+
+ var data = {"items": values};
+ JqueryPortico.execute_ajax(requestUrl, function (result)
+ {
+ }, data, "POST", "JSON");
+}
+
// call to AutoCompleteHelper JQUERY
var oArgs = {menuaction: 'property.uigeneric_document.get_users'};
var strURL = phpGWLink('index.php', oArgs, true);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15172],
nelson . guerra <=