fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16847] Backport diff from Syncromind to trunk


From: sigurdne
Subject: [Fmsystem-commits] [16847] Backport diff from Syncromind to trunk
Date: Wed, 7 Jun 2017 06:44:21 -0400 (EDT)

Revision: 16847
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16847
Author:   sigurdne
Date:     2017-06-07 06:44:21 -0400 (Wed, 07 Jun 2017)
Log Message:
-----------
Backport diff from Syncromind to trunk

Modified Paths:
--------------
    trunk/property/inc/class.uireport.inc.php
    trunk/property/js/portico/report.edit.js
    trunk/property/templates/base/report.xsl

Property Changed:
----------------
    trunk/
    trunk/booking/
    trunk/bookingfrontend/

Index: trunk
===================================================================
--- trunk       2017-06-07 10:42:26 UTC (rev 16846)
+++ trunk       2017-06-07 10:44:21 UTC (rev 16847)

Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind:13653
-/branches/dev-syncromind-2:14933-16835
+/branches/dev-syncromind-2:14933-16846
 /branches/stavangerkommune:12743-12875,12986
\ No newline at end of property
Index: trunk/booking
===================================================================
--- trunk/booking       2017-06-07 10:42:26 UTC (rev 16846)
+++ trunk/booking       2017-06-07 10:44:21 UTC (rev 16847)

Property changes on: trunk/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
-/branches/dev-syncromind-2/booking:14933-16835
+/branches/dev-syncromind-2/booking:14933-16846
 /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
\ No newline at end of property
Index: trunk/bookingfrontend
===================================================================
--- trunk/bookingfrontend       2017-06-07 10:42:26 UTC (rev 16846)
+++ trunk/bookingfrontend       2017-06-07 10:44:21 UTC (rev 16847)

Property changes on: trunk/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,2 ##
-/branches/dev-syncromind-2/bookingfrontend:14933-16835
+/branches/dev-syncromind-2/bookingfrontend:14933-16846
 /branches/stavangerkommune/bookingfrontend:9468-12740,12986
