Revision: 2001
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2001&view=rev
Author:   cimorrison
Date:     2011-09-23 11:18:22 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Merged in latest changes from the trunk

Modified Paths:
--------------
    mrbs/branches/datatables/web/Themes/default/header.inc
    mrbs/branches/datatables/web/pgsql.inc

Property Changed:
----------------
    mrbs/branches/datatables/
    mrbs/branches/datatables/web/upgrade/5/pgsql.sql


Property changes on: mrbs/branches/datatables
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:1863-1996
   + /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/disabled_rooms:1601-1634
/mrbs/branches/from_to_bookings:1491-1587
/mrbs/branches/ics_attachments:1652-1741
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/only_unicode:1747-1749
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/branches/provisional_bookings_new_style:1407-1570
/mrbs/trunk:1863-2000

Modified: mrbs/branches/datatables/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-23 
11:13:39 UTC (rev 2000)
+++ mrbs/branches/datatables/web/Themes/default/header.inc      2011-09-23 
11:18:22 UTC (rev 2001)
@@ -469,16 +469,18 @@
                     'end_seconds', 'end_day', 'end_month', 'end_year',
                     'rep_type', 'rep_end_day', 'rep_end_month', 
'rep_end_year', 'rep_day[]', 'rep_num_weeks');
     
-    // function to check whether the proposed booking would (a) conflict with 
any other bookings
-    // and (b) conforms to the booking policies.   Makes an Ajax call to 
edit_entry_handler but does
-    // not actually make the booking.                
+    // Fills the params object with a value from the form
+    // (Note:  params is an object, so passed by reference)                    
      
     ?>
     function fillParamFromForm(form, params, value)
     {
-        // We need to exclude the disabled elements, because otherwise jQuery
-        // will pick them all up
-        var formInput = form.find('[name="' + value + '"]:not(:disabled)');
-        // Scalar parameters (two types - checkboxes and the rest)
+      <?php
+      // We need to exclude the disabled elements, because otherwise jQuery
+      // will pick them all up
+      ?>
+      form.find('[name="' + value + '"]:not(:disabled)').each(function() {
+        <?php // Scalar parameters (two types - checkboxes and the rest) ?>
+        var formInput = $(this);
         if (value.indexOf('[]') == -1)
         {
           if (formInput.filter(':checkbox').length > 0)
@@ -494,7 +496,7 @@
             params[value] = formInput.val();
           }
         }
-        // Array parameters (two types - checkboxes and the rest)
+        <?php // Array parameters (two types - checkboxes and the rest) ?>
         else
         {
           params[value] = [];
@@ -511,25 +513,32 @@
           {
             params[value] = formInput.val();
           }
+          <?php
           // For some reason I don't understand, posting an empty array will
           // give you a PHP array of ('') at the other end.    So to avoid
           // that problem, delete the property if the array is empty
+          ?>
           if (params[value].length == 0)
           {
             delete params[value];
           }
         }
+      });
     }
 
+    <?php
+    // function to check whether the proposed booking would (a) conflict with 
any other bookings
+    // and (b) conforms to the booking policies.   Makes an Ajax call to 
edit_entry_handler but does
+    // not actually make the booking.
+    ?>
     function checkValidBooking()
     {
-      var params = {'ajax': 1}; // This is an Ajax request
+      var params = {'ajax': 1}; <?php // This is an Ajax request ?>
       var form = $('form#main');
-<?php
-      
+      <?php
       foreach ($params as $param)
       {
-          echo "      fillParamFromForm(form, params, '$param');\n";
+          echo "fillParamFromForm(form, params, '$param');\n";
       }
       ?>
       $.post('edit_entry_handler.php', params, function(result) {
@@ -1144,12 +1153,15 @@
 
   <?php
   // Check the All Day box if that's the default and then call the function
-  // that handles changes
+  // that handles changes.  (Note - the call to OnAllDayClick() comes inside
+  // an each() in case there isn't an all_day checkbox, which there won't be
+  // if we're logging in)
   if ($default_duration_all_day)
   {
     ?>
-    $('#all_day').attr('checked', true);
-    OnAllDayClick(true);
+    $('#all_day').attr('checked', true).each(function() {
+        OnAllDayClick(true);
+      });
     <?php
   }
   

Modified: mrbs/branches/datatables/web/pgsql.inc
===================================================================
--- mrbs/branches/datatables/web/pgsql.inc      2011-09-23 11:13:39 UTC (rev 
2000)
+++ mrbs/branches/datatables/web/pgsql.inc      2011-09-23 11:18:22 UTC (rev 
2001)
@@ -490,7 +490,9 @@
     echo "\n<p>\n" . get_vocab("failed_connect_db") . "\n</p>\n";
     exit;
   }
-
+  
+  pg_set_client_encoding($db_conn, 'UTF8');
+  
   return $db_conn;
 }
 


Property changes on: mrbs/branches/datatables/web/upgrade/5/pgsql.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/disabled_rooms/web/upgrade/5/pgsql.sql:1601-1634
/mrbs/branches/from_to_bookings/web/upgrade/5/pgsql.sql:1491-1587
/mrbs/branches/ics_attachments/web/upgrade/5/pgsql.sql:1652-1741
/mrbs/branches/only_unicode/web/upgrade/5/pgsql.sql:1747-1749
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql:1407-1570
/mrbs/trunk/web/upgrade/5/pgsql.sql:1863-1996
   + /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/disabled_rooms/web/upgrade/5/pgsql.sql:1601-1634
/mrbs/branches/from_to_bookings/web/upgrade/5/pgsql.sql:1491-1587
/mrbs/branches/ics_attachments/web/upgrade/5/pgsql.sql:1652-1741
/mrbs/branches/only_unicode/web/upgrade/5/pgsql.sql:1747-1749
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql:1407-1570
/mrbs/trunk/web/upgrade/5/pgsql.sql:1863-2000

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to