Commit Graph

397 Commits

Author SHA1 Message Date
Jan-Christoph Borchardt 095197d1a7 popover style for apps and user dropdown menus 2015-03-26 00:40:30 +01:00
Daniel Hansson 8ee1fa98df Don't use hardcoded date and time
Use local time instead. http://momentjs.com/
2015-03-24 13:41:55 +01:00
Daniel Hansson 946a7c3a83 Use 24h format instead of 12h format
Use correct time format in WebUI
2015-03-24 11:20:20 +01:00
Vincent Petry ce5d2ab7db Revert "Change to 24H format instead of 12H format"
This reverts commit 8279dde97a.
2015-03-24 11:08:53 +01:00
Daniel Hansson 8279dde97a Change to 24H format instead of 12H format
Update how the time shows in WebUI.

My first PR to core, woha. :)
2015-03-23 22:05:44 +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
Morris Jobke a183b5d7e2 Merge pull request #14208 from owncloud/oc-msg-remove-object-dependency
Remove dependency from arbitrary data object structure for easier usage
2015-02-26 14:57:21 +01:00
Joas Schilling c201bc01bb Remove dependency from arbitrary data object structure for easier usage 2015-02-20 10:43:39 +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
Lukas Reschke dfcd4acd5a Merge pull request #13771 from owncloud/fix-humanfileSize
generate valid human readable text for 0
2015-02-12 18:34:54 +01:00
Lukas Reschke 0119d429fc Second parameter is optional
Makes my IDE happier.
2015-02-11 14:01:22 +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 dc17019536 adjust paths for search 2015-01-14 15:15:39 +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
Jörn Friedrich Dreyer 606f802b7b move search results below filelist, show hint when results are off screen, use js plugin mechanism 2015-01-02 10:28:41 +01:00
Jörn Friedrich Dreyer c738359a11 add paged provider 2015-01-02 10:28:41 +01:00
Jörn Friedrich Dreyer 088323aad5 move code from js.js to search.js in the search app 2015-01-02 10:28:41 +01:00
Jörn Friedrich Dreyer d3662722f6 new OC.Search, add search result formatters and handlers, use full content width for results 2015-01-02 10:28:41 +01:00
Thomas Müller 51a22431ee load showpassord.js conditionally in the template only if needed 2014-12-16 18:45:37 +01:00
Lukas Reschke be3d4fd303 Merge pull request #12360 from owncloud/files-tags
Add favorites to files app
2014-12-15 19:55:18 +01:00
Jörn Friedrich Dreyer 6602d3ac77 Merge pull request #12555 from owncloud/app_specific_search
introduce inApps[] filter for search via ajax query
2014-12-15 16:14:40 +01:00
Vincent Petry a5bb66f4a7 Added favorites feature to the files app 2014-12-15 12:10:54 +01:00
Jörn Friedrich Dreyer 1d490b559c introduce inApps[] filter for search via ajax query, make file results show up in files app only
use more flexible return type

check array with !empty instead of count
2014-12-10 15:51:59 +01:00
Vincent Petry c02ef69521 Simple Plugin system for Javascript 2014-12-01 16:20:44 +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 0f3e6cb50a Improved Javascript docs for JSDoc
Added namespaces so that JSDoc can find them.
Fixed a few warnings.
Improved some comments.
2014-10-31 13:43:30 +01:00
Vincent Petry d71cd680dd Include core translations
Moved search result type translations to search.js

Load JS translations earlier

Translations need to be loaded earlier to make sure that some JS files
like search.js get access to translations at this time.

This requires the template initialization to be moved to after session
initialization, because only after the session we have access to the
current language.
2014-10-29 10:09:12 +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
Clark Tomlinson ca5abe5744 Setting moment locale based on user selection 2014-10-23 10:32:47 -04:00
Bjoern Schiessle 94a9ff1cd8 make sure that the notification gets shown again after a second try 2014-10-07 12:02:58 +02:00
Vincent Petry e65ceb08fc Moved WebDAV and internet checks to client side JS
- Added setup checks in JavaScript
- Moved isWebDAVWorking to JS using SetupChecks
- Moved internet connection checks to an ajax call that goes through the
  server
