Commit Graph

79 Commits

Author SHA1 Message Date
Vincent Petry ce94a998dd Use storage id + appframework for ext storage CRUD
- Added StorageConfig class to replace ugly arrays
- Implemented StorageService and StorageController for Global and User
  storages
- Async status checking for storages (from Xenopathic)
- Auto-generate id for external storage configs (not the same as
  storage_id)
- Refactor JS classes for external storage settings, this mostly
  moves/encapsulated existing global event handlers into the
  MountConfigListView class.
- Added some JS unit tests for the external storage UI
2015-03-12 18:51:02 +01:00
Morris Jobke f507601e25 Merge pull request #14582 from rullzer/avatar_fixes
Avatars in share dialog fixes
2015-03-04 10:30:09 +01:00
Roeland Jago Douma c9272be0b9 Avatars in share dialog fixes
* Avatar for "xxxx share with you..." to the left
* Avatars for groups and remote shares (use default placeholder)
* Modified and added unit tests
* Use the same css for all the avatars in the dropdown
2015-03-03 20:57:50 +01:00
Vincent Petry b4cfc79b5a Added missing done() calls for async tests 2015-03-03 13:59:03 +01:00
Lukas Reschke bbd5f28415 Let users configure security headers in their Webserver
Doing this in the PHP code is not the right approach for multiple reasons:

1. A bug in the PHP code prevents them from being added to the response.
2. They are only added when something is served via PHP and not in other cases (that makes for example the newest IE UXSS which is not yet patched by Microsoft exploitable on ownCloud)
3. Some headers such as the Strict-Transport-Security might require custom modifications by administrators. This was not possible before and lead to buggy situations.

This pull request moves those headers out of the PHP code and adds a security check to the admin settings performed via JS.
2015-03-02 19:07:46 +01:00
Lukas Reschke 92b5517229 Use custom attribute instead of the div identifier
Otherwise problems arrive when a username contains characters such as an `@`

Fixes https://github.com/owncloud/user_shibboleth/issues/38
2015-02-27 17:38:59 +01:00
Lukas Reschke 27c1409be5 Encode parameters in `OC.generateUrl` by itself
This function is often used in a wrong and potential dangerous way... Thus we should escape the URL per default and offer developers to disable the automatic escaping via an option parameter if they really want that behaviour.

Might break some things, however, those things are then easy to fix and we really have a ton of bugs caused by this...

Fixes https://github.com/owncloud/core/issues/14228
2015-02-17 14:41:06 +01:00
Vincent Petry e8f16db49d Merge pull request #13866 from rullzer/avatar_share_dialog
Avatars in share dialog
2015-02-17 10:17:36 +01:00
Roeland Jago Douma 9a6da8e6e2 Extended avatar unit tests 2015-02-13 12:57:24 +01:00
Roeland Jago Douma ecb7d44775 Small unit test rewrite 2015-02-12 17:05:59 +01:00
Roeland Jago Douma e952687dcd Added unit test 2015-02-12 16:50:14 +01:00
Thomas Müller ccc1f09627 generate valid human readable text for 0 - fixed #9342 2015-01-29 17:27:28 +01:00
Joas Schilling 3f8e850dc6 Indicate that the share owner is remote in the filelist 2015-01-27 12:32:32 +01:00
Vincent Petry c897a14d56 Fix reshare permission issue
The actual share permissions sent to the server on reshare are now based
on possiblePermissions + permissions inherited from parent share
2015-01-09 15:19:53 +01:00
Morris Jobke 8e1904386f Add timeout for notifications
* options for timeout in seconds and if it contains HTML
* if timeout is 0 it will show the message permanently
* removes the notification after a given (default: 5 seconds) timeframe
* based on work by @brantje
* provide JS unit tests for notifications
2015-01-08 13:06:45 +01:00
Morris Jobke bfdf0db7c0 Autoescape of placeholders in t() and p() - for JS
* add disableEscape parameter to disable this functionality
* drop usage of escapeHTML() that is now done inside t()
* add unit test for escaped and not escaped placeholder
* proper JSDoc
2015-01-07 12:56:32 +01:00
Morris Jobke 29e1c3a898 Merge pull request #12795 from owncloud/files-layoutchanges
Move file thumbnail element into the label tag
2014-12-13 09:00:43 +01:00
Robin Appelman 3bf0922b13 Merge pull request #12527 from owncloud/js-pluginsystem
Simple Plugin system for Javascript
2014-12-12 11:43:31 +01:00
Vincent Petry 81e9d43e23 Move file thumbnail into the label element 2014-12-11 18:21:25 +01:00
Joas Schilling 539c0aeb04 Add an option to disallow sending sharing emails to non-owncloud users
Fix #10836
2014-12-09 11:32:39 +01:00
Vincent Petry c02ef69521 Simple Plugin system for Javascript 2014-12-01 16:20:44 +01:00
Vincent Petry ffe57d89e4 Fix l10n promises 2014-11-19 17:02:17 +01:00
Vincent Petry 152da9796b Added function to load translations from JS
For apps that support async translation loading, a new function
OC.L10N.load() can be used to asynchronously load the translations
for a given app.
2014-11-18 12:20:01 +01:00
Vincent Petry ec1a73fab9 Added OC.L10N namespace with translation functions
Added addTranslations and fixed de.js file

