summaryrefslogtreecommitdiffstats
path: root/core/js
Commit message (Collapse)AuthorAgeFilesLines
* Fix code integrity check-warning linkMarius Blüm2018-06-291-1/+1
| | | Signed-off-by: Marius Blüm <marius@lineone.io>
* Merge pull request #5623 from nextcloud/locale-settingMorris Jobke2018-06-291-0/+9
|\ | | | | Add user locale/region setting
| * fix OC.getLocale()Georg Ehrke2018-06-271-1/+1
| | | | | | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
| * OC.getLocale() now returns Locale and no longer LanguageThomas Citharel2018-06-271-0/+9
| | | | | | | | | | | | | | Added OC.getLanguage() to get Language <html lang=''> still gets language, though according to IETF BCP47 locale should be good. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | Fix "parsing" of email-addresses in comments and chat messagesJoas Schilling2018-06-271-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>
* prefill userid for login after password resetRobin Appelman2018-06-211-7/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #9518 from ↵Roeland Jago Douma2018-06-211-0/+9
|\ | | | | | | | | nextcloud/feature/5986/public_share_controller_middleware Public share middleware & controller
| * Move public auth page overRoeland Jago Douma2018-06-201-0/+9
| | | | | | | | | | | | | | Now this is in core so the basics (that 99% of the app will want to use) looks always the same. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | IE11 css vars compatibilityJohn Molakvoæ (skjnldsv)2018-06-202-1/+7
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #9197 from nextcloud/fix-avatar-centerMorris Jobke2018-06-151-3/+6
|\ | | | | Fix avatar generator centering
| * Unify colour algorithm outputJohn Molakvoæ (skjnldsv)2018-06-131-3/+6
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge all setup checks into one controllerMorris Jobke2018-06-132-12/+201
|/ | | | | | * renamed hasMissingIndexes to missingIndexes Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #9836 from ↵Morris Jobke2018-06-133-14/+32
|\ | | | | | | | | nextcloud/feature/noid/merge-tips-and-tricks-into-setup-checks Merge tips & tricks section into setup checks
| * Merge tips & tricks section into setup checksMorris Jobke2018-06-133-14/+32
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix wrong hint about missing indexesMorris Jobke2018-06-132-11/+21
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add a hint that some indexes are not added yetMorris Jobke2018-06-061-0/+15
| | | | | | | | | * gives the admin a chance to discover the missing indexes and improve the performance of the instance without digging through the manual * nicely integrated in the setup checks where this kind of hints belong to * also adds an option to integrate this from an app based on events * fix style of setting warnings Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add referrer policy setup checkRoeland Jago Douma2018-06-042-4/+226
| | | | | | | | | | | | | | | | Fixes #9122 Based on https://www.w3.org/TR/referrer-policy/ and https://scotthelme.co.uk/a-new-security-header-referrer-policy/ Setting a sane Referrer-Policy will tell the browser if/when to send referrer headers when accessing a link from Nextcloud. When configured properly this results in less tracking and less leaking of (possibly) sensitive urls * Fix tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add placeholder to input in OCdialog promptJulius Härtl2018-05-241-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Allow to specify custom text on admin password confirmation dialogsJulius Härtl2018-05-241-13/+29
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move the webui over to the new dav endpointRoeland Jago Douma2018-05-081-1/+1
| | | | | | We should use the new dav endpoint everywhere now. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #9151 from UncleAlbie/dialog-sortMorris Jobke2018-05-071-1/+1
|\ | | | | Sort files in dialog by name.
| * Sort files in dialog by name.Patrik Novotný2018-04-181-1/+1
| | | | | | | | Signed-off-by: Patrik Novotný <patrik.novotny@gmx.com>
* | Do not add sharePermission logic in JSRoeland Jago Douma2018-04-262-2/+19
| | | | | | | | | | | | | | We have a dedicated dav property. We should do all the magic in 1 place. Not several. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #9224 from nextcloud/accessibility-improvementsMorris Jobke2018-04-191-0/+7
|\ \ | | | | | | Add labels for Contacts menu and Settings, thanks to @MarcoZehe
| * | Add proper ARIA attributes and structure to header for accessibility, thanks ↵Jan-Christoph Borchardt2018-04-181-0/+7
| |/ | | | | | | | | | | to @MarcoZehe Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* | Remove no longer needed escaping of special charactersDaniel Calviño Sánchez2018-04-181-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-04-182-11/+41
|/ | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix js tests with placeholderJohn Molakvoæ (skjnldsv)2018-04-131-5/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #8535 from nextcloud/new-color-generatorJan-Christoph Borchardt2018-04-121-53/+61
|\ | | | | New color generator algorithm
| * Fixed documentationJohn Molakvoæ (skjnldsv)2018-04-061-7/+7
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * New algorithmJohn Molakvoæ (skjnldsv)2018-04-061-46/+54
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Merge pull request #8820 from nextcloud/mtime-sortMorris Jobke2018-04-121-1/+1
|\ \ | | | | | | Sorts filepicker files by modified date
| * | sorts filepicker files by modified dateSagorika Das2018-03-141-1/+1
| | | | | | | | | | | | Signed-off-by: Sagorika Das <sagorika1996@gmail.com>
* | | Merge pull request #9002 from nextcloud/whitespaceJan-Christoph Borchardt2018-04-101-4/+0
|\ \ \ | |_|/ |/| | More whitespace: Increase header height from 45px to 50
| * | Fix app menu, popovers and searchboxJulius Härtl2018-04-041-4/+0
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Move external share saving to templateJulius Härtl2018-04-051-0/+7
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | Move styling and menu handling to publicpage.jsJulius Härtl2018-04-051-2/+13
|/ / | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Keep showing the working icon while there are pending operationsDaniel Calviño Sánchez2018-03-212-17/+94
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Extract code to restore the UI after confirming a shareDaniel Calviño Sánchez2018-03-211-30/+15
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Discard cached suggestions when adding a shareDaniel Calviño Sánchez2018-03-211-0/+6
| | | | | | | | | | | | | | | | | | 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>
* | Reuse last suggestions if the same parameters are usedDaniel Calviño Sánchez2018-03-212-1/+192
| | | | | | | | | | | | | | | | | | | | 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>
* | Confirm a share also by pressing enter on the input fieldDaniel Calviño Sánchez2018-03-202-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add a share when clicking on the confirm buttonDaniel Calviño Sánchez2018-03-202-1/+447
| | | | | | | | | | | | | | | | | | 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>
* | Return also exact matches besides all suggestionsDaniel Calviño Sánchez2018-03-202-16/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "_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>
* | Extract code to filter suggestions to its own functionDaniel Calviño Sánchez2018-03-201-60/+64
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Show an error when getting the suggestions succeeds with failure contentDaniel Calviño Sánchez2018-03-202-10/+16
| | | | | | | | | | | | | | | | 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>
* | Use "showTemporary" instead of explicitly hiding the notificationDaniel Calviño Sánchez2018-03-202-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "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>
* | Move stub setup outside the test methodDaniel Calviño Sánchez2018-03-201-4/+11
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Extract code to get suggestions to its own methodDaniel Calviño Sánchez2018-03-201-73/+92
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Add autocompletion tests for each type of shareDaniel Calviño Sánchez2018-03-201-25/+283
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>