Commit Graph

501 Commits (d790c27a19494346bc7293bee00026201f2910f0)

Author SHA1 Message Date
Vincent Petry d4198607ec Expose whether user is an admin through a method
Which is nicer than an obscure global variable
8 years ago
Morris Jobke 6e096936e5 update JS humanFileSize to use KB instead of kB 8 years ago
Thomas Müller 9c550a07ed OC.FilePath has still a valid use case when generating paths to static files what for generateUrl cannot be used for - closes #15604 9 years ago
Lukas Reschke 2515cb17be Support pretty URLs
This changeset allows ownCloud to run with pretty URLs, they will be used if mod_rewrite and mod_env are available. This means basically that the `index.php` in the URL is not shown to the user anymore.

Also the not deprecated functions to generate URLs have been modified to support this behaviour, old functions such as `filePath` will still behave as before for compatibility reasons.

Examples:
http://localhost/owncloud/index.php/s/AIDyKbxiRZWAAjP => http://localhost/owncloud/s/AIDyKbxiRZWAAjP
http://localhost/owncloud/index.php/apps/files/ => http://localhost/owncloud/apps/files/

Due to the way our CSS and JS is structured the .htaccess uses some hacks for the final result but could be worse... And I was just annoyed by all that users crying for the removal of `index.php` ;-)
9 years ago
Vincent Petry f120846e29 Added OC.Files.Client Webdav-based files client 9 years ago
Joas Schilling 78c456b895 Allow creating OCS v2 links in JS 9 years ago
Vincent Petry a2cd9708f6 Set "ie" CSS class for IE10, IE11
Fixed border in file action menu
9 years ago
Joas Schilling f04151f69b Close the user menu when clicking it again 9 years ago
Hendrik Leppelsack 5a01dc44d6 append tipsys to body 9 years ago
Thomas Müller 56fdb0ac93 Merge pull request #19935 from owncloud/issue-19916-settings-menu-hide-on-file-action
Use the normal OC.menu JS for handling the Settings menu
9 years ago
Joas Schilling a0437591db Use the normal OC.menu JS for handling the Settings menu 9 years ago
Vincent Petry 89e3860e1a Disable app icon preview in apps page for IE
All IE versions are not able to properly upscale SVG icons unless the
said SVG files contain a "viewBox" attribute, which is not always the
case. Also we cannot guarantee that all third party apps will have this
attribute in their icons.

So for now, app icons will not be displayed in IE instead of broken
ones.
9 years ago
Vincent Petry c7aef6c368 Fix uploading avatar and root certs in IE8 9 years ago
Thomas Müller 681ab05e4d Merge pull request #19539 from owncloud/fix-multiselect-overlap-shorter
Fix filelist size issues, breadcrumb, multiselect
9 years ago
Vincent Petry f135128664 Fix filelist size issues, breadcrumb, multiselect
- calculate multiselect header width to exclude scrollbar
- call FileList._onResize() when sidebar is toggled ("appresized"), this
  also updates the breadcrumb width
- moved global getScrollBarWidth() to OC.Util namespace
9 years ago
Morris Jobke 4b3a5a257f Fix moment.js "a few seconds ago" with "seconds ago"
* fixes #18627
9 years ago
Vincent Petry dbb6692468 [IE8] Fix filetype icon sizes
Added hack that uses a "filter" CSS with explicit URL to fix the "New"
menu by scaling down icons and also fix the folder/filetype icon in the sidebar
by scaling it up.
9 years ago
Vincent Petry 71dabc6c13 Consider both hash params and query when parsing URL 9 years ago
Hendrik Leppelsack 3f0a870908 implement builder pattern in tipsy shim 9 years ago
Lukas Reschke f2d63d3518 Disable automatic evaluation of responses
If a response to a $.ajax() request returns a content type of "application/javascript"
JQuery would previously execute the response body. This is a pretty unexpected
behaviour and can result in a bypass of our Content-Security-Policy as well as
multiple unexpected XSS vectors.
9 years ago
Vincent Petry 7303b68577 Fix controls bar calculation
Controls bar calculation needs to take the sidebar visibility into
account.

