Permalink
Browse files

MINOR: Added better check for existence of required DOM selector

MINOR: Inline comments
  • Loading branch information...
1 parent 418f876 commit 36d243e61750c5bb1b36a6fd7f8b764cf6da3c37 Russell Michell committed Nov 22, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 code/extensions/WorkflowEmbargoExpiryExtension.php
  2. +2 −2 javascript/WorkflowField.js
@@ -24,6 +24,7 @@ class WorkflowEmbargoExpiryExtension extends DataExtension {
'workflowService' => '%$WorkflowService',
);
+ // This "config" option, might better be handled in _config
public static $showTimePicker = true;
/**
@@ -148,14 +148,14 @@ jQuery.entwine("workflow", function($) {
});
/*
- * Simple implementation of very feature-heave jQuery-UI timepicker widget
+ * Simple implementation of the jQuery-UI timepicker widget
* @see: http://trentrichardson.com/examples/timepicker/ for more config options
*
* This will need some more work when it comes to implementing i18n functionality. Fortunately, the library handles these as option-settings quite well.
*/
$("#Root_PublishingSchedule").entwine({
onclick: function() {
- if(typeof $.fn.timepicker() !== 'object') {
+ if(typeof $.fn.timepicker() !== 'object' || !$('input.hasTimePicker').length >0) {
return false;
}
var field = $('input.hasTimePicker');

0 comments on commit 36d243e

Please sign in to comment.