Commit Graph

132 Commits

Author SHA1 Message Date
Vincent Petry ef59c69dc8 Distinguish legacy file actions from regular file actions
Legacy file actions are registered by legacy apps through
window.FileActions.register(). These actions can only be used by the
main file list ("all files") because legacy apps can only deal with a
single list / container.

New file actions of compatible apps must be registered through
OCA.Files.fileActions. These will be used for other lists like the
sharing overview.

Fixed versions and sharing actions to use OCA.Files.fileActions, which
makes them available in the sharing overview list.
2014-05-30 10:06:29 +02:00
Vincent Petry 06e53b359a Added "dir" in file actions handler context and fixed versions
Added "dir" in file actions handler context so that handlers can know
what the path of the file was without having to look it up from the file
list.

Fixed versions app to use the context.dir instead of the old $('#dir')
element. This makes the versions popup work in the sharing overview.
2014-05-30 10:06:29 +02:00
Vincent Petry 60bcdc550e Fixed file actions for sharing views
FileActions can now be clone to be use for separate file list views
without having the side-effect of affecting the main file list view.

Added "Open" action in sharing overview file lists to redirect to the
regular file list when clicking on a folder.
2014-05-30 10:06:29 +02:00
Vincent Petry 279ede33af Improved FileActions with context
A context hash is now passed to file action handlers which makes it
possible to have file list specific file actions.
2014-05-30 10:06:29 +02:00
Volkan Gezer f7cc07ba41 show delete hint text on hovering trash 2014-05-28 20:27:28 +02:00
Vincent Petry 160a2bc36f Fixed download URL in public page 2014-05-20 13:24:52 +02:00
Vincent Petry 6fd084243b Fixed many issues, clean up
- fixed upload and storage statistics
- fixed infinite scroll to use the correct contain for scroll detection
- fixed unit test that sometimes fail for rename case
- controls are now sticky again
- fixed selection overlay to be aligned with the table
- fixed "select all" checkbox that had id conflicts
- fixed public page
- fixed global actions permissions detection
- fix when URL contains an invalid view id
- viewer mode now hides the sidebar (ex: text editor)
- added unit tests for trashbin
- clean up storage info in template (most is retrieved via ajax call now)
2014-05-15 17:51:04 +02:00
Vincent Petry 9d38e3602b Namespacing for FileList, FileActions and trashbin app
- FileList is now an instantiable class
- FileActions is now in namespace
- added App class for trashbin app
- moved trashbin overrides into classes extending FileList
- replaced many static calls with "this." or "self." to make the classes
  reusable/extendable
- new URL parameter "view" to specify which view is shown, for example
  "files" or "trashbin"
- added OC.Util.History utility class in core for handling history
- moved URL handling/routing to OCA.Files.App
- popstate will correctly update the current view and notify the view of
  the URL change so it can update the current dir
- added JS unitt tests for the trashbin app
- fixed public app to work with the new namespaces
2014-05-15 17:51:04 +02:00
Bjoern Schiessle 27c5a978f9 we no longer need to handle the Shared folder different from any other folder 2014-04-23 12:54:25 +02:00
Vincent Petry 0be9de5df5 Files, trashbin, public apps use ajax/JSON for the file list
Files app:

- removed file list template, now rendering list from JSON response
- FileList.addFile/addDir is now FileList.add() and takes a JS map with all required
  arguments instead of having a long number of function arguments
- added unit tests for many FileList operations
- fixed newfile.php, newfolder.php and rename.php to return the file's
  full JSON on success
- removed obsolete/unused undo code
- removed download_url / loading options, now using
  Files.getDownloadUrl() for that
- server side now uses Helper::getFileInfo() to prepare file JSON response
- previews are now client-side only

Breadcrumbs are now JS only:

- Added BreadCrumb class to handle breadcrumb rendering and events
- Added unit test for BreadCrumb class
- Moved all relevant JS functions to the BreadCrumb class

Public page now uses ajax to load the file list:

- Added Helper class in sharing app to make it easier to authenticate
  and retrieve the file's real path