Recalculation is now triggered when sidebar is toggled, using a new
app-content event "appresized".
9 years ago
Jan-Christoph Borchardt 4e53b5922d Merge pull request #18178 from owncloud/files-sidebar-actions
Sidebar file actions
9 years ago
Jan-Christoph Borchardt 970440f604 Merge pull request #18122 from owncloud/replace-tipsy
Replace tipsy with tooltip
9 years ago
Morris Jobke 6f909b19cc Merge pull request #17785 from owncloud/snapjs-sensitivity
fix mobile scrolling, lower sidebar sensitivity, fix #11193
9 years ago
Hendrik Leppelsack e5444a1a5d replace tipsys with tooltips 9 years ago
Vincent Petry aac7c19ab7 Fix showMenu animation callback 9 years ago
Vincent Petry 984ae8140d Fixed file actions menu to close when reclicking trigger
FileActionsMenu is now a backbone view.
The trigger and highlight handling is now done in the
FileActions.showMenu() method using events.
9 years ago
Vincent Petry ca34921cdf Implement file actions dropdown
File actions now have two types "inline" and "dropdown". The default is
"dropdown".
The file actions will now be shown in a dropdown menu.
9 years ago
Jan-Christoph Borchardt db40682b1f fix mobile scrolling, lower sidebar sensitivity, fix #11193 9 years ago
Vincent Petry ae27f90efe Fix app-content scrollbar when app-sidebar is open 9 years ago
Morris Jobke 5699fff889 Merge pull request #17175 from owncloud/add-download-feedback
Add loading spinner to download icon
9 years ago
Morris Jobke 4076f84f88 Merge pull request #17910 from owncloud/fix-modified-tooltip
Fix tooltip for modification time
9 years ago
Hendrik Leppelsack f67477206b fixed tooltip for modified date 9 years ago
Hendrik Leppelsack 6574dfcf23 remove title option from tipsy shim 9 years ago
Lukas Reschke 56cff46dc3 Add `fallback` to shim
Tipsy also supported the `fallback` element which will now not work anymore. To enhance compatibility we shall also implement it in the shim.

Fixes https://github.com/owncloud/core/issues/17870
9 years ago
Bernhard Posselt 582f07950f Merge pull request #17075 from owncloud/bootstrap-tooltip
Replace jQuery tipsy with bootstrap tooltip
9 years ago
Morris Jobke e18d0e26f6 Merge pull request #17599 from owncloud/fix-joinpaths-trailingslash
Fix OC.joinPaths with empty arguments
9 years ago
Vincent Petry b56a57e21c Add helper functions for host, port and webroot
These should be used in the future instead of location.*.
It will make it possible to stub these methods for writing unit tests
and simulating different URL schemes.
9 years ago
Vincent Petry 1b7d42c569 Fix OC.joinPaths with empty arguments
When empty arguments are given, the leading or trailing slash was not
detected properly.
9 years ago
Vincent Petry 119e27166e Add OC.joinPaths for convenient path joining 9 years ago
Hendrik Leppelsack 6f547a9960 fix tipsy not updating on reinitialization 9 years ago
Morris Jobke 3f5aa27d49 refactoring into proper methods 9 years ago
Hendrik Leppelsack 00b97dfbb1 remove debug messages 9 years ago
Hendrik Leppelsack f66e9af9a0 replaced tipsy with bootstrap tooltip 9 years ago
Hendrik Leppelsack e8507372e3 let buttons hide the sidebar 9 years ago
Jan-Christoph Borchardt 9332c8c266 remove slow fade animation for tipsy tooltip 9 years ago
Morris Jobke 51e4633187 Don't stop event execution for menu item click
* fixes #12326 - the settings menu is closed now, because the event is executed
9 years ago
Jan-Christoph Borchardt 701cb27a9e fix scrutinizer issues 9 years ago
Jan-Christoph Borchardt d728b85fdd adjust controls bar width to not overlay scrollbar 9 years ago
Jan-Christoph Borchardt d1db727d1f mock up missing elements in the tests 9 years ago
Jan-Christoph Borchardt e7dcc01017 only move dropdown triangle when navigation is opened, fix timing bug 9 years ago
Jan-Christoph Borchardt 30b745fc59 reintroduce quick animation for menus 9 years ago
Jan-Christoph Borchardt 07335c844a fix log in issue, fix arrow position, make dropdown work in Firefox 9 years ago
Jan-Christoph Borchardt d7414fbf0d move triangle of apps dropdown to align with app name triangle 9 years ago
Jan-Christoph Borchardt 095197d1a7 popover style for apps and user dropdown menus 9 years ago
Daniel Hansson 8ee1fa98df Don't use hardcoded date and time
Use local time instead. http://momentjs.com/
9 years ago
Daniel Hansson 946a7c3a83 Use 24h format instead of 12h format
Use correct time format in WebUI
9 years ago
Vincent Petry ce5d2ab7db Revert "Change to 24H format instead of 12H format"
This reverts commit 8279dde97a.
9 years ago
Daniel Hansson 8279dde97a Change to 24H format instead of 12H format
Update how the time shows in WebUI.

