Add handler for change event of the expire date field

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-02-26 19:29:15 +01:00
parent 4ee9069b7e
commit e1ef77be98
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 11 additions and 0 deletions

View File

@ -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
*