diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 5bf4f5c098..95c0723f25 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -334,8 +334,13 @@ $(document).ready(function() { var result=$.parseJSON(response); delete data.jqXHR; - - if (typeof result[0] === 'undefined') { + + if (result.status === 'error' && result.data && result.data.message){ + data.textStatus = 'servererror'; + data.errorThrown = result.data.message; + var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload'); + fu._trigger('fail', e, data); + } else if (typeof result[0] === 'undefined') { data.textStatus = 'servererror'; data.errorThrown = t('files', 'Could not get result from server.'); var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload'); diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index 3e1dec9bbe..801c27506f 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -4,14 +4,14 @@ body { #header { background: #1d2d44 url('%webroot%/core/img/noise.png') repeat; - height:2.5em; + height:32px; left:0; - line-height:2.5em; + line-height:32px; position:fixed; right:0; top:0; z-index:100; - padding:.5em; + padding:7px; } #details { @@ -24,13 +24,18 @@ body { font-weight:700; margin: 0 0.4em 0 0; padding: 0 5px; - height: 27px; + height: 32px; float: left; } .header-right #details { - margin-right: 2em; + margin-right: 28px; +} + +.header-right { + padding: 0; + height: 32px; } #public_upload { @@ -90,7 +95,7 @@ thead{ #data-upload-form { position: relative; right: 0; - height: 27px; + height: 32px; overflow: hidden; padding: 0; float: right; @@ -109,27 +114,20 @@ thead{ width: 100% !important; } -#download span { - position: relative; - bottom: 3px; -} - #publicUploadButtonMock { position:relative; display:block; width:100%; - height:27px; + height:32px; cursor:pointer; z-index:10; background-image:url('%webroot%/core/img/actions/upload.svg'); background-repeat:no-repeat; - background-position:7px 6px; + background-position:7px 8px; } #publicUploadButtonMock span { margin: 0 5px 0 28px; - position: relative; - top: -2px; color: #555; } diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 68f6f3ba76..340e093944 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -35,14 +35,14 @@ $(document).ready(function() { if ($(tr).data('id') != $('#dropdown').attr('data-item-source')) { OC.Share.hideDropDown(function () { $(tr).addClass('mouseOver'); - OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); + OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions, filename); }); } else { OC.Share.hideDropDown(); } } else { $(tr).addClass('mouseOver'); - OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); + OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions, filename); } }); } diff --git a/core/ajax/share.php b/core/ajax/share.php index 0dacc17d3a..be02c05635 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -41,7 +41,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $_POST['itemSource'], $shareType, $shareWith, - $_POST['permissions'] + $_POST['permissions'], + $_POST['itemSourceName'] ); if (is_string($token)) { diff --git a/core/js/share.js b/core/js/share.js index ff557652b6..c53fa4110b 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -136,8 +136,17 @@ OC.Share={ return data; }, - share:function(itemType, itemSource, shareType, shareWith, permissions, callback) { - $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'share', itemType: itemType, itemSource: itemSource, shareType: shareType, shareWith: shareWith, permissions: permissions }, function(result) { + share:function(itemType, itemSource, shareType, shareWith, permissions, itemSourceName, callback) { + $.post(OC.filePath('core', 'ajax', 'share.php'), + { + action: 'share', + itemType: itemType, + itemSource: itemSource, + shareType: shareType, + shareWith: shareWith, + permissions: permissions, + itemSourceName: itemSourceName + }, function (result) { if (result && result.status === 'success') { if (callback) { callback(result.data); @@ -170,9 +179,9 @@ OC.Share={ } }); }, - showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions) { + showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) { var data = OC.Share.loadItem(itemType, itemSource); - var html = '