summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js
Commit message (Collapse)AuthorAgeFilesLines
* Prevent special characters from breaking the file drop remote urlJohn Molakvoæ (skjnldsv)2018-12-191-0/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Remove event handler no longer neededDaniel Calviño Sánchez2018-10-231-6/+0
| | | | | | | | | | | | | | The custom handler for "URL changed" events were added to reload the file list whenever the sections for favorites and shares were opened; this was used to fix the problem of not reloading the file lists when opening them for a second time. However, besides that the handlers were not really necessary, and as the root of the bug was fixed in the previous commit those handlers are now removed. The file list for tags uses the handler for a different purpose, though, so that one was kept. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix opening a section again in the Files appDaniel Calviño Sánchez2018-10-231-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a section is open in the Files app a "show" event is triggered. File list objects handle that event by reloading themselves, but only if the file list was shown at least once. However, the file list objects of plugins are created when the "show" event is triggered for the first time for their section; as the file list objects register their handler for the "show" event when they are created they never handle the first triggered "show" event, as the handler is set while that event is being already handled. Therefore, from the point of view of the handler, the second time that a "show" event was triggered it was seen as if the file list was shown for the first time, and thus it was not reloaded. Now the "shown" property is explicitly set for those file lists that are created while handling a "show" event, which causes them to be reloaded as expected when opening their section again. Note that it is not possible to just reload the file list whenever it is shown; the file list is reloaded also when the directory changes, and this can happen when the web page is initially loaded and the URL is parsed. In that case, if file lists were reloaded when shown for the first time then it could be reloaded twice, one with the default parameters due to the "show" event and another one with the proper parameters once the URL was parsed, and the files that appeard in the list would depend on which response from the server was received the last. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #10838 from nextcloud/header-fixes-and-public-noteMorris Jobke2018-08-241-0/+31
|\ | | | | Header fixes and public note
| * Tests fixesJohn Molakvoæ (skjnldsv)2018-08-241-4/+7
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Fix mobile view and add public share note viewJohn Molakvoæ (skjnldsv)2018-08-241-0/+28
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | returning of $tr is expected, otherwise ending up in a JS errorArthur Schiwon2018-08-231-0/+1
|/ | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #10700 from nextcloud/fix/10516/sharepermissionsMorris Jobke2018-08-201-21/+4
|\ | | | | Fix share dialog sidebar in share views
| * remove unexecutable codeArthur Schiwon2018-08-151-21/+4
| | | | | | | | | | | | | | OCA.Sharing.SharedFileInfo was never defined and that stopped execution. Interestingly, FF never showed me an error. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Do not show action menu if no actions are availableJohn Molakvoæ (skjnldsv)2018-08-151-3/+5
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #10255 from nextcloud/add-support-for-room-sharesBjörn Schießle2018-08-091-0/+2
|\ | | | | Add support for room shares
| * Add room shares to DAV and recent files "share-types" propertyDaniel Calviño Sánchez2018-08-081-0/+2
| | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | Fix multiSelectMenu for public shares #10536MartB2018-08-061-1/+18
|/ | | | Signed-off-by: Martin Böh (MartB) <mart.b@outlook.de>
* Use OC.generateUrl to properly prefix preview imagesJulius Härtl2018-07-261-3/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fixed scrolling containerJohn Molakvoæ (skjnldsv)2018-07-242-6/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Cleanup structureJohn Molakvoæ (skjnldsv)2018-07-201-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Jsuinit fixesJohn Molakvoæ (skjnldsv)2018-07-171-3/+10
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Rename "Shares overview" to "Shares"Morris Jobke2018-07-161-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix share by/with checkJohn Molakvoæ (skjnldsv)2018-07-141-4/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed sharing coding style and display - Added all shares overviewJohn Molakvoæ (skjnldsv)2018-07-131-112/+71
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Fixed if condition Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Tiny start of the share overviewRoeland Jago Douma2018-07-132-19/+116
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fixed jsunitJohn Molakvoæ (skjnldsv)2018-07-051-2/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Disable sidebar on deleted shareJohn Molakvoæ (skjnldsv)2018-07-053-8/+22
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Js magic for deleted sharesJohn Molakvoæ (skjnldsv)2018-07-052-14/+93
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix index.php linksRoeland Jago Douma2018-06-201-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move public auth page overRoeland Jago Douma2018-06-201-9/+0
| | | | | | | 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>
* Move public preview endpoint overRoeland Jago Douma2018-06-201-6/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove ellipsis below public text file sharesMorris Jobke2018-05-221-0/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Do not add sharePermission logic in JSRoeland Jago Douma2018-04-261-14/+1
| | | | | | | 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>
* Move external share saving to templateJulius Härtl2018-04-051-10/+10
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move styling and menu handling to publicpage.jsJulius Härtl2018-04-051-17/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fixed ext share style and use varable for popover heightJohn Molakvoæ (skjnldsv)2018-03-071-6/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Improved inline confirm icon with opacity and fixed ext share loading stateJohn Molakvoæ (skjnldsv)2018-03-071-19/+21
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Show share owner avatars on all file listsJulius Härtl2018-02-091-0/+4
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix closing menu on second click in sharing pageDaniel Calviño Sánchez2017-12-211-2/+5
| | | | | | | | | | | | | | | | | When a "mouseup" event was triggered on any element except on the share menu or its descendants the share menu was closed. The share menu toggle is not a descendant of the share menu, so clicking on it when the share menu was shown closed it by removing its "open" CSS class. However, once that happened the click event was then handled by the share menu toggle, which toggled the "open" CSS class in the share menu and thus added it again. So, from the user point of view, nothing happened when clicking on the share menu toggle if the share menu was open. Now a "mouseup" event on the share menu toggle no longer closes the share menu, and thus toggling the "open" CSS class when handling the "click" event works as expected. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* recycle SharedFileInfo values in fileInfoArthur Schiwon2017-11-231-1/+21
| | | | | | | | | fileInfo is composed of data from sharing, however additional data is pulled when sidebar opens, e.g. the size. Then, existing data is overwritten by data from the other source (files). The data points that would be lost are not dirty however and still used, so we keep them. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* rip out obsolete recipientsDisplayNameArthur Schiwon2017-11-232-41/+16
| | | | | | also needs tests adjustements, and this also brings in natural sorting Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* adjust tests and apply sortingArthur Schiwon2017-11-232-1/+9
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix avatars in file rows of incoming sharesArthur Schiwon2017-11-232-0/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix avatars in file rows of outgoing sharesArthur Schiwon2017-11-232-2/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix Scrutinizer issueJan-Christoph Borchardt2017-11-021-1/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Clicking publicly shared image opens direct preview urlJan-Christoph Borchardt2017-11-011-4/+5
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Use standard way of showing and hiding popover menuJan-Christoph Borchardt2017-11-011-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Show and hide menu via Javascript, thanks @skjnldsvJan-Christoph Borchardt2017-11-011-0/+14
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Do not iterate over the filesDaniel Calviño Sánchez2017-08-181-5/+4
| | | | | | | | | | As "singleFileUpload" is used the "add" callback (which in turn calls "addFileToUpload") will always be called with a single file. Therefore there is no need to iterate over the files (and it is not done in the other callbacks either, so this aligns the code with the rest of the callbacks). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Replace fileName variable with data.files[0].nameDaniel Calviño Sánchez2017-08-181-8/+6
| | | | | | | | | | | | | | | | | There is no need to store the file name, as the "data" parameter given to all the callbacks provides a "files" attribute with all the files that the callback refers to; moreover, it will always be a single file due to the use of "singleFileUploads" in the jQuery File Upload plugin. This also fixes the loading icon not disappearing when several files were uploaded at once. "singleFileUploads" causes the "add" callback to be called once for each file to be uploaded, so "fileName" was overwritten with the name of each new file in the upload set; when "fileName" was later used in the "done" callback to find the file in the list whose loading icon replace with the MIME type icon "fileName" always had the name of the last file, and thus its icon was the only one replaced. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update the whole file item instead of only its contentsDaniel Calviño Sánchez2017-08-181-7/+8
| | | | | | | | | | | | | | | | | | The "done" and "fail" callbacks both update the item for the uploaded file using "setFileIcon". "setFileIcon" updates the contents of the "<li>" element for the file, but the "fail" callback was giving "setFileIcon" an element generated by the template, so the resulting HTML contained a "<li>" element nested in another "<li>" element. However, generating the HTML is better done through a template, so the template now receives the icon to show in order to be used by a successful upload and a failed one, and "setFileIcon" was changed to "updateFileItem". Note that the mimeTypeUrl does no longer need to be escaped, as Handlebars templates escape the needed characters automatically. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Remove "errorThrown" parameterDaniel Calviño Sánchez2017-08-181-1/+1
| | | | | | | When the "fail" callback is called, "errorThrown" is a property of the data object instead of a parameter. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix 'add to your nextcloud' input field, this is not an email addressBjoern Schiessle2017-06-131-1/+1
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* some small refactoring and reformatingArtur Neumann2017-04-271-6/+16
| | | Signed-off-by: Artur Neumann <info@individual-it.net>