From 94689bbfffe68136bc066b033f1581adb1fe44f3 Mon Sep 17 00:00:00 2001 From: asdf Date: Fri, 8 Nov 2013 10:42:58 +0100 Subject: [PATCH] don't require jquery in the 'relative' branch of a if/else in input You can just as well use the relative version of input without loading jquery now. --- app/scripts/input.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scripts/input.js b/app/scripts/input.js index 533a52e..e86964c 100644 --- a/app/scripts/input.js +++ b/app/scripts/input.js @@ -121,15 +121,15 @@ Module.directive('dateTime', function ($compile, $document, $filter, dateTimeCon } else { // relative container = angular.element('
'); - element.before(container); + element[0].parentElement.insertBefore(container[0], element[0]); container.append(picker); // this approach doesn't work // element.before(picker); - picker.css({top: element[0].offsetHeight, display: 'block'}); + picker.css({top: element[0].offsetHeight + 'px', display: 'block'}); } - picker.bind('mousedown', function () { - return false; + picker.bind('mousedown', function (evt) { + evt.preventDefault(); }); }