Title: SF.net SVN: mrbs:[2434] mrbs/branches/flexible_day_end/web/js/edit_entry.js.php
Revision
2434
Author
cimorrison
Date
2012-09-19 17:17:59 +0000 (Wed, 19 Sep 2012)

Log Message

Simplified code

Modified Paths


Diff

Modified: mrbs/branches/flexible_day_end/web/js/edit_entry.js.php (2433 => 2434)


--- mrbs/branches/flexible_day_end/web/js/edit_entry.js.php	2012-09-19 17:01:49 UTC (rev 2433)
+++ mrbs/branches/flexible_day_end/web/js/edit_entry.js.php	2012-09-19 17:17:59 UTC (rev 2434)
@@ -636,10 +636,9 @@
     
   var startId = "start_seconds" + area;
   var startSelect = $('select[name="start_seconds"]:visible');
-  var startKeepDisabled = ($('#' + startId).attr('class') == 'keep_disabled');
-  var endId = "end_seconds" + area;
+  var startKeepDisabled = startSelect.hasClass('keep_disabled');
   var endSelect = $('select[name="end_seconds"]:visible');
-  var endKeepDisabled = ($('#' + endId).attr('class') == 'keep_disabled');
+  var endKeepDisabled = endSelect.hasClass('keep_disabled');
   var allDayId = "all_day" + area;
   var allDay = form[allDayId];
   var allDayKeepDisabled = $('#' + allDayId).hasClass('keep_disabled');
@@ -889,15 +888,13 @@
   // The width: auto is necessary to get the boxes to resize themselves
   // according to their new contents.
   ?>
-  var startId = "#start_seconds" + area;
-  var endId = "#end_seconds" + area;
-  $(startId).css({width: "auto"});
-  $(endId).css({width: "auto"});
-  var startWidth = $(startId).width();
-  var endWidth = $(endId).width();
+  startSelect.css({width: "auto"});
+  endSelect.css({width: "auto"});
+  var startWidth = startSelect.width();
+  var endWidth = endSelect.width();
   var maxWidth = Math.max(startWidth, endWidth) + 2;
-  $(startId).width(maxWidth);
-  $(endId).width(maxWidth);
+  startSelect.width(maxWidth);
+  endSelect.width(maxWidth);
     
 } <?php // function adjustSlotSelectors()
 
------------------------------------------------------------------------------
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

Reply via email to