Well jshint is still crying ...


Von Samsung Mobile gesendet

-------- Ursprüngliche Nachricht --------
Von: Björn Schießle <notifications@github.com> 
Datum:20.05.2014  00:02  (GMT+01:00) 
An: owncloud/core <core@noreply.github.com> 
Cc: Thomas Müller <thomas.mueller@tmit.eu> 
Betreff: Re: [core] allow admin to disable sharing for specific groups of  users (#8599) 

In apps/files_sharing/js/share.js:

> @@ -25,13 +25,28 @@ $(document).ready(function() {
>  		};
>  
>  		$('#fileList').on('fileActionsReady',function(){
> -			var $fileList = $(this);
> -			var allShared = $fileList.find('[data-share-owner] [data-Action="Share"]');
> -			allShared.addClass('permanent');
> -			allShared.find('span').text(function(){
> -				var $owner = $(this).closest('tr').attr('data-share-owner');
> -				return ' ' + t('files_sharing', 'Shared by {owner}', {owner: $owner});
> -			});
> +			// if no share action exists because the admin disabled sharing for this user
> +			// we create a share notification action to inform the user about files
> +			// shared with him otherwise we just update the existing share action.
> +			if (oc_appconfig.core.sharingDisabledForUser) {
> +				var $fileList = $(this);
> +				var allShared = $fileList.find('[data-share-owner]');
it's an if-else-statement. You can't execute both paths so it is always declared exactly once.

—
Reply to this email directly or view it on GitHub.