diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-30 00:37:05 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-30 00:37:05 +0200 |
commit | f658852276204fbf1a76d58ac2f585cf9db8c75d (patch) | |
tree | 5fbd6d93c7435022e8539065a45469bd249799ad /core/js | |
parent | 085fdfec2f298fd89d0265d0f97edfdda5a12954 (diff) | |
parent | 7c6246fa451c4646dfaa1396dd37e0b3eb9706ba (diff) | |
download | nextcloud-server-f658852276204fbf1a76d58ac2f585cf9db8c75d.tar.gz nextcloud-server-f658852276204fbf1a76d58ac2f585cf9db8c75d.zip |
Merge branch 'master' into fixing-testGetById-master
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 10 | ||||
-rw-r--r-- | core/js/setup.js | 26 | ||||
-rw-r--r-- | core/js/share.js | 15 |
3 files changed, 23 insertions, 28 deletions
diff --git a/core/js/js.js b/core/js/js.js index 5158b66d73a..cf4e72324dc 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -666,8 +666,6 @@ $(document).ready(function(){ $('.selectedActions a').tipsy({gravity:'s', fade:true, live:true}); $('a.delete').tipsy({gravity: 'e', 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}); @@ -697,14 +695,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/setup.js b/core/js/setup.js index 76812b29979..c0df1ed96b0 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -11,42 +11,36 @@ $(document).ready(function() { $('#selectDbType').buttonset(); $('#datadirContent').hide(250); $('#databaseField').hide(250); - if($('#hasSQLite').val()=='true'){ + if($('#hasSQLite').val()){ $('#use_other_db').hide(); - $('#dbhost').hide(); - $('#dbhostlabel').hide(); + $('#use_oracle_db').hide(); } $('#adminlogin').change(function(){ $('#adminlogin').val($.trim($('#adminlogin').val())); }); $('#sqlite').click(function() { $('#use_other_db').slideUp(250); - $('#dbhost').hide(250); - $('#dbhostlabel').hide(250); + $('#use_oracle_db').slideUp(250); }); $('#mysql').click(function() { $('#use_other_db').slideDown(250); - $('#dbhost').show(250); - $('#dbhostlabel').show(250); + $('#use_oracle_db').slideUp(250); }); - + $('#pgsql').click(function() { $('#use_other_db').slideDown(250); - $('#dbhost').show(250); - $('#dbhostlabel').show(250); + $('#use_oracle_db').slideUp(250); }); - + $('#oci').click(function() { $('#use_other_db').slideDown(250); - $('#dbhost').show(250); - $('#dbhostlabel').show(250); + $('#use_oracle_db').show(250); }); - + $('#mssql').click(function() { $('#use_other_db').slideDown(250); - $('#dbhost').show(250); - $('#dbhostlabel').show(250); + $('#use_oracle_db').slideUp(250); }); $('input[checked]').trigger('click'); diff --git a/core/js/share.js b/core/js/share.js index 21e352ee1c6..e59669cbc2b 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -92,6 +92,7 @@ OC.Share={ } } if (shares) { + OC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {}; OC.Share.statuses[itemSource]['link'] = link; } else { delete OC.Share.statuses[itemSource]; @@ -122,7 +123,12 @@ OC.Share={ callback(result.data); } } else { - OC.dialogs.alert(result.data.message, t('core', 'Error while sharing')); + if (result.data && result.data.message) { + var msg = result.data.message; + } else { + var msg = t('core', 'Error'); + } + OC.dialogs.alert(msg, t('core', 'Error while sharing')); } }); }, @@ -161,7 +167,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 +192,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>'; |