summaryrefslogtreecommitdiffstats
path: root/core/js
Commit message (Collapse)AuthorAgeFilesLines
* Improve URL detectionJoas Schilling2018-08-232-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Do not bind reset password link if an url is setJohn Molakvoæ (skjnldsv)2018-08-171-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Improve url detection in commentsJoas Schilling2018-07-112-9/+58
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix "parsing" of email-addresses in comments and chat messagesJoas Schilling2018-07-111-2/+2
| | | | | | | | | \\b matches any non-word character, including \@ and \- In order to not detect urls in the middle of email-addresses, we need to check for white space characters and beginning of the message instead. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove no longer needed escaping of special charactersDaniel Calviño Sánchez2018-05-101-3/+1
| | | | | | | | | | 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>
* Fix ids of permission checkboxes for sharesDaniel Calviño Sánchez2018-05-102-11/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 after a permission change, 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 updated 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>
* Add proper ARIA attributes and structure to header for accessibility, thanks ↵Jan-Christoph Borchardt2018-05-091-0/+8
| | | | | | to @MarcoZehe Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Use the display name in the avatar for a circle shareDaniel Calviño Sánchez2018-03-202-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* Set autocomplete=new-password for mail share passwordRoeland Jago Douma2018-02-281-1/+1
| | | | | | | This avoids the browser to do autocompletion on the mail share password field. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Removed additional and uneccessary request on password reset, to fix ↵Luca Adrian Lindhorst2018-01-241-8/+1
| | | | | | redirection afterwards. Signed-off-by: Luca Adrian Lindhorst <info@lucalindhorst.de>
* Merge pull request #7709 from ↵Morris Jobke2018-01-111-1/+1
|\ | | | | | | | | nextcloud/fix-password-displayed-as-username-in-password-manager Fix password displayed as username in Firefox password manager dialog
| * Fix password displayed as username in Firefox password manager dialogDaniel Calviño Sánchez2018-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When finishing the setup of Nextcloud through the WebUI (setting admin user and database) Firefox offers to save the username and password. However, the password was shown in both the username and password fields of the Firefox password manager dialog. The problem was that the password input element (in the HTML form) is cloned in a text input element, which is used to show the password in plain text when clicking on the "Show password" button. As it was a text input immediately followed by a password input Firefox seemed to assume that it had to be the username and ignored the real username field, no matter the value set for the "autocomplete" attribute. Now the cloned text input is added after the password input, so Firefox no longer thinks that the cloned text input is the username field and the password manager dialog shows the proper username instead. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #7650 from rpirritano/masterMorris Jobke2018-01-111-0/+1
|\ \ | | | | | | made small changes to login screen
| * | made small changes to login screenRobert Pirritano2018-01-111-0/+1
| | | | | | | | | | | | | | | | | | added height back 70px back to footer and removed .htaccess file Signed-off-by: Robert R Pirritano <rpirritano@gmail.com>
* | | Adds rel="noopener noreferrer" to _blank links inside commentsThomas Citharel2018-01-111-1/+1
|/ / | | | | | | | | | | For more details, check out https://mathiasbynens.github.io/rel-noopener/ for instance Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | Merge pull request #7635 from Abijeet/bug-7106Roeland Jago Douma2018-01-102-2/+66
|\ \ | | | | | | Fixes password input being prompted every time.
| * | Add extra test cases for password confirmationDaniel Calviño Sánchez2018-01-101-2/+26
| | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * | Added test cases for the fix for the password confirmation box appearing ↵Abijeet2018-01-101-0/+37
| | | | | | | | | | | | | | | | | | repeatedly. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
| * | Fixes password input being prompted every time.Abijeet2018-01-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #7106 - Echoing the current server time via a JS variable and storing the current time on page load in JS. - Calculating the diff and taking it into account when deciding whether to show the password confirmation. Signed-off-by: Abijeet <abijeetpatro@gmail.com>
* | | opens comments links in _blank 🙊Arthur Schiwon2018-01-081-1/+1
| | | | | | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | Fix testsJulius Härtl2018-01-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The avatar plugin should not change the display element, since the avatar is always shown by default and the display value is up to the developers Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Remove show() function since we always show the avatar containerJulius Härtl2018-01-082-4/+2
|/ / | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #7477 from nextcloud/date-time-picker-position-fixMorris Jobke2018-01-051-11/+8
|\ \ | |/ |/| Date time picker position fix & design fixes
| * Fixed default expire date and placeholderJohn Molakvoæ (skjnldsv)2018-01-051-1/+3
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Share datepicker fixJohn Molakvoæ (skjnldsv)2018-01-031-10/+5
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Fixed js typehint for showHtml methodsplitt3r2018-01-041-1/+1
| |
* | format links in commentsArthur Schiwon2018-01-033-0/+62
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #7487 from nextcloud/no-password-confirm-with-ssoblizzz2018-01-031-1/+2
|\ | | | | disable password confirmation with SSO
| * disable password confirmation with SSOBjoern Schiessle2018-01-021-1/+2
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Merge pull request #7526 from ↵Morris Jobke2018-01-032-1/+463
|\ \ | |/ |/| | | | | nextcloud/make-possible-for-apps-to-disable-the-navigation-bar-slide-gesture Make possible for apps to disable the navigation bar slide gesture
| * Force the drag to end when the navigation bar Snap is disabled by an appDaniel Calviño Sánchez2017-12-142-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Snap was disabled it stopped listening to the events, but if a drag gesture was being performed it was kept as active. Thus, when the Snap was enabled again move events were handled as if the Snap had never been disabled, causing the gesture handling to continue where it was left. When the Snap for the navigation bar is disabled by an app it could be as a result of a different gesture being recognized by the app (for example, a vertical swipe) once both gestures have started. In that case when the other gesture ends and the Snap is enabled again any pointer movement will cause the navigation bar to slide until an "up" event is triggered again (obviously not the desired behaviour). Due to all this now when the Snap for the navigation bar is disabled by an app the current drag gesture for the navigation bar is ended. Note that this was added as a parameter to "Snap.disable()" instead of done unconditionally to keep back-compatibility with the previous behaviour (probably not really needed as it is unlikely that any app is using the Snap library relying on that behaviour... but just in case). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Make possible for apps to disallow the navigation bar slide gestureDaniel Calviño Sánchez2017-12-142-1/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On narrow screens a slide gesture can be used to open or close the navigation bar. However that gesture could conflict at times with the gestures used by certain apps (for example, if the right sidebar is open the user may expect to close it by dragging it to the right, but that could open the navigation bar instead depending on how the events are handled). This commit makes possible for apps to disallow and allow again that slide gesture. In any case, note that applications can only disallow the gesture, but they can not enable it. That is, they can prevent the gesture from being used on narrow screens, but they can not make the gesture work on wide screens; they are always limited by the base rules set by the core. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * Add unit tests for the navigation bar slide gestureDaniel Calviño Sánchez2017-12-141-0/+104
| | | | | | | | | | | | | | | | The slide gesture is enabled or disabled depending on the width of the browser window. In order to easily control that width the karma-viewport plugin is now used in the unit tests. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix testsRoeland Jago Douma2017-12-191-77/+60
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Also do callback on the failing functionRoeland Jago Douma2017-12-191-0/+4
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Fix fallback when image loading failsJulius Härtl2017-12-191-46/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the new avatar endpoint there is no difference between unknown users and errors when generating the placeholder avatar. Therefore the avatar function will now show the old placeholder if both a user and displayname was given as parameters. In case there is no displayname provided we cannot build the proper placeholder so the unknown user placeholder is shown. The displayname is not required for the avatar anymore, so we can get rid of the old code path for placeholders. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Still call callback once avatar is loadedRoeland Jago Douma2017-12-191-0/+4
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Add loading icon on avatarJohn Molakvoæ (skjnldsv)2017-12-192-3/+5
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Since we now always generate an avatar do not load the placeholderRoeland Jago Douma2017-12-191-5/+0
| | | | | | | | | | | | | | The js and php code differ ever so slightly. So having the placeholder for a second and then the image is just weird. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Use javascript to send the actual password resetRoeland Jago Douma2017-12-191-0/+1
|/ | | | | | | | | | Fixes #7574 During some refactoring the event linked to password reset got removed. This ment that we just submitted a normal POST but without the CSRF token. And none of the js magic to redirect afterwards. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add testsRoeland Jago Douma2017-12-131-9/+50
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add warning regarding freetype supportRoeland Jago Douma2017-12-131-0/+9
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Set autocomplete on share password inputRoeland Jago Douma2017-12-121-2/+2
| | | | | | Fixes #6821 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #6079 from nextcloud/fix-antivirusblizzz2017-12-112-12/+53
|\ | | | | Parse Sabre Exception in OC.Files.Client and file-upload
| * Parse Sabre Exception in OC.Files.Client and file-uploadVincent Petry2017-11-132-12/+53
| | | | | | | | | | | | | | | | In case of error, instead of a generic error message, an upload will display whichever message is returned in the Sabre Exception, if applicable. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Merge pull request #7390 from nextcloud/update-php-infoMorris Jobke2017-12-081-0/+6
|\ \ | | | | | | Show hint that PHP 5.6 will not be supported in Nextcloud 14 anymore
| * | Show hint that PHP 5.6 will not be supported in Nextcloud 14 anymoreMorris Jobke2017-12-081-0/+6
| | | | | | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | | Merge pull request #6670 from nextcloud/handle-encryption-state-in-web-interfaceTobias Kaminsky2017-12-066-3/+38
|\ \ \ | |/ / |/| | Handle encryption state in web interface
| * | show e2e folder icon on encrypted foldersBjoern Schiessle2017-11-204-1/+15
| | | | | | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
| * | check for encryption state on propfindBjoern Schiessle2017-11-202-2/+23
| | | | | | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>