Modified datetimepicker to allow passing of a view mode parameter to the hide method; called from datepicker controller to only hide on date change when in day view mode

This commit is contained in:
AndyButland
2014-09-29 23:15:06 +02:00
parent 518353c877
commit 2c871e635f
3 changed files with 9 additions and 3 deletions

View File

@@ -152,7 +152,13 @@
this._attachDatePickerEvents();
},
hide: function() {
hide: function (hideOnlyIfInViewMode) {
// Ignore if hideOnlyIfInViewMode parameter passed and we aren't currently in the requested view mode
if (hideOnlyIfInViewMode != undefined && hideOnlyIfInViewMode != this.viewMode) {
return;
}
// Ignore event if in the middle of a picker transition
var collapse = this.widget.find('.collapse')
for (var i = 0; i < collapse.length; i++) {

File diff suppressed because one or more lines are too long

View File

@@ -27,7 +27,7 @@ function dateTimePickerController($scope, notificationsService, assetsService, a
}
}
$element.find("div:first").datetimepicker("hide");
$element.find("div:first").datetimepicker("hide", 0);
});
}