- Added ajax/list.php to retrieve the file list
- Fixed FileActions and FileList to work with the ajax list

Core:

- Fixed file picker dialog to use the same list format as files app
2014-04-02 15:33:47 +02:00
Vincent Petry aaa8d6ec02 Fixed broken delete file action 2014-04-01 16:09:48 +02:00
Thomas Müller ea8705bac8 additional class is added to the file actions called e.g. 'action-share', 'action-rename'
in order to allow proper translations of the action's display name an additional parameter has been added to the register function
2014-03-17 20:15:10 +01:00
Thomas Müller 6d3b61f388 Merge pull request #7011 from owncloud/jshint
Added .jshintrc
2014-02-04 12:11:32 -08:00
Vincent Petry d36a2ff9ee Added .jshintrc
- Also fixes a few JSHint warnings in files app
- Added "global" comment on top of files app to suppress warning and
  also inform devs about what globals are use
2014-01-30 13:40:01 +01:00
raghunayyar 85e67be0aa Rename action now appears as pencil icon 2014-01-30 10:07:08 +01:00
Jan-Christoph Borchardt d310df505c permanently show download action on mobile, only icon 2014-01-29 11:43:34 +01:00
Vincent Petry c6695bbd76 Fixed download URL in public page
- Refactored download URL building to make it overridable
- Added download URL override in public page
- Added JS unit tests for download URL
- Added OC.redirect() method to facilitate unit testing
2014-01-24 13:38:39 +01:00
Vincent Petry 1042733634 Fixed various file name escaping issues in core apps
- Refactored file tr lookup into FileList.findFileEl that uses
  filterAttr to avoid escaping issues in jQuery selectors
- Fixed versions and sharing app to properly escape file names in
  attributes
2014-01-10 15:02:26 +01:00
Vincent Petry 467f864db4 Fixed sharing status update for new/uploaded files
Creating new files, folders or uploading files now have their sharing
icon updated accordingly.

For this, the global share status list that is cached in
OC.Share.statuses is reused for new files.

Performance should improve as the sharing list is now only loaded once
per navigation session.

In OC.Share, split loadIcons into loadIcons + updateIcons.

Fixes #4977
2013-10-17 12:55:10 +02:00
Jörn Friedrich Dreyer 0683372200 canceling individual uploads is currently impossible because there is no placeholder 2013-10-07 11:14:11 +02:00
Jörn Friedrich Dreyer 7e0631b3b8 Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
	apps/files/js/filelist.js
2013-09-19 17:00:54 +02:00
Thomas Müller 20a43d1982 remove file action elements before recreating them 2013-09-18 13:09:47 +02:00
Jörn Friedrich Dreyer b59ce403d8 Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
	apps/files/css/files.css
	apps/files/js/file-upload.js
	apps/files/js/filelist.js
	apps/files/js/files.js
	apps/files_sharing/js/public.js
	core/js/jquery.ocdialog.js
	core/js/oc-dialogs.js
2013-09-17 19:10:46 +02:00
Vincent Petry 1304b511e9 Ajax calls for "files" and "files_trashbin" apps
Frontend:
- The files app list now uses ajax calls to refresh the list.
- Added support the browser back button (history API).
- Added mask + spinner while loading file list

Backend:
- Added utility function in core JS for parsing query strings.
- Moved file list + breadcrumb template data code to helper
  functions
- Fixed some file paths in trashbin app to be similar to the files app
2013-09-13 19:59:14 +02:00
Jörn Friedrich Dreyer 4af5a8c483 Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
	apps/files/ajax/upload.php
	apps/files/js/file-upload.js
	apps/files/js/filelist.js
	apps/files/js/files.js
	apps/files/templates/part.list.php
2013-09-04 14:11:40 +02:00
kondou edd92e4c09 Merge branch 'master' into fix_jslint_kondou
Conflicts:
	apps/files/js/file-upload.js
