Commit r2383: https://sourceforge.net/p/mrbs/code/2383/
------------------------------------------------------------------------
r2383 | cimorrison | 2012-08-14 16:53:50 +0100 (Tue, 14 Aug 2012) | 1 line
Changed paths:
M /mrbs/trunk/web/internalconfig.inc.php
M /mrbs/trunk/web/js/admin.js.php
M /mrbs/trunk/web/js/cell_click.js.php
M /mrbs/trunk/web/js/datatables.js.php
M /mrbs/trunk/web/js/datepicker.js.php
M /mrbs/trunk/web/js/edit_area_room.js.php
M /mrbs/trunk/web/js/edit_entry.js.php
M /mrbs/trunk/web/js/edit_users.js.php
M /mrbs/trunk/web/js/functions.js.php
M /mrbs/trunk/web/js/general.js.php
M /mrbs/trunk/web/js/multiple.js.php
M /mrbs/trunk/web/js/pending.js.php
M /mrbs/trunk/web/js/refresh.js.php
M /mrbs/trunk/web/js/report.js.php
M /mrbs/trunk/web/js/resizable.js.php
M /mrbs/trunk/web/js/search.js.php
Added a $use_strict internal configuration option to put the JavaScript into
strict mode. Useful for debugging.
------------------------------------------------------------------------
Index: mrbs/trunk/web/js/refresh.js.php
===================================================================
--- mrbs/trunk/web/js/refresh.js.php (revision 2382)
+++ mrbs/trunk/web/js/refresh.js.php (revision 2383)
@@ -7,8 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
-
//
=================================================================================
// Extend the init() function
Index: mrbs/trunk/web/js/resizable.js.php
===================================================================
--- mrbs/trunk/web/js/resizable.js.php (revision 2382)
+++ mrbs/trunk/web/js/resizable.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
$user = getUserName();
$is_admin = (authGetUserLevel($user) >= $max_level);
Index: mrbs/trunk/web/js/cell_click.js.php
===================================================================
--- mrbs/trunk/web/js/cell_click.js.php (revision 2382)
+++ mrbs/trunk/web/js/cell_click.js.php (revision 2383)
@@ -7,6 +7,10 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
//
=================================================================================
Index: mrbs/trunk/web/js/datatables.js.php
===================================================================
--- mrbs/trunk/web/js/datatables.js.php (revision 2382)
+++ mrbs/trunk/web/js/datatables.js.php (revision 2383)
@@ -7,6 +7,10 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
// Try and get a sensible value for the fixed column width, which is the
// smaller of the actual column width and either a fixed width or a
Index: mrbs/trunk/web/js/pending.js.php
===================================================================
--- mrbs/trunk/web/js/pending.js.php (revision 2382)
+++ mrbs/trunk/web/js/pending.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
//
=================================================================================
// Extend the init() function
Index: mrbs/trunk/web/js/search.js.php
===================================================================
--- mrbs/trunk/web/js/search.js.php (revision 2382)
+++ mrbs/trunk/web/js/search.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(0); // Cannot cache file because it depends on $HTTP_REFERER
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
//
=================================================================================
Index: mrbs/trunk/web/js/edit_entry.js.php
===================================================================
--- mrbs/trunk/web/js/edit_entry.js.php (revision 2382)
+++ mrbs/trunk/web/js/edit_entry.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
$user = getUserName();
$is_admin = (authGetUserLevel($user) >= $max_level);
Index: mrbs/trunk/web/js/edit_users.js.php
===================================================================
--- mrbs/trunk/web/js/edit_users.js.php (revision 2382)
+++ mrbs/trunk/web/js/edit_users.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(0); // Cannot cache file because it depends on $HTTP_REFERER
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
//
=================================================================================
// Extend the init() function
Index: mrbs/trunk/web/js/admin.js.php
===================================================================
--- mrbs/trunk/web/js/admin.js.php (revision 2382)
+++ mrbs/trunk/web/js/admin.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
$user = getUserName();
$is_admin = (authGetUserLevel($user) >= $max_level);
Index: mrbs/trunk/web/js/functions.js.php
===================================================================
--- mrbs/trunk/web/js/functions.js.php (revision 2382)
+++ mrbs/trunk/web/js/functions.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
?>
function getErrorList(errors)
Index: mrbs/trunk/web/js/edit_area_room.js.php
===================================================================
--- mrbs/trunk/web/js/edit_area_room.js.php (revision 2382)
+++ mrbs/trunk/web/js/edit_area_room.js.php (revision 2383)
@@ -6,6 +6,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
?>
var enablePeriods;
Index: mrbs/trunk/web/js/datepicker.js.php
===================================================================
--- mrbs/trunk/web/js/datepicker.js.php (revision 2382)
+++ mrbs/trunk/web/js/datepicker.js.php (revision 2383)
@@ -7,6 +7,10 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
// Set the default values for datepicker, including the default regional
setting
?>
Index: mrbs/trunk/web/js/multiple.js.php
===================================================================
--- mrbs/trunk/web/js/multiple.js.php (revision 2382)
+++ mrbs/trunk/web/js/multiple.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
$user = getUserName();
$is_admin = (authGetUserLevel($user) >= $max_level);
Index: mrbs/trunk/web/js/report.js.php
===================================================================
--- mrbs/trunk/web/js/report.js.php (revision 2382)
+++ mrbs/trunk/web/js/report.js.php (revision 2383)
@@ -7,6 +7,11 @@
header("Content-type: application/x-javascript");
expires_header(0); // Cannot cache file because it depends on $HTTP_REFERER
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
+
// Generates the JavaScript code to turn the input with id $id
// into an autocomplete box, with options contained in the
// array $options. $options can be a simple or an associative array.
Index: mrbs/trunk/web/js/general.js.php
===================================================================
--- mrbs/trunk/web/js/general.js.php (revision 2382)
+++ mrbs/trunk/web/js/general.js.php (revision 2383)
@@ -7,6 +7,10 @@
header("Content-type: application/x-javascript");
expires_header(60*30); // 30 minute expiry
+if ($use_strict)
+{
+ echo "'use strict';\n";
+}
//
=================================================================================
Index: mrbs/trunk/web/internalconfig.inc.php
===================================================================
--- mrbs/trunk/web/internalconfig.inc.php (revision 2382)
+++ mrbs/trunk/web/internalconfig.inc.php (revision 2383)
@@ -326,8 +326,18 @@
// Interval types used in booking policies
$interval_types = array('day', 'week', 'month', 'year', 'future');
-
+
+
/********************************************************
+ * JavaScript - internal use, do not change
+ ********************************************************/
+
+// Setting $use_strict = TRUE will put the MRBS JavaScript into strict mode.
Useful
+// for debugging.
+$use_strict = FALSE;
+
+
+/********************************************************
* PHP System Configuration - internal use, do not change
********************************************************/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits