Commit Graph

43254 Commits

Author SHA1 Message Date
Morris Jobke 24f1b8f01a
Merge pull request #8923 from nextcloud/typos
Fix some typos
2018-03-21 14:43:32 +01:00
Morris Jobke 78211a58e6
Remove unused methods of OC_Json
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 14:36:34 +01:00
Morris Jobke 2b73779568
Fix some typos
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 14:30:56 +01:00
Morris Jobke 8eb57dd835
Deprecate OCP\Files
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 14:29:35 +01:00
Morris Jobke 591d84f5fd
Remove deprecated and unused method OCP\User::getDisplayNames
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 14:19:59 +01:00
Morris Jobke 98b1f3fd57
Merge pull request #8914 from nextcloud/remove-unused-db-methods
Remove unused and deprecated methods of OCP\DB
2018-03-21 13:28:27 +01:00
Morris Jobke 76a59ff913
Merge pull request #8911 from nextcloud/cleanup-tests
Migrate tests for contacts manager to correct test class
2018-03-21 13:28:04 +01:00
Morris Jobke 3579487798
Remove unused and deprecated methods of OCP\DB
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 12:17:55 +01:00
Morris Jobke 514de5dfa1
Use isInstalled of AppManger instead of reimplement it
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 11:34:18 +01:00
Morris Jobke 934eade56f
Migrate tests for contacts manager to correct test class
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 10:43:18 +01:00
John Molakvoæ (skjnldsv) ffa2eaeb56
Fixed inline confirm icon index
Fixed bullet/icon combination visibility

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-21 10:36:17 +01:00
Joas Schilling dabd7291c3
Make the new autocomplete endpoint OCS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-21 09:46:52 +01:00
Morris Jobke c8340ace5c
Merge pull request #7904 from nextcloud/fix_7224
Add Cache-control: immutable
2018-03-21 08:27:09 +01:00
Daniel Calviño Sánchez 203bf51543 Keep showing the working icon while there are pending operations
Before, whenever a pending operation (getting the suggestions,
confirming a share or selecting a recipient) finished the working icon
was hidden and the confirm button was shown again, even if there were
other pending operations (the most common case is typing slowly on the
input field, as several operations to get the suggestions could pile if
the server response is not received fast enough). Now, the working icon
is not hidden until the last pending operation finishes.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-21 04:35:26 +01:00
Daniel Calviño Sánchez a2c52cd6a5 Extract code to restore the UI after confirming a share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-21 04:35:23 +01:00
Daniel Calviño Sánchez 9a0fbe307d Discard cached suggestions when adding a share
The suggestions depend on the results returned by the server, but also
on the sharees already shared with. Due to that adding a share changes
the suggestions, so now the cached suggestions are discarded when a
share is added.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-21 04:34:14 +01:00
Daniel Calviño Sánchez 6eb5cc5412 Reuse last suggestions if the same parameters are used
When a share is confirmed the suggestions are got to check if there is
an exact match. Usually the suggestions were already got with the same
parameters in order to fill the autocomplete dropdown, so to avoid a
superfluous request now the last suggestions are reused when got again,
although only if the same parameters as the last time are used.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-21 04:31:08 +01:00
Nextcloud bot af3ab1de10
[tx-robot] updated from transifex 2018-03-21 01:11:55 +00:00
Morris Jobke 18994cd700
Merge pull request #8821 from nextcloud/feature/noid/show-eol-warning
Show EOL warning in the update section
2018-03-20 22:39:00 +01:00
Daniel Calviño Sánchez 10a4f8e45e Confirm a share also by pressing enter on the input field
Besides confirming a share by clicking on the confirm button now it is
possible to do it by pressing enter on the input field.

Clicking on the confirm button implicitly hides the autocomplete
dropdown. On the other hand, pressing enter on the input field does not,
so the autocompletion must be disabled and closed when the confirmation
begins and then enabled again once it finishes. Otherwise the
autocomplete dropdown would be visible and it would be possible to
interact with it while the share is being confirmed.

The order in which the input field and the autompletion are disabled is
important. Internally, the autocompletion sets a timeout when the input
field is modified that requests the suggestions to the server and then
shows them in the dropdown. That timeout is not cancelled when the
autocompletion is disabled, but when the input field loses its focus and
the autocompletion is not disabled. Therefore, the input field has to be
disabled (which causes it to lose the focus) before the autocompletion
is disabled. Otherwise it could happen that while a share is being
confirmed the timeout ends, so an autocompletion request is sent and
then, once the share is successfully confirmed and thus the
autocompletion is enabled again, the request is received and the
autocomplete dropdown is shown with the old suggestions. Strange, but
possible nevertheless ;-)

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:05 +01:00
Daniel Calviño Sánchez 9371b61c4d Add a share when clicking on the confirm button
Clicking on the confirm button now adds a share, but only if there is
just a single exact match. If there are no exact matches or there is
more than one exact match no share is added, and the autocomplete
dropdown is shown again with all the suggestions.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:05 +01:00
Daniel Calviño Sánchez 5e2a8cca1b Return also exact matches besides all suggestions
"_getSuggestions" returned all the suggestions from the server, which
are composed by exact matches and partial matches. Now the exact matches
are also returned on their own parameter. This will be used by the
button to confirm a share.

