From f7609eedad9ac7eab12bc21fa2abfbacf6b5b20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 26 Feb 2019 19:29:15 +0100 Subject: [PATCH] Add handler for change event of the expire date field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/js/sharedialoglinkshareview.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index bb1dcf2b2b..110e15102c 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -778,6 +778,17 @@ this.model.saveLinkShare({expireDate: expireDate}); }, + onChangeExpirationDate: function(event) { + var $element = $(event.target); + var expireDate = $element.val(); + var li = $element.closest('li[data-share-id]'); + var shareId = li.data('share-id'); + var expirationDatePicker = '#expirationDatePicker-' + shareId; + + this.setExpirationDate(expireDate, shareId); + $(expirationDatePicker).datepicker('hide'); + } + }); OC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView;