From 9192306505d9f2046c759801d636c1a1440c2d3c 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 e93720224e..64c221c608 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -790,6 +790,17 @@ this.model.saveLinkShare({expireDate: expireDate, cid: shareId}); }, + 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'); + }, + /** * get an array of sharees' share properties *