Commit Graph

116 Commits

Author SHA1 Message Date
Christoph Wurst 278c281cc9
Deprecate oc_current_user, fix usage and move currentUser to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-08 09:44:51 +02:00
Christoph Wurst acf0ca1541
Move OC.appswebroots to the bundle and deprecate oc_appswebroots
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-07 14:03:14 +02:00
Julius Härtl 2a17811caf
Use property to check if a share entry is shared with the current user
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-02 12:10:48 +01:00
Julius Härtl 59377dbd50
Remove reshare owner entry from the share list
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-02 12:09:29 +01:00
Julius Härtl b73e03724c
Show share settings for owner and reshare owners only
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-11-02 12:09:29 +01:00
Morris Jobke f28691c26e
Merge pull request #11844 from nextcloud/multiple-link-shares
allow to create multiple link shares via share api
2018-11-01 22:36:09 +01:00
John Molakvoæ (skjnldsv) 206d6126b6 Fix note display
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 21:30:45 +01:00
Julius Härtl 2c990ade77
Do not set indeterminate state for file shares
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-31 11:23:23 +01:00
Roeland Jago Douma 8932a51b91
Extract translated strings of compiled handlebars
Follow up to #11615

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-05 12:32:48 +02:00
Roeland Jago Douma b0fd31496b
Move OC.Share to compiled handlebars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-10-04 09:53:45 +02:00
Daniel Calviño Sánchez 2d062daa11 Add custom handling for room shares to the list of sharees
Like done for other types of shares, room shares are now explicitly
described as such in the UI.

The avatar used is the image provided in the "shareWithAvatar" property
of the share. If none is given then the avatar is the first letter of
the display name of the room share with a coloured background seeded
from the room token. If the display name of the room is empty then no
letter is shown in the avatar; no special handling is done in that case.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:43 +02:00
Roeland Jago Douma bc83656604
Reword share comment feature
Fixes #10403

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-31 14:20:22 +02:00
Daniel Calviño Sánchez 911093549e Make possible to enable "sending password by Talk" from the share menu
Until now the password to be sent by mail was set by enabling a checkbox
in the share menu and then entering the password in an input field shown
below. Now, when Talk is enabled, another item is added to the share
menu to do the same for a password to be sent by Talk.

Sending the password by mail and sending it by Talk are mutually
exclusive actions, so when one of the checkboxes is enabled the other
one is automatically disabled.

Note that the icon set for the field, "icon-passwordtalk", does not
currently exist; it simply mimics the "icon-passwordmail" (which does
not exist either) used for the field of the password protect by mail to
get the right padding in the menu.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 14:45:42 +02:00
Julius Härtl e302cadae2
Don't use shorthand syntax for functions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-21 15:02:21 +02:00
John Molakvoæ (skjnldsv) d4de77afb9
No remote note and various fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:21 +02:00
John Molakvoæ (skjnldsv) 3a11c26cb4
Public fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:20 +02:00
John Molakvoæ (skjnldsv) c71d3dc9bf
Public share
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:20 +02:00
Bjoern Schiessle 967a97904f
fix post url
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:20 +02:00
John Molakvoæ (skjnldsv) fc2767bbbb
Autoresize + autoloader
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:20 +02:00
John Molakvoæ (skjnldsv) 0a7e34f6c8
Popovermenu migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:20 +02:00
John Molakvoæ (skjnldsv) 4e08d8342e
UI set share note!
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-21 15:02:20 +02:00
Morris Jobke 82021b2b1b
Merge pull request #5280 from nextcloud/shared-with-display-name
sharedWithDisplayName & sharedWithAvatar
2018-07-13 17:29:57 +02:00
Bjoern Schiessle 2abc705632
start to get fed group shares into the share dialog
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:11:47 +02:00
Maxence Lange 0009adae80 SharedWithDisplayName + SharedWithAvatar
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-05-21 01:24:45 +02:00
Daniel Calviño Sánchez f8e3b572c8 Remove no longer needed escaping of special characters
The escaping of special characters was needed when the ids of the
permission checkboxes for shares were based on the "shareWith" field.
Since they are based on the "shareId" field the escaping is no longer
needed, as the "sharedId" is expected to always contain compatible
characters.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-18 17:03:45 +02:00
Daniel Calviño Sánchez 1466586033 Fix ids of permission checkboxes for shares
The ids of permission checkboxes for shares were generated using the
"shareWith" field of the share. The "shareWith" field can contain spaces
(as spaces are allowed, for example, in user or circle names), so this
could cause the id attribute of the HTML element to contain spaces too,
which is forbidden by the HTML specification.

It is not just a "formal" issue, though; when the list was rendered, if
the id contained a space the selector to get the checkbox element was
wrong (as it ended being something like
"#canEdit-view1-name with spaces") and thus the initial state of the
checkbox was not properly set.

Besides that, "shareWith" can contain too single quotes, which would
even cause the jQuery selector to abort the search and leave the UI in
an invalid state.

Instead of adding more cases to the regular expression to escape special
characters and apply it too when the ids are created now the ids of
permission checkboxes for shares are based on the "shareId" field
instead of on "shareWith", as "shareId" is expected to always contain
compatible characters.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-18 15:25:23 +02:00
Daniel Calviño Sánchez ed4b4458eb Use the display name in the avatar for a circle share
Before, the avatar for a circle share was generated using the
"share_with" field as the seed for "imageplaceholder". Due to this, when
the "share_with" field is set to the circle ID the character shown in
the avatar was just a random character instead of the first character of
the display name. Now the "share_with" is still used as the seed for the
colour, but the display name is used as the text of the avatar.

This adds support for "share_with" fields set to the circle ID while
being backwards compatible with "share_with" fields set to the circle
name.

Note that when "share_with" fields is set to the circle name the colour
of the avatar is different in the list of suggested sharees and in the
list of current sharees, but that also happened before these changes
(due to a different seed being used in each place).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-16 04:58:25 +01:00
Roeland Jago Douma ad7ddbc068
Set autocomplete=new-password for mail share password
This avoids the browser to do autocompletion on the mail share password
field.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-28 13:47:06 +01:00
Maximilian Wende 7c453b2425
Update tests for indeterminate state, fix slashes not being escaped
Signed-off-by: Maximilian Wende <dasisdormax@mailbox.org>
2018-02-16 11:42:41 +01:00
Maximilian Wende 602f50b2d4
Fix indeterminate checkbox state not showing correctly
Also, the checkbox is updated to the correct state while a
permission change is in progress.

should fix issue #8371

Signed-off-by: Maximilian Wende <dasisdormax@secure.mailbox.org>
2018-02-15 22:41:09 +01:00
Maximilian Wende d4238a52b2
Add indeterminate state to 'can edit' share permission checkbox, see #8371
Signed-off-by: Maximilian Wende <dasisdormax@secure.mailbox.org>
2018-02-15 21:10:39 +01:00
John Molakvoæ (skjnldsv) 6127d19f54
Fixed default expire date and placeholder
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-05 08:26:01 +01:00
John Molakvoæ (skjnldsv) bcad10075e
Share datepicker fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-01-03 14:02:45 +01:00
Arthur Schiwon a1d4ac6d43
only replace permission popupmenu
the contacts popovermenu is also present and is being replaces, ending
up in two permission popupmenus with checkboxes duplicating the id,
breaking further permission changes.

plus, fixing a selector

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-17 17:08:29 +01:00
Bjoern Schiessle e9ab452ff3
rename secure drop back to files drop because of name collision with securedrop.org
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-05-18 16:55:58 +02:00
Morris Jobke 11b9d224fd
Fix semicolon at end of JS lines
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-01 00:42:53 -03:00
Georg Ehrke 8f404c1f56
don't toggle sharing popover together with contactsmenu popover
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:28:14 +02:00
Georg Ehrke 60f9ed6241
add contactsmenu popover
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-04-26 09:26:53 +02:00
Bjoern Schiessle f0651cb066
allow to set a password for shares which where created without a password before the admin started to enforce the password
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-20 16:33:26 +02:00
Bjoern Schiessle d8dcd72118
allow admin to enforce password on mail shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-20 16:33:26 +02:00
Roeland Jago Douma 58f959864a
Show 'shared via' in share list for reshares
Fixes #1330

userA shares a file to userB
userB shares that file to userC

userA can see both userB and userC.
Now they can also see that userB shared it to user C

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-11 13:56:03 +02:00
Roeland Jago Douma bf30090be5
Parse date trough moment
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-04-07 22:16:29 +02:00
Bjoern Schiessle 0dc13d098f
reset password field properties before we hide it
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:44:00 +02:00
Bjoern Schiessle c7b1a48da7
add datepicker to the popover
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:44:00 +02:00
Bjoern Schiessle 3bce6a7a6f
allow to edit single files shared by mail. This is useful for collaborative editing documents
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:44:00 +02:00
Bjoern Schiessle 3323d01db1
update unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-07 15:43:59 +02:00
Bjoern Schiessle 5540def5e3
change permission order
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-03 10:29:33 +02:00
Bjoern Schiessle 99ebdc1111
make sure that variables are defined correctly
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-03 10:29:33 +02:00
Bjoern Schiessle cfbabf8f2f
fix typo and capitalize cruds
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-03 10:29:32 +02:00
Bjoern Schiessle b84fd7c361
set expire date for all share types
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-03 10:29:32 +02:00