Patrick Paysant
ff018d48cf
Implements all comments from @PVince81
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-19 17:29:05 +01:00
Patrick Paysant
6217393d6a
Adding computerFileSize in OC.Util
...
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-19 17:28:58 +01:00
Robin Appelman
e055fbd4da
adjust js tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-12-02 13:40:23 +01:00
Vincent Petry
25d9dce067
JS utility function to compare paths
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-24 21:45:00 +02:00
Christoph Wurst
5ae6d62811
do not reload the page if the server is (temporarily) unreachable
2016-10-03 10:24:47 +02:00
Hendrik Leppelsack
61e604c2d9
adjusts tests to removal of svg fallback
2016-07-01 16:36:37 +02:00
Lukas Reschke
2c4ef37025
Merge pull request #24126 from owncloud/err-reload-delay
...
Delay reloading the page if an ajax error occurs, show notification
2016-04-22 11:23:39 +02:00
Robin McCorkell
62024d74d4
Add test for reload delay
2016-04-20 22:09:59 +01:00
Morris Jobke
6b66f2dfb4
Merge pull request #23990 from owncloud/heartbeat-debounce
...
Debounce heartbeat ajax calls to lower the number of requests
2016-04-20 21:23:10 +02:00
Christoph Wurst
2d772eaaa8
Debounce heartbeat ajax calls to lower the number of requests
...
fixes #22397
2016-04-18 14:19:26 +02:00
Christoph Wurst
5900e46f01
Turn off jQuery animations when testing
2016-04-18 10:41:02 +02:00
Christoph Wurst
3e1f1ccc76
downgrade jquery, update jquery-migrate
2016-04-15 13:55:23 +02:00
Vincent Petry
06e7856400
Adjust core unit tests for unload/reload cases
2016-03-23 10:53:40 +01:00
Vincent Petry
8ea80e114a
Accumulate notifications instead of blinking
...
This makes it possible to display multiple notifications.
If the options.type is set to "error", it will also add a close button.
2016-02-22 17:25:32 +01:00
Vincent Petry
b8b77709c0
Add handler for global ajax errors
2016-02-15 12:48:47 +01:00
Morris Jobke
6e096936e5
update JS humanFileSize to use KB instead of kB
2016-01-19 10:51:57 +01:00
Joas Schilling
f04151f69b
Close the user menu when clicking it again
2015-11-02 10:09:13 +01:00
Vincent Petry
1b7d42c569
Fix OC.joinPaths with empty arguments
...
When empty arguments are given, the leading or trailing slash was not
detected properly.
2015-07-13 10:57:52 +02:00
Vincent Petry
fbc03b43b9
More tests for joinPaths
2015-07-10 15:31:58 +02:00
Vincent Petry
119e27166e
Add OC.joinPaths for convenient path joining
2015-07-10 13:02:28 +02:00
Jan-Christoph Borchardt
d1db727d1f
mock up missing elements in the tests
2015-03-26 17:13:50 +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
Thomas Müller
ccc1f09627
generate valid human readable text for 0 - fixed #9342
2015-01-29 17:27:28 +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
Vincent Petry
c02ef69521
Simple Plugin system for Javascript
2014-12-01 16:20:44 +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
Clark Tomlinson
ba0e65753b
Init vars with a value if none is provided
2014-08-28 13:53:45 -04: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
Vincent Petry
4fea521102
Fix enforced share expiration date to be based on share time
2014-07-21 15:01:20 +02:00
Vincent Petry
6a0f5cfc61
Added unit tests for heartbeat interval min/max values
2014-06-12 18:42:09 +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
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
Morris Jobke
5add56b6ca
Merge pull request #7485 from owncloud/scrutinizer_fix_1_kondou
...
Scrutinizer cleanup
2014-06-03 07:44:52 +02:00
Frank Karlitschek
f12a5248a3
Merge pull request #8820 from owncloud/design-details
...
Design details
2014-06-02 21:26:43 +02:00
kondou
9bc3f3cf30
Scrutinizer cleanup
2014-06-02 21:09:41 +02:00
Morris Jobke
fbe42a771f
fix unit tests after introduction of animations - adds delays for click trigger
2014-06-02 18:09:41 +02:00
Morris Jobke
dd8b7b7af8
Merge pull request #8613 from owncloud/filesize-alignment
...
Improve aligment of file size
2014-06-02 17:37:53 +02:00
Morris Jobke
5d457dafc1
display "<1 kB" for really small files
...
* added parameters for humanFileSize to trigger that behaviour
* add unit tests for that
2014-06-02 15:33:09 +02:00
Morris Jobke
27c8c87e94
Merge pull request #8187 from owncloud/escape-more-character
...
Also encode > and '
2014-06-02 10:59:47 +02:00
Lukas Reschke
603b6c13b4
Fix typo
2014-05-31 21:11:29 +02:00
Lukas Reschke
360a79b8f4
Add unit tests for escapeHTML
2014-05-28 22:14:05 +02:00
Vincent Petry
9f62059efa
Fix file summary to use the whole file list
...
- moved the summary code into a new class FileSummary
- FileSummary is calculated only once, then updated with add/remove
- added new OC.Util namespace for JS utility functions
2014-04-28 14:49:39 +02:00
Vincent Petry
f84d66a24f
Moved SVGSupport call to use OC.Util.SVGSupport()
2014-04-09 15:23:09 +02:00
Vincent Petry
a4eafca77f
Moved code to replace svg with png to OC.Util
...
- Moved code that replaces the "svg" extension for the given file to
core as OC.Util.replaceSVGIcon.
- Added unit test for OC.Util.replaceSVGIcon
- Moved "replaceSVG" to OC.Util.replaceSVG and deprecated the global
"replaceSVG" function.
- Added alias for SVGSupport() as OC.Util.hasSVGSupport() (for now)
2014-04-04 11:34:26 +02:00
Vincent Petry
268206cec5
Fixed parseQueryString to handle empty values and plus signs
...
- now correctly parse query strings with '+' signs
- empty values are now parsed either as null or empty string
- added unit test for parseQueryString()
2014-04-01 23:02:34 +02:00