diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php index 20f1b046d35..3049dc6a263 100644 --- a/apps/files_sharing/appinfo/app.php +++ b/apps/files_sharing/appinfo/app.php @@ -55,8 +55,9 @@ $application->setupPropagation(); \OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file'); \OCP\Util::addScript('files_sharing', 'share'); +\OCP\Util::addScript('files_sharing', 'sharetabview'); \OCP\Util::addScript('files_sharing', 'external'); -\OCP\Util::addStyle('files_sharing', 'sharetabview'); +// \OCP\Util::addStyle('files_sharing', 'sharetabview'); \OC::$server->getActivityManager()->registerExtension(function() { return new \OCA\Files_Sharing\Activity( diff --git a/apps/files_sharing/css/sharetabview.css b/apps/files_sharing/css/sharetabview.css index 42c9bee7173..8b9af852531 100644 --- a/apps/files_sharing/css/sharetabview.css +++ b/apps/files_sharing/css/sharetabview.css @@ -1,3 +1,72 @@ .app-files .shareTabView { min-height: 100px; } + +.shareTabView .oneline { white-space: nowrap; } + +.shareTabView .shareWithLoading { + display: inline-block !important; + padding-left: 10px; + position: relative; + right: 30px; + top: 2px; +} + +.shareTabView .shareWithRemoteInfo { + padding: 11px 0 11px 10px +} + +.shareTabView label { + font-weight:400; + white-space: nowrap; +} + +.shareTabView input[type="checkbox"] { + margin:0 3px 0 8px; + vertical-align: middle; +} + +.shareTabView input[type="text"], .shareTabView input[type="password"] { + width: 91%; + margin-left: 7px; +} + +.shareTabView form { + font-size: 100%; + margin-left: 0; + margin-right: 0; +} + +#shareWithList { + list-style-type:none; + padding:8px; +} + +#shareWithList li { + padding-top: 10px; + padding-bottom: 10px; + font-weight: bold; + line-height: 21px; + white-space: normal; +} + +#shareWithList .unshare img, #shareWithList .showCruds img { + vertical-align:text-bottom; /* properly align icons */ +} + +#shareWithList label input[type=checkbox]{ + margin-left: 0; + position: relative; +} +#shareWithList .username{ + padding-right: 8px; + white-space: nowrap; + text-overflow: ellipsis; + max-width: 254px; + display: inline-block; + overflow: hidden; + vertical-align: middle; +} +#shareWithList li label{ + margin-right: 8px; +} diff --git a/core/js/share.js b/core/js/share.js index cd4a614e9d1..5d3253e6d5c 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -3,7 +3,7 @@ /** * @namespace */ -OC.Share={ +OC.Share = _.extend(OC.Share, { SHARE_TYPE_USER:0, SHARE_TYPE_GROUP:1, SHARE_TYPE_LINK:3, @@ -289,6 +289,12 @@ OC.Share={ } img.attr('src', image); }, + /** + * + * @param itemType + * @param itemSource + * @returns {OC.Share.Types.ShareInfo} + */ loadItem:function(itemType, itemSource) { var data = ''; var checkReshare = true; @@ -371,6 +377,21 @@ OC.Share={ }); }, showDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) { + var itemModel = new OC.Share.ShareItemModel(itemType, itemSource); + var dialogView = new OC.Share.ShareDialogView('dropdown'); + dialogView.setContainerClasses('drop shareDropDown'); + dialogView.setShowLink(link); + dialogView.setPossiblePermissions(possiblePermissions); + dialogView.setItemModel(itemModel); + var $dialog = dialogView.render(); + $dialog.appendTo(appendTo); + $dialog.attr('data-item-source-name', filename); + $dialog.slideDown(OC.menuSpeed, function() { + OC.Share.droppedDown = true; + }); + return; + + var data = OC.Share.loadItem(itemType, itemSource); var dropDownEl; var html = '