\ No newline at end of property
Modified: trunk/property/inc/class.uireport.inc.php
===================================================================
--- trunk/property/inc/class.uireport.inc.php   2017-06-07 10:42:26 UTC (rev 
16846)
+++ trunk/property/inc/class.uireport.inc.php   2017-06-07 10:44:21 UTC (rev 
16847)
@@ -339,7 +339,7 @@
                                'select_count_sum' => lang('Select at least one 
count/sum operation'),
                                'select_operator' => lang('Select an operator 
for:'),
                                'enter_value' => lang('Enter a value for:'),
-                               'enter_second_value' => lang('Enter a second 
value for:'),
+                               'select_conector' => lang('Select an conector 
for:'),
                                
                                'choose_dataset' => lang('choose dataset'),
                                'and' => lang('AND'),

Modified: trunk/property/js/portico/report.edit.js
===================================================================
--- trunk/property/js/portico/report.edit.js    2017-06-07 10:42:26 UTC (rev 
16846)
+++ trunk/property/js/portico/report.edit.js    2017-06-07 10:44:21 UTC (rev 
16847)
@@ -245,13 +245,24 @@
        var order = "";
        var field = "";
        var operator = "";
-
+       var text = "";
+       var conector = "";
+       
+       var values = {};
+       values['cbo_restricted_value'] = {};
+       values['cbo_operator'] = {};
+       values['txt_value1'] = {};
+       values['cbo_conector'] = {};
+               
+       var length = 0;
        $('.criteria').each(function() 
        {
                order = $(this).val();
                field = $("#cbo_restricted_value_" + order).val();
                operator = $("#cbo_operator_" + order).val();
-
+               text = $("#txt_value1_" + order).val();
+               conector = $("#cbo_conector_" + order).val();
+               
                if (field == "")
                {
                        return true;
@@ -261,8 +272,6 @@
                {
                        result = false;
                        alert(lang['select_operator'] + ' ' + field);
-                       $("#cbo_operator_" + order).focus();
-
                        return false;
                }
 
@@ -271,15 +280,43 @@
                        case (in_array_object(operator, operators_null)):
                                break;
                        default: 
-                               if ($("#txt_value1_" + order).val() == "")
+                               if (text == "")
                                {
                                        result = false;
                                        alert(lang['enter_value'] + ' ' + 
field);
-                                       $("#txt_value1_" + order).focus();
-                               }
-               }       
+                               } 
+               }
+               
+               if (result)
+               {
+                       values['cbo_restricted_value'][order] = field;
+                       values['cbo_operator'][order] = operator;
+                       values['txt_value1'][order] = text;
+                       values['cbo_conector'][order] = conector;               
+                       length++;
+               }
        });
 
+       if (result == false)
+       {
+               return false;                           
+       }
+               
+       var n = 0;
+       $.each(values.cbo_restricted_value, function(key, value) 
+       {
+               if (n < (length - 1))
+               {
+                       if ($("#cbo_conector_" + key).val() == '')
+                       {
+                               result = false;
+                               alert(lang['select_conector'] + ' ' + 
values.cbo_restricted_value[key]);
+                               return false;                           
+                       }
+               }
+               n++;
+       });
+       
        return result;
 }
 

Modified: trunk/property/templates/base/report.xsl
===================================================================
--- trunk/property/templates/base/report.xsl    2017-06-07 10:42:26 UTC (rev 
16846)
+++ trunk/property/templates/base/report.xsl    2017-06-07 10:44:21 UTC (rev 
16847)
@@ -290,18 +290,29 @@
                        var order = "";
                        var field = "";
                        var operator = "";
-                       
+                       var text = "";
+                       var conector = "";
+
+                       var values = {};
+                       values['cbo_restricted_value'] = {};
+                       values['cbo_operator'] = {};
+                       values['txt_value1'] = {};
+                       values['cbo_conector'] = {};
+
+                       var length = 0;
                        $('.criteria').each(function() 
                        {
                                order = $(this).val();
                                field = $("#cbo_restricted_value_" + 
order).val();
                                operator = $("#cbo_operator_" + order).val();
-                               
+                               text = $("#txt_value1_" + order).val();
+                               conector = $("#cbo_conector_" + order).val();
+
                                if (field == "")
                                {
                                        return true;
                                }
-                               
+
                                if (field &#38;&#38; operator == "")
                                {
                                        result = {
@@ -311,7 +322,7 @@
                                          
                                        return false;
                                }
-                               
+
                                switch (true)
                                {
                                        case (in_array_object(operator, 
operators_null)):
@@ -324,10 +335,40 @@
                                                                message : 
lang['enter_value'] + ' ' + field
                                                          }
                                                }
-                               }       
+                               }
 
+                               if (jQuery.isEmptyObject(result))
+                               {
+                                       values['cbo_restricted_value'][order] = 
field;
+                                       values['cbo_operator'][order] = 
operator;
+                                       values['txt_value1'][order] = text;
+                                       values['cbo_conector'][order] = 
conector;               
+                                       length++;
+                               }
                        });
 
+                       if (!jQuery.isEmptyObject(result))
+                       {
+                               return result;                          
+                       }
+
+                       var n = 0;
+                       $.each(values.cbo_restricted_value, function(key, 
value) 
+                       {
+                               if (n &#60; (length - 1))
+                               {
+                                       if ($("#cbo_conector_" + key).val() == 
'')
+                                       {
+                                               result = {
+                                                       element : 
$("#cbo_conector_" + key),
+                                                       message : 
lang['select_conector'] + ' ' + values.cbo_restricted_value[key]
+                                                 }
+                                               return false;                   
        
+                                       }
+                               }
+                               n++;
+                       });
+
                        return result;
                }
 
@@ -350,13 +391,6 @@
                                                return result;
                                        }
                                        
-                                       /*result = validate_group();
-                                       if (!jQuery.isEmptyObject(result))
-                                       {
-                                               
$('#responsiveTabsGroups').responsiveTabs('activate', 1);
-                                               return result;
-                                       }*/
-                                       
                                        result = validate_aggregate();
                                        if (!jQuery.isEmptyObject(result))
                                        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]