Don't show the expiration option until a share occurs, bug fix for oc-1724
This commit is contained in:
parent
39e587b52c
commit
1e1e8ae3b5
|
@ -17,4 +17,4 @@ a.unshare { float:right; display:inline; padding:.3em 0 0 .3em !important; opaci
|
||||||
a.unshare:hover { opacity:1; }
|
a.unshare:hover { opacity:1; }
|
||||||
#link { border-top:1px solid #ddd; padding-top:0.5em; }
|
#link { border-top:1px solid #ddd; padding-top:0.5em; }
|
||||||
#dropdown input[type="text"], #dropdown input[type="password"] { width:90%; }
|
#dropdown input[type="text"], #dropdown input[type="password"] { width:90%; }
|
||||||
#linkText, #linkPass { display:none; }
|
#linkText, #linkPass, #expiration { display:none; }
|
||||||
|
|
|
@ -283,6 +283,7 @@ OC.Share={
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
html += '</li>';
|
html += '</li>';
|
||||||
$(html).appendTo('#shareWithList');
|
$(html).appendTo('#shareWithList');
|
||||||
|
$('#expiration').show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showLink:function(itemSource, password) {
|
showLink:function(itemSource, password) {
|
||||||
|
@ -302,6 +303,7 @@ OC.Share={
|
||||||
$('#linkPass').show('blind');
|
$('#linkPass').show('blind');
|
||||||
$('#linkPassText').attr('placeholder', 'Password protected');
|
$('#linkPassText').attr('placeholder', 'Password protected');
|
||||||
}
|
}
|
||||||
|
$('#expiration').show();
|
||||||
},
|
},
|
||||||
hideLink:function() {
|
hideLink:function() {
|
||||||
$('#linkText').hide('blind');
|
$('#linkText').hide('blind');
|
||||||
|
@ -379,6 +381,9 @@ $(document).ready(function() {
|
||||||
var index = OC.Share.itemShares[shareType].indexOf(shareWith);
|
var index = OC.Share.itemShares[shareType].indexOf(shareWith);
|
||||||
OC.Share.itemShares[shareType].splice(index, 1);
|
OC.Share.itemShares[shareType].splice(index, 1);
|
||||||
OC.Share.updateIcon(itemType, itemSource);
|
OC.Share.updateIcon(itemType, itemSource);
|
||||||
|
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
||||||
|
$('#expiration').hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -422,6 +427,9 @@ $(document).ready(function() {
|
||||||
// Delete private link
|
// Delete private link
|
||||||
OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() {
|
OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() {
|
||||||
OC.Share.hideLink();
|
OC.Share.hideLink();
|
||||||
|
if (typeof OC.Share.statuses[itemSource] === 'undefined') {
|
||||||
|
$('#expiration').hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue