summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-07-23 16:24:34 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-07-23 16:24:34 +0200
commit2a420218156d1e4ed3f88a50fd3b0d60476eeeb9 (patch)
treee0701915bb9a1fce746aff91fb6a4b99a13361b9 /core/js
parentcdb993ad69969964c433cf414b549c52b298c67d (diff)
parenta94c55be987127d148b3a6d5820bf06fc9d74068 (diff)
downloadnextcloud-server-2a420218156d1e4ed3f88a50fd3b0d60476eeeb9.tar.gz
nextcloud-server-2a420218156d1e4ed3f88a50fd3b0d60476eeeb9.zip
Merge branch 'master' into delete-fix
Conflicts: core/css/styles.css
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js10
-rw-r--r--core/js/share.js7
2 files changed, 6 insertions, 11 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 6558adbb6a7..64e6df0f59d 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -665,8 +665,6 @@ $(document).ready(function(){
$('#upload').tipsy({gravity:'w', fade:true});
$('.selectedActions a').tipsy({gravity:'s', fade:true, live:true});
$('a.action').tipsy({gravity:'s', fade:true, live:true});
- $('#headerSize').tipsy({gravity:'s', fade:true, live:true});
- $('td.filesize').tipsy({gravity:'s', fade:true, live:true});
$('td .modified').tipsy({gravity:'s', fade:true, live:true});
$('input').tipsy({gravity:'w', fade:true});
@@ -696,14 +694,6 @@ function humanFileSize(size) {
return relativeSize + ' ' + readableFormat;
}
-function simpleFileSize(bytes) {
- var mbytes = Math.round(bytes/(1024*1024/10))/10;
- if(bytes == 0) { return '0'; }
- else if(mbytes < 0.1) { return '< 0.1'; }
- else if(mbytes > 1000) { return '> 1000'; }
- else { return mbytes.toFixed(1); }
-}
-
function formatDate(date){
if(typeof date=='number'){
date=new Date(date);
diff --git a/core/js/share.js b/core/js/share.js
index 21e352ee1c6..4c8fd874107 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -161,7 +161,12 @@ OC.Share={
// respective checkbox should be checked or
// not.
+ var publicUploadEnabled = $('#filestable').data('allow-public-upload');
+ if (typeof publicUploadEnabled == 'undefined') {
+ publicUploadEnabled = 'no';
+ }
var allowPublicUploadStatus = false;
+
$.each(data.shares, function(key, value) {
if (allowPublicUploadStatus) {
return true;
@@ -181,7 +186,7 @@ OC.Share={
html += '<div id="linkPass">';
html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />';
html += '</div>';
- if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) {
+ if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE) && publicUploadEnabled === 'yes') {
html += '<div id="allowPublicUploadWrapper" style="display:none;">';
html += '<input type="checkbox" value="1" name="allowPublicUpload" id="sharingDialogAllowPublicUpload"' + ((allowPublicUploadStatus) ? 'checked="checked"' : '') + ' />';
html += '<label for="sharingDialogAllowPublicUpload">' + t('core', 'Allow Public Upload') + '</label>';