2013-08-18 00:38:52 +02:00
Jörn Friedrich Dreyer f94e603698 progress fixes 2013-08-16 11:40:55 +02:00
Jan-Christoph Borchardt d2767faf61 Merge pull request #4113 from owncloud/delete-fix
Delete icon fix
2013-08-15 15:31:42 -07:00
Jörn Friedrich Dreyer ff67f115d4 fix #2711 using a custom event, also use css selectors over filterAttr 2013-08-08 13:50:04 +02:00
kondou aaf0fec9f5 Fix some JSLint warnings 2013-07-31 21:21:02 +02:00
Jan-Christoph Borchardt 4bfd61fb7f use new delete icon for deleted files as well 2013-07-18 18:46:37 +02:00
Jan-Christoph Borchardt 8a25d1ad06 remove unnecessary tipsy for Files delete 2013-07-18 18:41:01 +02:00
Jan-Christoph Borchardt 197c979d26 use background image instead of img for Files delete icon 2013-07-18 18:40:09 +02:00
Bart Visscher e3df2b8c87 Merge pull request #1044 from owncloud/fix_extra_slash
Remove duplicate / for first folder in root
2013-06-28 12:00:35 -07:00
Bart Visscher 89dc8be9f5 update to !== 2013-06-28 21:00:09 +02:00
Lukas Reschke 1ee224d8cb Merge pull request #3108 from owncloud/fileactions-order
Files: fix the order fileactions are computed for a file
2013-04-24 10:55:38 -07:00
Morris Jobke 637dd685db fix wrong shared icon description
fix #2928

translation of string "Shared" has to be marked as located in "files" for the translation extractor
2013-04-24 16:13:17 +02:00
Robin Appelman ab7fcebeb3 Files: fix the order fileactions are computed for a file 2013-04-24 15:26:36 +02:00
Björn Schießle e5f40ddaae only prevent shared action for the Shared folder in the root dir 2013-03-13 11:33:20 +01:00
Björn Schießle b2da2f769a don't add share action to the Shared folder 2013-03-12 17:28:36 +01:00
Robin Appelman 37ea784294 Files: always show share action at the right
Fixes #1619
2013-02-11 16:09:04 +01:00
Jörn Friedrich Dreyer 855c9480b7 only encodeURIComponent once 2013-02-09 13:07:52 +01:00
Michael Gapczynski e928a342c4 Check if extra / is necessary for the folder URL 2013-02-09 13:07:52 +01:00
Björn Schießle c72537cd85 don't call the delete button unshare, unshare operation no longer available 2013-02-07 12:42:09 +01:00
Björn Schießle e2516a2b65 allow to delete single files from the trash bin permanently 2013-02-06 16:23:22 +01:00
Björn Schießle 1817c7895b allow to look into deleted directories 2013-01-22 15:33:54 +01:00
Björn Schießle 8259768732 introduce option to disable download action 2013-01-22 15:33:53 +01:00
Bart Visscher 5bfe4adbaa Whitespace cleanup 2013-01-16 18:09:16 +01:00
libasys eda9ce4cf8 Fixes two issues if you using IE8. IE8 has problems with .bind actions and since jquery 1.7.2 using .bind is old school style for event delegation. the new and better way is using .on() function. The second is using $.each instead of for() to walkthrough an array! Now it works perfect, the events after uploads are triggered. 2012-11-14 16:05:24 +01:00
Robin Appelman 34fee8afaa remove debug statements 2012-11-05 13:52:02 +01:00
Robin Appelman 4f32f49fb1 this line shouldn't be here 2012-11-04 21:00:36 +01:00
Robin Appelman f187aa6c93 some more code reuse for fileactions
also fixes an issue where some fileactions always worked on the last file in the list
2012-11-04 20:48:38 +01:00
Michael Gapczynski 60e5054ae8 Fix shared status icons 2012-10-28 16:02:05 -04:00
Robin Appelman 0fbb99690b properly replace fileaction icons with pngs when needed 2012-10-28 16:03:52 +01:00
Robin Appelman fe6b987b3d use css to show/hide fileactions 2012-10-28 12:47:42 +01:00
Robin Appelman d9ef6da2e4 code style 2012-10-28 12:47:42 +01:00
Bart Visscher 939b51e46f Fix download url generation 2012-10-27 15:10:21 +02:00
Bart Visscher c9317b5a68 Merge branch 'master' into routing 2012-09-28 21:41:21 +02:00
Bart Visscher 4e2f575938 Correctly fix oc-1016 and fix downloading of files 2012-09-28 21:18:20 +02:00
Bart Visscher bf1057143c Merge branch 'master' into routing
Conflicts:
	apps/files/js/filelist.js
	core/js/js.js
	lib/ocs.php
2012-09-28 15:38:49 +02:00
scambra 107b641708 translate rename and history actions 2012-09-21 12:30:13 +02:00
Bart Visscher 5eba579827 Merge branch 'master' into routing
Conflicts:
	apps/files/js/fileactions.js
	lib/base.php
	lib/helper.php
	lib/ocs.php
2012-09-07 15:51:44 +02:00
Michael Gapczynski 73d726d1b2 Support for unshare from self, with a bunch of temporary fixes to overcome configuration problems with file actions 2012-09-07 00:02:22 -04:00
Bart Visscher 9329af921d Add missing ; to js code 2012-09-05 22:26:09 +02:00
Bart Visscher f188f6cc2f Fix some jslint warnings 2012-09-04 21:27:37 +02:00
Jörn Friedrich Dreyer ca8120e9f4 unify permissions (3/3): remove old PERMISSION_X from FileActions & OC.Share 2012-08-31 01:11:10 +02:00
Jörn Friedrich Dreyer 3ba27e624f unify permissions (2/3): change apps to use OC::PERMISSION_X 2012-08-31 01:11:10 +02:00
Bart Visscher cbaf858dea Merge remote-tracking branch 'gitorious/master' into routing
Conflicts:
	apps/files/js/fileactions.js
	apps/files_archive/js/archive.js
2012-08-29 20:16:39 +02:00
Michael Gapczynski 0c4575db7a Temporary fix to prevent rename action in root of Shared directory 2012-08-24 15:12:16 -04:00
Bart Visscher ddfb9de147 Fix linkTo calls for new routing 2012-08-15 18:16:06 +02:00
Michael Gapczynski 94ce8f2168 Merge branch 'master' into share_api
Conflicts:
	apps/contacts/lib/app.php
	apps/files_sharing/js/share.js
2012-07-31 15:00:04 -04:00
Michael Gapczynski e02d8d7f7e Remove delete tipsy if file is deleted, fixes bug oc-958 2012-07-27 21:28:41 -04:00
Michael Gapczynski 4d17ed2f71 Make file actions permissions aware 2012-07-25 16:33:08 -04:00
Thomas Tanghus 8f6121ffa8 Files: Double encode download links. Fix for oc-1016. 2012-06-15 15:57:04 +02:00
Bjoern Schiessle 8626f04f5d Label the delete operation "unshare" for files in the "Shared" folder to reduce
confusion about the operation.
2012-06-12 16:27:24 +02:00
Bjoern Schiessle b38ce8adfd committed patch (bug #967) to add missing translations for file actions 2012-06-12 11:39:03 +02:00
Bjoern Schiessle 2d80c148ba Don't allow user to delete, rename and re-share the "Shared" directory 2012-06-04 10:42:09 +02:00
Arthur Schiwon 3db28d7616 linkTo instead of hard links in Files and Files_Archive. Hope that makes sense. 2012-05-31 19:46:51 +02:00
Georg Ehrke 2b10371bde fix merge conflicts 2012-04-26 18:08:49 +02:00
Georg Ehrke 40f95ffdf3 fix security check for the path of the requested file 2012-04-26 17:55:00 +02:00
Georg Ehrke 0249a72cab fix downloading of files in files app 2012-04-26 17:35:12 +02:00
Georg Ehrke 45de7ad221 move files to app folder 2012-04-18 17:27:34 +02:00