Note that until now the order of the suggestions was "exact users,
partial users, exact groups, partial groups, exact..."; this commit also
changes that order to become "exact users, exact groups, exact...,
partial users, partial groups, partial...". This is not a problem, as
the suggestions were used in the autocomplete dropdown, and this new
order is arguably better than the old one, as all exact matches appear
now at the beginning.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 89b0e34d9b Extract code to filter suggestions to its own function
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 1c440519c2 Show an error when getting the suggestions succeeds with failure content
Instead of silently failing now an error is shown to the user when the
ajax call to get the suggestions succeeds yet it returns failure content
(for example, if an "OCSBadRequestException" was thrown in the server).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez ed1452d7a0 Use "showTemporary" instead of explicitly hiding the notification
"OC.Notification.hide" expects the notification to be hidden to be
passed as an argument. As it was being used to show a temporary
notification the combination of "OC.Notification.show" and
"OC.Notification.hide" was replaced by a single call to
"OC.Notification.showTemporary".

The timeout could have been specified in the options of the call, but it
was left to the default value (7 seconds) for consistency with other
notifications.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez fcef15af80 Move stub setup outside the test method
Stubs should be restored outside the test method in which they are used
to ensure that they are properly restored no matter the result of the
test (for example, if an exception is thrown).

Besides that, this will make possible to reuse the stub in other sibling
tests without having to explicitly setup it in them.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez d606219576 Extract code to get suggestions to its own method
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 3980364b6d Add autocompletion tests for each type of share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 8af9c553e6 Add tests for exact search results already shared with
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 375eab9df3 Add tests for emails and circles already shared with
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:04 +01:00
Daniel Calviño Sánchez 6fef01c481 Adjust search term to test
As the server response is faked the search term is ignored in the tests.
However, it is clearer to use a search term that would make the server
return what the faked response contains.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-20 19:09:03 +01:00
Jan-Christoph Borchardt ce7775acd0 Replace information icon with confirmation button in share input
The confirmation button right now is just an icon; its behaviour will be
added in the following commits.

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-03-20 19:09:03 +01:00
Morris Jobke 29c551c88f
Merge pull request #8847 from nextcloud/ocs-api-userdetails
Add userdetails to ocs api
2018-03-20 18:12:25 +01:00
Joas Schilling ec1e039790
Show EOL warning in the update section
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-20 15:52:30 +01:00
Joas Schilling 64feb3f391
Merge pull request #8861 from nextcloud/rakekniven-patch-1
Update ThemingController.php
2018-03-20 13:45:20 +01:00
Roeland Jago Douma 99abe3bc8e
Merge pull request #8864 from nextcloud/ocs-allow-empty-email-displayname
Allow empty emails provisioning api
2018-03-20 09:44:38 +01:00
Roeland Jago Douma 16ae91330c
Merge pull request #8887 from nextcloud/fix-appmenu-min-width
Add min width of two icons to the app menu
2018-03-20 08:03:52 +01:00
Nextcloud bot 615258ba26
[tx-robot] updated from transifex 2018-03-20 01:11:33 +00:00
blizzz 7ae42f1f5d
Merge pull request #8822 from nextcloud/fix/8641/undefined-index
the FN is optional, carrying the displayname if present
2018-03-19 17:57:12 +01:00
Julius Härtl 1699b119dd
Add min width of two icons to the app menu
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-19 17:12:59 +01:00
John Molakvoæ (skjnldsv) 24659342f5
fixup! Check if groups is array, return empty do not throw
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-19 15:12:32 +01:00
rakekniven 789221a0fc
Update ThemingControllerTest.php
Adjusted test
2018-03-19 15:07:49 +01:00
rakekniven d88db9b496
Update ThemingController.php
Changed file according to discussion on PR.
2018-03-19 15:00:27 +01:00
Roeland Jago Douma 796b4f19f8
Add Cache-control: immutable
Cache generated CSS forever!
Also cache combined JS forever
Fix tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-19 14:21:53 +01:00
Roeland Jago Douma 734cddfa97
Merge pull request #8880 from nextcloud/delete_unused_download
Remove unused download.php
2018-03-19 14:18:51 +01:00
Roeland Jago Douma 1c1608cddb
Merge pull request #8871 from nextcloud/3rdparty-bump-openstack-3-0-5
[3rdparty] Bump php-opencloud/openstack to 3.0.5
2018-03-19 14:18:27 +01:00
Roeland Jago Douma ce0c896d8f
Merge pull request #8881 from nextcloud/setUserValue_opt
Store setUserValue as string in cache
2018-03-19 14:17:59 +01:00
Roeland Jago Douma 431750828e
Store setUserValue as string in cache
We cache the values we set in the setUserValue function.
However since the values are strings in the database we check if a value
is equal with string comparison

Now if the function was called with a $value of int or float. It would
be stored in the DB (and thus converted to string) and in the cache (not
converted thus as int/float).

Now if another call comes in that sets it to the same value (I'm looking
at you LDAP!). The check would fail since we would be comparing
int/float to string which fails by definition.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-19 12:57:48 +01:00
Roeland Jago Douma 9834f33d56
Merge pull request #8878 from nextcloud/remove_tmpfile
Remove deprecated tmpFile/tmpFolder
2018-03-19 12:29:08 +01:00
Roeland Jago Douma 0929e048f8
Merge pull request #8879 from nextcloud/dep_json
Remove unused deprecated functions from OCP\JSON
2018-03-19 12:28:23 +01:00