fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14465]


From: Saul
Subject: [Fmsystem-commits] [14465]
Date: Tue, 24 Nov 2015 16:15:09 +0000

Revision: 14465
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14465
Author:   psaul
Date:     2015-11-24 16:15:08 +0000 (Tue, 24 Nov 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/bookingfrontend/js/bookingfrontend/application.js
    branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js
    
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    branches/dev-syncromind/bookingfrontend/js/bookingfrontend/event.js

Modified: 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/application.js
===================================================================
--- branches/dev-syncromind/bookingfrontend/js/bookingfrontend/application.js   
2015-11-24 15:26:43 UTC (rev 14464)
+++ branches/dev-syncromind/bookingfrontend/js/bookingfrontend/application.js   
2015-11-24 16:15:08 UTC (rev 14465)
@@ -123,7 +123,7 @@
         },
         errorMessage: 'You must accept to follow all terms and conditions of 
lease first.',
         errorMessageKey: ''
-    })
+    });
 
     $.formUtils.addValidator({
         name: 'target_audience',
@@ -139,7 +139,7 @@
         },
         errorMessage: 'Please choose at least 1 target audience',
         errorMessageKey: ''
-    })
+    });
 
     $.formUtils.addValidator({
         name: 'number_participants',

Modified: branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js
===================================================================
--- branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js       
2015-11-24 15:26:43 UTC (rev 14464)
+++ branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking.js       
2015-11-24 16:15:08 UTC (rev 14465)
@@ -73,37 +73,39 @@
      }
 });
 
-$.formUtils.addValidator({
-    name: 'target_audience',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#audience input[name="audience[]"]').each(function(){
-           if ($(this).is(':checked')) {
-               n++;
-           }
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Please choose at least 1 target audience',
-    errorMessageKey: ''
-})
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'target_audience',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#audience input[name="audience[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 target audience',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'number_participants',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#agegroup_tbody input').each(function() {
-            if ($(this).val() != "" && $(this).val() > 0) {
-                n++;
-            } 
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Number of participants is required',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'number_participants',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#agegroup_tbody input').each(function() {
+                if ($(this).val() != "" && $(this).val() > 0) {
+                    n++;
+                } 
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Number of participants is required',
+        errorMessageKey: ''
+    });
+}
 
 function populateTableChk (url, container, colDefs) {
     createTable(container, url, colDefs, 'results');

Modified: 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
===================================================================
--- 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    2015-11-24 15:26:43 UTC (rev 14464)
+++ 
branches/dev-syncromind/bookingfrontend/js/bookingfrontend/booking_massupdate.js
    2015-11-24 16:15:08 UTC (rev 14465)
@@ -58,40 +58,41 @@
     });
 });
 
-$.formUtils.addValidator({
-    name: 'target_audience',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#audience input[name="audience[]"]').each(function(){
-           if ($(this).is(':checked')) {
-               n++;
-           }
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Please choose at least 1 target audience',
-    errorMessageKey: ''
-})
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'target_audience',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#audience input[name="audience[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 target audience',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'number_participants',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#agegroup_tbody input').each(function() {
-            if ($(this).val() != "" && $(this).val() > 0) {
-                n++;
-            } 
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Number of participants is required',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'number_participants',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#agegroup_tbody input').each(function() {
+                if ($(this).val() != "" && $(this).val() > 0) {
+                    n++;
+                } 
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Number of participants is required',
+        errorMessageKey: ''
+    });
+}
 
 
-
 //YAHOO.util.Event.addListener(window, "load", function() {
 //     YAHOO.util.Dom.setStyle(('header'), 'display', 'none');
 //});

Modified: branches/dev-syncromind/bookingfrontend/js/bookingfrontend/event.js
===================================================================
--- branches/dev-syncromind/bookingfrontend/js/bookingfrontend/event.js 
2015-11-24 15:26:43 UTC (rev 14464)
+++ branches/dev-syncromind/bookingfrontend/js/bookingfrontend/event.js 
2015-11-24 16:15:08 UTC (rev 14465)
@@ -64,83 +64,85 @@
     });
 });
 
