Title: SF.net SVN: mrbs:[2446] mrbs/branches/flexible_day_end/web/js/edit_entry.js.php
- Revision
- 2446
- Author
- cimorrison
- Date
- 2012-09-27 16:46:06 +0000 (Thu, 27 Sep 2012)
Log Message
Simplified code
Modified Paths
Diff
Modified: mrbs/branches/flexible_day_end/web/js/edit_entry.js.php (2445 => 2446)
--- mrbs/branches/flexible_day_end/web/js/edit_entry.js.php 2012-09-27 16:37:57 UTC (rev 2445)
+++ mrbs/branches/flexible_day_end/web/js/edit_entry.js.php 2012-09-27 16:46:06 UTC (rev 2446)
@@ -268,7 +268,7 @@
var formEl = form.get(0);
<?php // Check that the start date is not after the end date ?>
- var dateDiff = getDateDifference(formEl);
+ var dateDiff = getDateDifference();
if (dateDiff < 0)
{
alert("<?php echo escape_js(get_vocab('start_after_end_long'))?>");
@@ -594,7 +594,7 @@
<?php
// Returns the number of days between the start and end dates
?>
-function getDateDifference(form)
+function getDateDifference()
{
var diff;
@@ -608,13 +608,13 @@
else
{
?>
- var start = $(form).find('#start_datepicker_alt').val().split('-');
+ var start = $('#start_datepicker_alt').val().split('-');
var startDate = new Date(parseInt(start[0], 10),
parseInt(start[1], 10) - 1,
parseInt(start[2], 10),
12);
- var end = $(form).find('#end_datepicker_alt').val().split('-');
+ var end = $('#end_datepicker_alt').val().split('-');
var endDate = new Date(parseInt(end[0], 10),
parseInt(end[1], 10) - 1,
parseInt(end[2], 10),
@@ -815,7 +815,7 @@
prevStartValue = startValue; <?php // Update the previous start value ?>
- var dateDifference = getDateDifference(form);
+ var dateDifference = getDateDifference();
<?php
// If All Day isn't checked then we need to work out whether the start
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits