diff options
-rw-r--r-- | apps/dav/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/dav/lib/Server.php | 6 | ||||
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 21 | ||||
-rw-r--r-- | build/integration/features/favorites.feature | 38 | ||||
-rw-r--r-- | core/css/styles.css | 5 | ||||
-rw-r--r-- | settings/css/settings.css | 4 | ||||
-rw-r--r-- | settings/js/personal.js | 20 | ||||
-rw-r--r-- | settings/templates/personal.php | 2 |
8 files changed, 81 insertions, 17 deletions
diff --git a/apps/dav/appinfo/info.xml b/apps/dav/appinfo/info.xml index 9357ff9bb9e..c9cd6798018 100644 --- a/apps/dav/appinfo/info.xml +++ b/apps/dav/appinfo/info.xml @@ -18,7 +18,7 @@ <owncloud min-version="9.2" max-version="9.2" /> </dependencies> <background-jobs> - <job>OCA\DAV\CardDAV\Sync\SyncJob</job> + <job>OCA\DAV\CardDAV\SyncJob</job> </background-jobs> <repair-steps> <post-migration> diff --git a/apps/dav/lib/Server.php b/apps/dav/lib/Server.php index c49df197a89..a06d4c570f6 100644 --- a/apps/dav/lib/Server.php +++ b/apps/dav/lib/Server.php @@ -47,6 +47,7 @@ use OCP\IRequest; use OCP\SabrePluginEvent; use Sabre\CardDAV\VCFExportPlugin; use Sabre\DAV\Auth\Plugin; +use OCA\DAV\Connector\Sabre\TagsPlugin; class Server { @@ -190,6 +191,11 @@ class Server { $this->server->addPlugin( new QuotaPlugin($view) ); + $this->server->addPlugin( + new TagsPlugin( + $this->server->tree, \OC::$server->getTagManager() + ) + ); } }); } diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index be181f2bcb7..ad29f28e105 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -53,9 +53,9 @@ trait WebDav { /** * @return string */ - public function getFilesPath() { - if ($this->davPath === 'remote.php/dav') { - $basePath = '/files/' . $this->currentUser . '/'; + public function getFilesPath($user) { + if ($this->davPath === "remote.php/dav") { + $basePath = '/files/' . $user . '/'; } else { $basePath = '/'; } @@ -262,12 +262,13 @@ trait WebDav { /** * @Then /^as "([^"]*)" the (file|folder|entry) "([^"]*)" does not exist$/ * @param string $user + * @param string $entry * @param string $path * @param \Behat\Gherkin\Node\TableNode|null $propertiesTable */ public function asTheFileOrFolderDoesNotExist($user, $entry, $path) { $client = $this->getSabreClient($user); - $response = $client->request('HEAD', $this->makeSabrePath($path)); + $response = $client->request('HEAD', $this->makeSabrePath($user, $path)); if ($response['statusCode'] !== 404) { throw new \Exception($entry . ' "' . $path . '" expected to not exist (status code ' . $response['statusCode'] . ', expected 404)'); } @@ -278,8 +279,8 @@ trait WebDav { /** * @Then /^as "([^"]*)" the (file|folder|entry) "([^"]*)" exists$/ * @param string $user + * @param string $entry * @param string $path - * @param \Behat\Gherkin\Node\TableNode|null $propertiesTable */ public function asTheFileOrFolderExists($user, $entry, $path) { $this->response = $this->listFolder($user, $path, 0); @@ -362,13 +363,13 @@ trait WebDav { ]; } - $response = $client->propfind($this->makeSabrePath($path), $properties, $folderDepth); + $response = $client->propfind($this->makeSabrePath($user, $path), $properties, $folderDepth); return $response; } - public function makeSabrePath($path) { - return $this->encodePath($this->davPath . '/' . ltrim($path, '/')); + public function makeSabrePath($user, $path) { + return $this->encodePath($this->davPath . $this->getFilesPath($user) . ltrim($path, '/')); } public function getSabreClient($user) { @@ -474,7 +475,7 @@ trait WebDav { */ public function userCreatedAFolder($user, $destination) { try { - $this->response = $this->makeDavRequest($user, "MKCOL", $this->getFilesPath() . ltrim($destination, $this->getFilesPath()), []); + $this->response = $this->makeDavRequest($user, "MKCOL", $this->getFilesPath($user) . ltrim($destination, $this->getFilesPath($user)), []); } catch (\GuzzleHttp\Exception\ServerException $e) { // 4xx and 5xx responses cause an exception $this->response = $e->getResponse(); @@ -584,7 +585,7 @@ trait WebDav { ]; } - $response = $client->proppatch($this->davPath . '/' . ltrim($path, '/'), $properties, $folderDepth); + $response = $client->proppatch($this->davPath . $this->getFilesPath($user) . ltrim($path, '/'), $properties, $folderDepth); return $response; } diff --git a/build/integration/features/favorites.feature b/build/integration/features/favorites.feature index 86643fdd1e2..baf4eadb166 100644 --- a/build/integration/features/favorites.feature +++ b/build/integration/features/favorites.feature @@ -40,3 +40,41 @@ Feature: favorite |{http://owncloud.org/ns}favorite| And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "" + Scenario: Favorite a folder new endpoint + Given using dav path "remote.php/dav" + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a folder new endpoint + Given using dav path "remote.php/dav" + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + And user "user0" unfavorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "" + + Scenario: Favorite a file new endpoint + Given using dav path "remote.php/dav" + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a file new endpoint + Given using dav path "remote.php/dav" + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + And user "user0" unfavorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "" + diff --git a/core/css/styles.css b/core/css/styles.css index efc49e02a17..60b325111f8 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -490,8 +490,9 @@ label.infield { } #personal-show + label { height: 14px; - margin-top: 14px; - margin-left: -36px; + margin-top: -25px; + left: 295px; + display: block; } #passwordbutton { margin-left: .5em; diff --git a/settings/css/settings.css b/settings/css/settings.css index d66b0f82b55..3cebcfb8d9c 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -96,6 +96,10 @@ input#identity { padding: 3px; } +.password-state { + display: inline-block; +} + table.nostyle label { margin-right: 2em; } table.nostyle td { padding: 0.2em 0; } diff --git a/settings/js/personal.js b/settings/js/personal.js index e0c99ae774d..3290074a84c 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -197,8 +197,16 @@ $(document).ready(function () { if($('#pass2').length) { $('#pass2').showPassword().keyup(); } + + var removeloader = function () { + setTimeout(function(){ + if ($('.password-state').length > 0) { + $('.password-state').remove(); + } + }, 5000) + }; + $("#passwordbutton").click(function () { - OC.msg.startSaving('#password-error-msg'); var isIE8or9 = $('html').hasClass('lte9'); // FIXME - TODO - once support for IE8 and IE9 is dropped // for IE8 and IE9 this will check additionally if the typed in password @@ -210,12 +218,17 @@ $(document).ready(function () { var post = $("#passwordform").serialize(); $('#passwordchanged').hide(); $('#passworderror').hide(); + $("#passwordbutton").attr('disabled', 'disabled'); + $("#passwordbutton").after("<span class='password-loading icon icon-loading-small-dark password-state'></span>"); + $(".personal-show-label").hide(); // Ajax foo $.post(OC.generateUrl('/settings/personal/changepassword'), post, function (data) { if (data.status === "success") { + $("#passwordbutton").after("<span class='checkmark icon icon-checkmark password-state'></span>"); + removeloader(); + $(".personal-show-label").show(); $('#pass1').val(''); $('#pass2').val('').change(); - OC.msg.finishedSaving('#password-error-msg', data); } else { if (typeof(data.data) !== "undefined") { OC.msg.finishedSaving('#password-error-msg', data); @@ -230,6 +243,8 @@ $(document).ready(function () { ); } } + $(".password-loading").remove(); + $("#passwordbutton").removeAttr('disabled'); }); return false; } else { @@ -243,7 +258,6 @@ $(document).ready(function () { ); return false; } - }); $('#displayName').keyUpDelayedOrEnter(changeDisplayName); diff --git a/settings/templates/personal.php b/settings/templates/personal.php index bbb47f48bab..b7bb0c8bfc7 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -129,7 +129,7 @@ if($_['passwordChangeSupported']) { placeholder="<?php echo $l->t('New password');?>" data-typetoggle="#personal-show" autocomplete="off" autocapitalize="off" autocorrect="off" /> - <input type="checkbox" id="personal-show" name="show" /><label for="personal-show"></label> + <input type="checkbox" id="personal-show" name="show" /><label for="personal-show" class="personal-show-label"></label> <input id="passwordbutton" type="submit" value="<?php echo $l->t('Change password');?>" /> <br/> </form> |