My first PR to core, woha. :)
9 years ago
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.
9 years ago
Morris Jobke a183b5d7e2 Merge pull request #14208 from owncloud/oc-msg-remove-object-dependency
Remove dependency from arbitrary data object structure for easier usage
9 years ago
Joas Schilling c201bc01bb Remove dependency from arbitrary data object structure for easier usage 9 years ago
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
9 years ago
Lukas Reschke dfcd4acd5a Merge pull request #13771 from owncloud/fix-humanfileSize
generate valid human readable text for 0
9 years ago
Lukas Reschke 0119d429fc Second parameter is optional
Makes my IDE happier.
9 years ago
Thomas Müller ccc1f09627 generate valid human readable text for 0 - fixed #9342 9 years ago
Morris Jobke dc17019536 adjust paths for search 10 years ago
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
10 years ago
Jörn Friedrich Dreyer 606f802b7b move search results below filelist, show hint when results are off screen, use js plugin mechanism 10 years ago
Jörn Friedrich Dreyer c738359a11 add paged provider 10 years ago
Jörn Friedrich Dreyer 088323aad5 move code from js.js to search.js in the search app 10 years ago
Jörn Friedrich Dreyer d3662722f6 new OC.Search, add search result formatters and handlers, use full content width for results 10 years ago
Thomas Müller 51a22431ee load showpassord.js conditionally in the template only if needed 10 years ago
Lukas Reschke be3d4fd303 Merge pull request #12360 from owncloud/files-tags
Add favorites to files app
10 years ago
Jörn Friedrich Dreyer 6602d3ac77 Merge pull request #12555 from owncloud/app_specific_search
introduce inApps[] filter for search via ajax query
10 years ago
Vincent Petry a5bb66f4a7 Added favorites feature to the files app 10 years ago
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
10 years ago
Vincent Petry c02ef69521 Simple Plugin system for Javascript 10 years ago
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.
10 years ago
Vincent Petry 0f3e6cb50a Improved Javascript docs for JSDoc
Added namespaces so that JSDoc can find them.
Fixed a few warnings.
Improved some comments.
10 years ago
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.
10 years ago
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
10 years ago
Clark Tomlinson ca5abe5744 Setting moment locale based on user selection 10 years ago
Bjoern Schiessle 94a9ff1cd8 make sure that the notification gets shown again after a second try 10 years ago
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
10 years ago
Lukas Reschke d2743e6ad6 Merge pull request #7254 from owncloud/core-sortalgo
Fixed JS sort comparator to be consistent between JS and PHP
10 years ago
Robin McCorkell 99d41bec5d Show original path information in trashbin and sharing views
Path will only be shown if in subdirectory, not in root.
10 years ago
Thomas Müller fd92fc7c47 Merge pull request #9753 from owncloud/filepath-css
Remove special case for css in OC.filePath
10 years ago
kondou 2a4c51389c Use a route instead of s.php and convert tokens asap 10 years ago
Thomas Müller ed2424c382 Merge pull request #10637 from owncloud/fixing-js-issues
Init vars with a value if none is provided
10 years ago
Clark Tomlinson ba0e65753b Init vars with a value if none is provided 10 years ago
Clark Tomlinson 92685acf60 Implementing moment.js
Updating Usages

Removing unused method