2014-09-23 11:16:14 +02: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
Robin McCorkell 99d41bec5d Show original path information in trashbin and sharing views
Path will only be shown if in subdirectory, not in root.
2014-09-11 15:45:42 +01: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
kondou 2a4c51389c Use a route instead of s.php and convert tokens asap 2014-09-04 15:23:55 +02:00
Thomas Müller ed2424c382 Merge pull request #10637 from owncloud/fixing-js-issues
Init vars with a value if none is provided
2014-08-29 10:16:29 +02:00
Clark Tomlinson ba0e65753b Init vars with a value if none is provided 2014-08-28 13:53:45 -04:00
Clark Tomlinson 92685acf60 Implementing moment.js
Updating Usages

Removing unused method

Adding JS Doc
2014-08-28 09:28: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
Jan-Christoph Borchardt a6484fbda9 fix yellow notification style 2014-07-30 18:02: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
Robin Appelman e7e5333b12 Remove special case for css in OC.filePath 2014-07-21 13:03:14 +02:00
Robin Appelman 6962505095 debounce the search function 2014-07-08 15:42:58 +02:00
Morris Jobke ae8e27cc42 fix loading spinner on ctrl click a app entry- fixes #9063 2014-07-07 10:39:48 +02:00
Vincent Petry 9de3d8225b Fix parsing URL hash when no "?" was specified 2014-06-25 12:37:11 +02:00
Vincent Petry ce168c286a Added max heartbeat interval to prevent integer overflow
When using big session timeout values, the interval value might
overflow and cause the setInterval() call to ping the server in a loop
without any delay.

This fix adds a maximum ping interval of 24 hours.

Forward port of 00ec5fc193 from stable6.
2014-06-12 18:41:19 +02:00
Vincent Petry 015c5062e5 Disable snapper init for IE <= 9
Snapper doesn't work at all for IE8 and IE9 and messes up with the main
container layout when enabled.

This commits disables snapper for these browsers.
2014-06-10 17:14:49 +02:00
Jan-Christoph Borchardt 933c05566e Merge pull request #8922 from owncloud/design-controls-transparency
Bugfixes for mobile
2014-06-06 14:52:55 +02:00
Vincent Petry 5cebb6fb9b Merge pull request #4553 from owncloud/update_search_classes
Update search classes
2014-06-06 13:24:16 +02:00
Jan-Christoph Borchardt a6f9dd9c4b fix apps without app-navigation 2014-06-06 12:22:31 +02:00
Jörn Friedrich Dreyer 7c29645f22 allow apps to add translation for search result typeid 2014-06-06 11:28:43 +02:00
Vincent Petry b8ab77a475 Added debounce on resize 2014-06-06 09:50:46 +02:00
Morris Jobke 584c47b433 Disable snapper on bigger screens and on public/login page 2014-06-06 01:32:33 +02:00
Jan-Christoph Borchardt 9063a25bb4 slightly widen sidebar to 250px, works better with apps and on mobile 2014-06-05 21:19:28 +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
Jan-Christoph Borchardt 86a9cb2a6b add app sidebar toggle and swipe on mobile 2014-06-05 13:19:56 +02:00
Jan-Christoph Borchardt 26bf64631d better loading feedback for app start, move from JS to CSS 2014-06-04 15:07:15 +02:00
Jan-Christoph Borchardt e291a04dee show loading feedback 2014-06-04 14:38:25 +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
Jan-Christoph Borchardt 19d7d87964 toggle the navigation on desktop, not only on mobile 2014-06-04 14:29:46 +02:00
Jan-Christoph Borchardt 4ca665ac10 infield label removal: remove JS file and references to it 2014-06-03 15:30:09 +02:00
Thomas Müller 79b3558c6d Merge pull request #7151 from owncloud/user-jquery
Continuing the New User management
2014-06-03 15:04:30 +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 dd8b7b7af8 Merge pull request #8613 from owncloud/filesize-alignment
Improve aligment of file size
2014-06-02 17:37:53 +02:00
Morris Jobke de23ae735b add OC.menuSpeed to control the animation speed of menu toggle 2014-06-02 15:34:42 +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
raghunayyar 72ba396905 Adds Animation to Toggling Navigation on < 768px widths 2014-06-02 15:30:39 +02:00
Arthur Schiwon 7b63c2c036 cleanup 2014-06-02 12:53:59 +02:00
Arthur Schiwon b3d68fc175 refactor delete handling and apply it to users and groups 2014-06-02 12:53:54 +02:00
Arthur Schiwon 57ffaddf26 add Last Login column 2014-06-02 12:53:51 +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
Vincent Petry a0987ebf59 Fix undefined JS on login/setup page 2014-05-30 19:02:19 +02:00
Vincent Petry c9d05c66de Fix IE8 issue when icon is not defined
Sometimes no icon file is passed to replaceSVGIcon(), it showed an error
in IE8 and broke the code flow.