-$.formUtils.addValidator({
-    name: 'target_audience',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#audience input[name="audience[]"]').each(function(){
-           if ($(this).is(':checked')) {
-               n++;
-           }
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Please choose at least 1 target audience',
-    errorMessageKey: ''
-})
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'target_audience',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#audience input[name="audience[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Please choose at least 1 target audience',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'number_participants',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        $('#agegroup_tbody input').each(function() {
-            if ($(this).val() != "" && $(this).val() > 0) {
-                n++;
-            } 
-        });
-        var v = (n > 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Number of participants is required',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'number_participants',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            $('#agegroup_tbody input').each(function() {
+                if ($(this).val() != "" && $(this).val() > 0) {
+                    n++;
+                } 
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Number of participants is required',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'customer_identifier',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var v = true;
-        var customer_ssn = $('#field_customer_ssn').val();
-        var customer_organization_number = 
$('#field_customer_organization_number').val();
-        var cost = $('#field_cost').val();
-        if ( (customer_ssn == "" && customer_organization_number == "") && 
(cost > 0) ) {
-           v = false;
-        }
-        return v;
-    },
-    errorMessage: 'There is set a cost, but no invoice data is filled inn',
-    errorMessageKey: ''
-});
+    $.formUtils.addValidator({
+        name: 'customer_identifier',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var v = true;
+            var customer_ssn = $('#field_customer_ssn').val();
+            var customer_organization_number = 
$('#field_customer_organization_number').val();
+            var cost = $('#field_cost').val();
+            if ( (customer_ssn == "" && customer_organization_number == "") && 
(cost > 0) ) {
+               v = false;
+            }
+            return v;
+        },
+        errorMessage: 'There is set a cost, but no invoice data is filled inn',
+        errorMessageKey: ''
+    });
 
-$.formUtils.addValidator({
-    name: 'application_dates',
-    validatorFunction: function(value, $el, config, languaje, $form) {
-        var n = 0;
-        if ($('input[name="from_[]"]').length == 0 || 
$('input[name="from_[]"]').length == 0) {
-            return false;
-        }
-        $('input[name="from_[]"]').each(function(){
-            if ($(this).val() == "") {
-                $($(this).addClass("error").css("border-color","red"));
-                n++;
-            } else {
-                $($(this).removeClass("error").css("border-color",""));
+    $.formUtils.addValidator({
+        name: 'application_dates',
+        validatorFunction: function(value, $el, config, languaje, $form) {
+            var n = 0;
+            if ($('input[name="from_[]"]').length == 0 || 
$('input[name="from_[]"]').length == 0) {
+                return false;
             }
-        });
-        $('input[name="to_[]"]').each(function(){
-            if ($(this).val() == "") {
-                $($(this).addClass("error").css("border-color","red"));
-                n++;
-            } else {
-                $($(this).removeClass("error").css("border-color",""));
-            }
-        });
-        var v = (n == 0) ? true : false;
-        return v;
-    },
-    errorMessage: 'Invalid date',
-    errorMessageKey: ''
-});
+            $('input[name="from_[]"]').each(function(){
+                if ($(this).val() == "") {
+                    $($(this).addClass("error").css("border-color","red"));
+                    n++;
+                } else {
+                    $($(this).removeClass("error").css("border-color",""));
+                }
+            });
+            $('input[name="to_[]"]').each(function(){
+                if ($(this).val() == "") {
+                    $($(this).addClass("error").css("border-color","red"));
+                    n++;
+                } else {
+                    $($(this).removeClass("error").css("border-color",""));
+                }
+            });
+            var v = (n == 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Invalid date',
+        errorMessageKey: ''
+    });
+}                    
 
 function populateTableChkResources (building_id, selection) {
     var url = phpGWLink('bookingfrontend/', {menuaction: 
'booking.uiresource.index', sort: 'name', filter_building_id: building_id}, 
true);




reply via email to

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