summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-09-14 02:32:34 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commitc2ff2ca9825af347d0247687322d3d12eb311185 (patch)
treedf52356dc9a43ae5631be863961c58692b5c8e97 /core/js/share.js
parenta0fa7186f55b16ddccbd3780f61433e977cbefd2 (diff)
downloadnextcloud-server-c2ff2ca9825af347d0247687322d3d12eb311185.tar.gz
nextcloud-server-c2ff2ca9825af347d0247687322d3d12eb311185.zip
cleanup
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/core/js/share.js b/core/js/share.js
index c05f3602dd7..01467b495f2 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -685,68 +685,6 @@ OC.Share = _.extend(OC.Share, {
}
});
},
- showLink:function(token, password, itemSource) {
- OC.Share.itemShares[OC.Share.SHARE_TYPE_LINK] = true;
- $('#linkCheckbox').attr('checked', true);
-
- //check itemType
- var linkSharetype=$('#dropdown').data('item-type');
-
- if (! token) {
- //fallback to pre token link
- var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
- var type = $('tr').filterAttr('data-id', String(itemSource)).data('type');
- if ($('#dir').val() == '/') {
- var file = $('#dir').val() + filename;
- } else {
- var file = $('#dir').val() + '/' + filename;
- }
- file = '/'+OC.currentUser+'/files'+file;
- // TODO: use oc webroot ?
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&'+type+'='+encodeURIComponent(file);
- } else {
- //TODO add path param when showing a link to file in a subfolder of a public link share
- var service='';
- if(linkSharetype === 'folder' || linkSharetype === 'file'){
- service='files';
- }else{
- service=linkSharetype;
- }
-
- // TODO: use oc webroot ?
- if (service !== 'files') {
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
- } else {
- var link = parent.location.protocol+'//'+location.host+OC.generateUrl('/s/')+token;
- }
- }
- $('#linkText').val(link);
- $('#linkText').slideDown(OC.menuSpeed);
- $('#linkText').css('display','block');
- if (oc_appconfig.core.enforcePasswordForPublicLink === false || password === null) {
- $('#showPassword').show();
- $('#showPassword+label').show();
- }
- if (password != null) {
- $('#linkPass').slideDown(OC.menuSpeed);
- $('#showPassword').attr('checked', true);
- $('#linkPassText').attr('placeholder', '**********');
- }
- $('#expiration').show();
- $('#emailPrivateLink #email').show();
- $('#emailPrivateLink #emailButton').show();
- $('#allowPublicUploadWrapper').show();
- },
- hideLink:function() {
- $('#linkText').slideUp(OC.menuSpeed);
- $('#defaultExpireMessage').hide();
- $('#showPassword').hide();
- $('#showPassword+label').hide();
- $('#linkPass').slideUp(OC.menuSpeed);
- $('#emailPrivateLink #email').hide();
- $('#emailPrivateLink #emailButton').hide();
- $('#allowPublicUploadWrapper').hide();
- },
dirname:function(path) {
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');
},
@@ -809,24 +747,6 @@ OC.Share = _.extend(OC.Share, {
$('#defaultExpireMessage').slideDown(OC.menuSpeed);
}
$.datepicker.setDefaults(datePickerOptions);
- },
- /**
- * Get the default Expire date
- *
- * @return {String} The expire date
- */
- getDefaultExpirationDate:function() {
- var expireDateString = '';
- if (oc_appconfig.core.defaultExpireDateEnabled) {
- var date = new Date().getTime();
- var expireAfterMs = oc_appconfig.core.defaultExpireDate * 24 * 60 * 60 * 1000;
- var expireDate = new Date(date + expireAfterMs);
- var month = expireDate.getMonth() + 1;
- var year = expireDate.getFullYear();
- var day = expireDate.getDate();
- expireDateString = year + "-" + month + '-' + day + ' 00:00:00';
- }
- return expireDateString;
}
});