diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-26 13:22:27 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-29 14:51:30 +0100 |
commit | efcf790eff211afc220e298383874733fb907181 (patch) | |
tree | bd4f8e40a125cc9dae779742b09350191a03c4b6 /apps/files_external/js | |
parent | eb29bc64de8a60881ba2876a7c4f150711c89694 (diff) | |
download | nextcloud-server-efcf790eff211afc220e298383874733fb907181.tar.gz nextcloud-server-efcf790eff211afc220e298383874733fb907181.zip |
minor fixes
Diffstat (limited to 'apps/files_external/js')
-rw-r--r-- | apps/files_external/js/settings.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 94d0fc2f5a7..ccb1e858fa0 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -206,6 +206,12 @@ StorageConfig.Status = { ERROR: 1, INDETERMINATE: 2 }; +StorageConfig.Visibility = { + NONE: 0, + PERSONAL: 1, + ADMIN: 2, + DEFAULT: 3 +}; /** * @memberof OCA.External.Settings */ @@ -809,7 +815,7 @@ MountConfigListView.prototype = _.extend({ $tr.find('.backend').data('identifier', backend.identifier); var selectAuthMechanism = $('<select class="selectAuthMechanism"></select>'); - var neededVisibility = (this._isPersonal) ? 1 : 2; + var neededVisibility = (this._isPersonal) ? StorageConfig.Visibility.PERSONAL : StorageConfig.Visibility.ADMIN; $.each(this._allAuthMechanisms, function(authIdentifier, authMechanism) { if (backend.authSchemes[authMechanism.scheme] && (authMechanism.visibility & neededVisibility)) { selectAuthMechanism.append( @@ -887,7 +893,6 @@ MountConfigListView.prototype = _.extend({ var onCompletion = jQuery.Deferred(); $.each(result, function(i, storageParams) { var storageConfig; - console.log(storageParams); var isUserGlobal = storageParams.type === 'system' && self._isPersonal; storageParams.mountPoint = storageParams.mountPoint.substr(1); // trim leading slash if (isUserGlobal) { @@ -970,7 +975,7 @@ MountConfigListView.prototype = _.extend({ var newElement; var trimmedPlaceholder = placeholder; - var flags = ['@', '*', '!', '#', '&']; + var flags = ['@', '*', '!', '#', '&']; // used to determine what kind of parameter while(flags.indexOf(trimmedPlaceholder[0]) !== -1) { trimmedPlaceholder = trimmedPlaceholder.substr(1); } |