@@ -771,50 +771,26 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
771
771
this . init = function ( _ngModel_ ) {
772
772
ngModel = _ngModel_ ;
773
773
ngModelOptions = _ngModel_ . $options || datepickerConfig . ngModelOptions ;
774
- if ( angular . isDefined ( $scope . datepickerOptions ) ) {
775
- closeOnDateSelection = angular . isDefined ( $scope . datepickerOptions . closeOnDateSelection ) ?
776
- $scope . datepickerOptions . closeOnDateSelection :
777
- datepickerPopupConfig . closeOnDateSelection ;
778
- appendToBody = angular . isDefined ( $scope . datepickerOptions . datepickerAppendToBody ) ?
779
- $scope . datepickerOptions . datepickerAppendToBody :
780
- datepickerPopupConfig . datepickerAppendToBody ;
781
- onOpenFocus = angular . isDefined ( $scope . datepickerOptions . onOpenFocus ) ?
782
- $scope . datepickerOptions . onOpenFocus :
783
- datepickerPopupConfig . onOpenFocus ;
784
- datepickerPopupTemplateUrl = angular . isDefined ( $scope . datepickerOptions . datepickerPopupTemplateUrl ) ?
785
- $scope . datepickerOptions . datepickerPopupTemplateUrl :
786
- datepickerPopupConfig . datepickerPopupTemplateUrl ;
787
- datepickerTemplateUrl = angular . isDefined ( $scope . datepickerOptions . datepickerTemplateUrl ) ?
788
- $scope . datepickerOptions . datepickerTemplateUrl : datepickerPopupConfig . datepickerTemplateUrl ;
789
- altInputFormats = angular . isDefined ( $scope . datepickerOptions . altInputFormats ) ?
790
- $scope . datepickerOptions . altInputFormats :
791
- datepickerPopupConfig . altInputFormats ;
792
- } else {
793
- if ( datepickerPopupAttributeWarning ) {
794
- $log . warn ( 'uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead' ) ;
795
- }
796
-
797
- closeOnDateSelection = angular . isDefined ( $attrs . closeOnDateSelection ) ?
798
- $scope . $parent . $eval ( $attrs . closeOnDateSelection ) :
799
- datepickerPopupConfig . closeOnDateSelection ;
800
- appendToBody = angular . isDefined ( $attrs . datepickerAppendToBody ) ?
801
- $scope . $parent . $eval ( $attrs . datepickerAppendToBody ) :
802
- datepickerPopupConfig . appendToBody ;
803
- onOpenFocus = angular . isDefined ( $attrs . onOpenFocus ) ?
804
- $scope . $parent . $eval ( $attrs . onOpenFocus ) : datepickerPopupConfig . onOpenFocus ;
805
- datepickerPopupTemplateUrl = angular . isDefined ( $attrs . datepickerPopupTemplateUrl ) ?
806
- $attrs . datepickerPopupTemplateUrl :
807
- datepickerPopupConfig . datepickerPopupTemplateUrl ;
808
- datepickerTemplateUrl = angular . isDefined ( $attrs . datepickerTemplateUrl ) ?
809
- $attrs . datepickerTemplateUrl : datepickerPopupConfig . datepickerTemplateUrl ;
810
- altInputFormats = angular . isDefined ( $attrs . altInputFormats ) ?
811
- $scope . $parent . $eval ( $attrs . altInputFormats ) :
812
- datepickerPopupConfig . altInputFormats ;
813
-
814
- $scope . showButtonBar = angular . isDefined ( $attrs . showButtonBar ) ?
815
- $scope . $parent . $eval ( $attrs . showButtonBar ) :
816
- datepickerPopupConfig . showButtonBar ;
817
- }
774
+ closeOnDateSelection = angular . isDefined ( $attrs . closeOnDateSelection ) ?
775
+ $scope . $parent . $eval ( $attrs . closeOnDateSelection ) :
776
+ datepickerPopupConfig . closeOnDateSelection ;
777
+ appendToBody = angular . isDefined ( $attrs . datepickerAppendToBody ) ?
778
+ $scope . $parent . $eval ( $attrs . datepickerAppendToBody ) :
779
+ datepickerPopupConfig . appendToBody ;
780
+ onOpenFocus = angular . isDefined ( $attrs . onOpenFocus ) ?
781
+ $scope . $parent . $eval ( $attrs . onOpenFocus ) : datepickerPopupConfig . onOpenFocus ;
782
+ datepickerPopupTemplateUrl = angular . isDefined ( $attrs . datepickerPopupTemplateUrl ) ?
783
+ $attrs . datepickerPopupTemplateUrl :
784
+ datepickerPopupConfig . datepickerPopupTemplateUrl ;
785
+ datepickerTemplateUrl = angular . isDefined ( $attrs . datepickerTemplateUrl ) ?
786
+ $attrs . datepickerTemplateUrl : datepickerPopupConfig . datepickerTemplateUrl ;
787
+ altInputFormats = angular . isDefined ( $attrs . altInputFormats ) ?
788
+ $scope . $parent . $eval ( $attrs . altInputFormats ) :
789
+ datepickerPopupConfig . altInputFormats ;
790
+
791
+ $scope . showButtonBar = angular . isDefined ( $attrs . showButtonBar ) ?
792
+ $scope . $parent . $eval ( $attrs . showButtonBar ) :
793
+ datepickerPopupConfig . showButtonBar ;
818
794
819
795
if ( datepickerPopupConfig . html5Types [ $attrs . type ] ) {
820
796
dateFormat = datepickerPopupConfig . html5Types [ $attrs . type ] ;
0 commit comments