This fix adds a check whether the file name is set.
2014-05-30 10:06:29 +02:00
Vincent Petry 6ebc436505 Added sharing overview page (WIP)
- added sharing overview entries in the sidebar
- use OCS Share API to get the list of files
2014-05-30 10:06:29 +02:00
Lukas Reschke 705242d390 Merge pull request #8727 from owncloud/upgrade-overview
Added update overview page
2014-05-29 21:28:47 +02:00
Lukas Reschke c8b32f4309 Remove deprecated functions
This functions have been deprecated since Oct 2012 (ownCloud 5), let's finally remove them for ownCloud 7.

Ref c4b8bb1041
2014-05-29 17:01:30 +02:00
Vincent Petry 146583a98d Added update overview page 2014-05-27 14:53:08 +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
Vincent Petry fb10bf4048 Files app navigation can now switch
- added new OCA.Files namespace for files classes
- the sidebar can now switch between views/containers
- the trashbin renders in its own container but currently doesn't work
  due to overrides
- added app.js as entry point for JS code (ideally all other files should
  only contain classes and not trigger anything)
2014-05-15 17:51:04 +02:00
Vincent Petry 9c2fbea6a4 Fix file selection for infinite scrolling
- moved file selection code to FileList
- fix selection summary when all files are selected
- nextPage now auto-selects files if "select all" checkbox is checked
- fixed trashbin to use the same selection logic as FileList
2014-04-28 14:55:00 +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
Thomas Müller 032f38b230 Merge pull request #8213 from cbojar/master
Clean up js.js along suggestions from scrutinizer-ci, fixes #8204.
2014-04-23 11:05:00 +02:00
Thomas Müller 29bc82be8d fixing typos 2014-04-22 09:54:25 +02:00
Lukas Reschke 51eee3dec1 Fix JSDoc 2014-04-21 14:42:50 +02:00
Lukas Reschke 8fcffae1e2 Reuse selector 2014-04-21 14:28:54 +02:00
Lukas Reschke 539cecbd63 Use proper JSDoc documentation 2014-04-21 13:46:33 +02:00
cbojar 4a541e38e0 Clean up js.js along suggestions from scrutinizer-ci, fixes #8204.
Also used JSHint.com to find a few other issues.

-Strict comparisons (===)
-Fixed regex escaping errors
-Refactored OC.buildQueryString to use jQuery.map
-Missing semicolons
-Braces around if block

Left some of the mixed spaces/tabs as they are for alignment in comments.
2014-04-16 22:51:09 -04:00
Lukas Reschke 6e424eb990 Also encode > and ' 2014-04-13 15:24:35 +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 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 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
Morris Jobke 841069e8cb Merge pull request #7770 from jamesryanbell/master
SVG support detection
2014-03-28 15:14:12 +01:00
Thomas Müller e3b951f412 Merge pull request #7724 from owncloud/mobile
[WIP] Mobile optimization for base layout and Files app
2014-03-28 10:27:15 +01:00
Jan-Christoph Borchardt 89ee551158 mobile: adjust breakpoint in JS as well 2014-03-21 16:43:04 +01:00
Vincent Petry 67b8cfedf9 Define _matchMedia wrapper earlier
The unit test stub didn't work because the _matchMedia wrapper
was defined too late.

This fix defines it earlier.
2014-03-18 16:02:13 +01:00
Vincent Petry cc6c152984 Fixed matchMedia usage to make unit tests work in PhantomJS
PhantomJS has a bug that makes it impossible to properly stub
window.matchMedia. This fix adds a wrapper as OC._matchMedia
that is used for unit tests
2014-03-18 15:52:06 +01:00