Adding JS Doc
10 years ago
Vincent Petry f2001a48a4 Fixed sort algo for additional cases 10 years ago
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()
10 years ago
Jan-Christoph Borchardt a6484fbda9 fix yellow notification style 10 years ago
Vincent Petry 4fea521102 Fix enforced share expiration date to be based on share time 10 years ago
Robin Appelman e7e5333b12 Remove special case for css in OC.filePath 10 years ago
Robin Appelman 6962505095 debounce the search function 10 years ago
Morris Jobke ae8e27cc42 fix loading spinner on ctrl click a app entry- fixes #9063 10 years ago
Vincent Petry 9de3d8225b Fix parsing URL hash when no "?" was specified 10 years ago
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.
10 years ago
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.
10 years ago
Jan-Christoph Borchardt 933c05566e Merge pull request #8922 from owncloud/design-controls-transparency
Bugfixes for mobile
10 years ago
Vincent Petry 5cebb6fb9b Merge pull request #4553 from owncloud/update_search_classes
Update search classes
10 years ago
Jan-Christoph Borchardt a6f9dd9c4b fix apps without app-navigation 10 years ago
Jörn Friedrich Dreyer 7c29645f22 allow apps to add translation for search result typeid 10 years ago
Vincent Petry b8ab77a475 Added debounce on resize 10 years ago
Morris Jobke 584c47b433 Disable snapper on bigger screens and on public/login page 10 years ago
Jan-Christoph Borchardt 9063a25bb4 slightly widen sidebar to 250px, works better with apps and on mobile 10 years ago
Jan-Christoph Borchardt 96278e0201 close sidebar when switching navigation entry, except on add or change settings 10 years ago
Jan-Christoph Borchardt 86a9cb2a6b add app sidebar toggle and swipe on mobile 10 years ago
Jan-Christoph Borchardt 26bf64631d better loading feedback for app start, move from JS to CSS 10 years ago
Jan-Christoph Borchardt e291a04dee show loading feedback 10 years ago
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.
10 years ago
Jan-Christoph Borchardt 19d7d87964 toggle the navigation on desktop, not only on mobile 10 years ago
Jan-Christoph Borchardt 4ca665ac10 infield label removal: remove JS file and references to it 10 years ago
Thomas Müller 79b3558c6d Merge pull request #7151 from owncloud/user-jquery
Continuing the New User management
10 years ago
Morris Jobke 5add56b6ca Merge pull request #7485 from owncloud/scrutinizer_fix_1_kondou
Scrutinizer cleanup
10 years ago
Frank Karlitschek f12a5248a3 Merge pull request #8820 from owncloud/design-details
Design details
10 years ago
kondou 9bc3f3cf30 Scrutinizer cleanup 10 years ago
Morris Jobke dd8b7b7af8 Merge pull request #8613 from owncloud/filesize-alignment
Improve aligment of file size
10 years ago
Morris Jobke de23ae735b add OC.menuSpeed to control the animation speed of menu toggle 10 years ago
Morris Jobke 5d457dafc1 display "<1 kB" for really small files
* added parameters for humanFileSize to trigger that behaviour
* add unit tests for that
10 years ago
raghunayyar 72ba396905 Adds Animation to Toggling Navigation on < 768px widths 10 years ago
Arthur Schiwon 7b63c2c036 cleanup 10 years ago
Arthur Schiwon b3d68fc175 refactor delete handling and apply it to users and groups 10 years ago
Arthur Schiwon 57ffaddf26 add Last Login column 10 years ago
Morris Jobke 27c8c87e94 Merge pull request #8187 from owncloud/escape-more-character
Also encode > and '
10 years ago
Vincent Petry a0987ebf59 Fix undefined JS on login/setup page 10 years ago
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.
10 years ago
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
10 years ago
Lukas Reschke 705242d390 Merge pull request #8727 from owncloud/upgrade-overview
Added update overview page
10 years ago
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
10 years ago
Vincent Petry 146583a98d Added update overview page 10 years ago
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
10 years ago
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)
10 years ago
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
10 years ago
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
10 years ago
Thomas Müller 032f38b230 Merge pull request #8213 from cbojar/master
Clean up js.js along suggestions from scrutinizer-ci, fixes #8204.
10 years ago
Thomas Müller 29bc82be8d fixing typos 10 years ago
Lukas Reschke 51eee3dec1 Fix JSDoc 10 years ago
Lukas Reschke 8fcffae1e2 Reuse selector 10 years ago
Lukas Reschke 539cecbd63 Use proper JSDoc documentation 10 years ago
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.
10 years ago
Lukas Reschke 6e424eb990 Also encode > and ' 10 years ago
Vincent Petry f84d66a24f Moved SVGSupport call to use OC.Util.SVGSupport() 10 years ago
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)
10 years ago
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
10 years ago
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()
10 years ago
Morris Jobke 841069e8cb Merge pull request #7770 from jamesryanbell/master
SVG support detection
10 years ago