Fixed de.js to use OC.L10N.register() and use to correct expected
format.

Added JS unit tests for OC.L10N class

Include translations JS script for all apps
2014-10-29 10:09:12 +01:00
Lukas Reschke d2743e6ad6 Merge pull request #7254 from owncloud/core-sortalgo
Fixed JS sort comparator to be consistent between JS and PHP
2014-09-16 17:29:03 +02:00
Thomas Müller fd92fc7c47 Merge pull request #9753 from owncloud/filepath-css
Remove special case for css in OC.filePath
2014-09-09 13:59:19 +02:00
Lukas Reschke e3c99a8505 Add beforeeach and aftereach 2014-09-09 13:08:50 +02:00
Lukas Reschke cabd70148f Add unittest for filePath 2014-09-09 12:05:19 +02:00
kondou 2a4c51389c Use a route instead of s.php and convert tokens asap 2014-09-04 15:23:55 +02:00
Clark Tomlinson ba0e65753b Init vars with a value if none is provided 2014-08-28 13:53:45 -04:00
Vincent Petry 98d06094e7 Fix share dropdown when links are not allowed
When links are not allowed, the email field does not exist and
autocomplete returns null. This causes Javascript errors.

The fix prevents entering the bogus block when links aren't allowed, as
it doesn't make sense to enter it in such cases anyway.
2014-08-21 13:49:02 +02:00
Vincent Petry 607ea636be Fixed folder icon update routine when share owner exists
Whenever a folder has a "data-share-owner" attribute, the icon is now
properly updated to a shared folder icon.
2014-08-15 16:19:50 +02:00
Vincent Petry f2001a48a4 Fixed sort algo for additional cases 2014-08-11 13:28:53 +02:00
Vincent Petry 173059f6d0 Fixed file list sorting
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
2014-08-11 13:28:53 +02:00
Bjoern Schiessle 76ab097ee2 update unit test, min date should be always today + 1 2014-08-08 13:58:56 +02:00
Vincent Petry 4fea521102 Fix enforced share expiration date to be based on share time 2014-07-21 15:01:20 +02:00
Thomas Müller 7159d6118e reduce share action text to the user name only 2014-07-14 21:11:50 +02:00
Vincent Petry 5e4835f9e9 Improved remote share owner display
The parts of the remote share owner name is now split between user name,
domain name and root so they can be formatted / displayed differently.

The user name + domain name are displayed in the tooltip.
2014-07-03 14:15:25 +02:00
Vincent Petry d9d816bd98 Unit tests for share dropdown with nested link share 2014-06-27 18:21:02 +02:00
Vincent Petry a7e7e86df0 Test runner now loads CSS and hides testArea
- serve CSS and font files properly to make sure that measurements are
  correct for the tests that need them (breadcrumb)
- added opacity to testArea to make sure nothing is visible during
  testing
2014-06-24 16:32:18 +02:00
Vincent Petry 6a0f5cfc61 Added unit tests for heartbeat interval min/max values 2014-06-12 18:42:09 +02:00
Vincent Petry d764aaa427 Fixed Snap mock
Also fixed JSHint errors
2014-06-06 09:55:32 +02:00
Jan-Christoph Borchardt 96278e0201 close sidebar when switching navigation entry, except on add or change settings 2014-06-05 17:06:21 +02:00
Thomas Müller 1c20c72efe Merge pull request #8620 from owncloud/design-navigation-two
Toggle app navigation not only on mobile, but on desktop as well
2014-06-05 10:53:22 +02:00
Morris Jobke e186871996 fix unit test template 2014-06-05 09:46:19 +02:00
Morris Jobke e3cbcadbd8 fix first failing test 2014-06-05 00:40:15 +02:00
Morris Jobke ca43fba513 Merge pull request #8791 from owncloud/share-overview-sharewithstatus
Update share action text to display owner/recipients
2014-06-04 17:04:30 +02:00
Vincent Petry 52d9e313d1 Remove obsoleted code to trigger navigation menu
Now that the navigation menu is always togglable, the media query
dependent code can be removed.
2014-06-04 14:38:24 +02:00
Vincent Petry 07f1b263c9 Use recipient display names when updating shares in the UI
Since OC.Share didn't have any array containing the list of shares for
the current file, OC.Share.currentShares has been introduced to contain
the full share item structure instead of the reduced one
OC.Share.itemShares.

The event "sharesChanged" is now passing OC.Share.currentShares, which
itself includes the display name to be displayed for the recipients in
the action icon.
2014-06-04 10:37:04 +02:00
Morris Jobke 5add56b6ca Merge pull request #7485 from owncloud/scrutinizer_fix_1_kondou
Scrutinizer cleanup
2014-06-03 07:44:52 +02:00