Commit graph

312 commits

Author SHA1 Message Date
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
Vincent Petry
fe04106e0f Add/remove main menu action when switching between desktop/mobile mode 2014-03-18 13:10:13 +01:00
Vincent Petry
872006da03 Only enable toggle for sidebar in mobile mode 2014-03-17 20:44:30 +01:00
Thomas Tanghus
413afab424 Replace console.time/timeEnd 2014-03-17 19:39:19 +01:00
jamesryanbell
4fc96ebb7b SVG support detection
The SVGSupport checkMimeType method was failing on my setup as the headers are all returned in lowercase. I have lowercase all the indexes and modified the if statement so that it doesn't matter what case the headers are returned in
2014-03-17 16:11:49 +00:00
Jan-Christoph Borchardt
b37aae9925 mobile: menu togglable for mobile, use code by @PVince81 2014-03-14 10:33:19 +01:00
Thomas Tanghus
5e6f0dcc6d Fix copy/paste error 2014-03-10 16:26:07 +01:00
Thomas Tanghus
01bcdf5b53 Add function remove() to OC.localeStorage 2014-03-10 16:22:52 +01:00
Morris Jobke
256dca935b Revert "adding new javascript function OC.generateUrl(url, params)"
This reverts commit 8e667d1934.
2014-03-06 15:10:32 +01:00
Morris Jobke
5f0a22586f Merge pull request #7579 from owncloud/introduce-generateUrl-master
Introduce OC.generateUrl() in master
2014-03-06 15:07:28 +01:00
Thomas Müller
8e667d1934 adding new javascript function OC.generateUrl(url, params) 2014-03-06 00:17:48 +01:00
Thomas Müller
e1030c6b5f adding JSDoc + remove unused function 2014-03-02 23:15:37 +01:00
Thomas Müller
1291303c5a Replace OC.Router.generate() with OC.generateUrl() 2014-03-02 22:30:24 +01:00
Jan-Christoph Borchardt
d9a153dbe9 Merge pull request #7174 from owncloud/issue/7166
Add option to change email settings in admin section
2014-02-26 14:41:07 +01:00
Joas Schilling
9847912257 Remove unused variables, add doc blocks and break lines
Fix #7166
2014-02-26 13:10:46 +01:00
icewind1991
aa0bcf7ba4 Merge pull request #7336 from owncloud/IE-wipho-viewport
fix viewport size on windows phone
2014-02-21 15:13:20 +01:00
Robin Appelman
daf28225b7 fix viewport size on windows phone 2014-02-20 18:42:59 +01:00
Jan-Christoph Borchardt
92d57cb5a7 move avatar into clickable area of user menu 2014-02-20 13:36:52 +01:00
Joas Schilling
fdb0d2067f Remove duplicated definition and move OC.msg to js/js.js
Fix issue #7166
2014-02-19 10:20:52 +01:00
Joas Schilling
145d9a09ab Do not select input for all text input fields
Fix issue #6920
2014-02-07 16:31:29 +01:00
Thomas Müller
45ab9810c5 fixing typos 2014-02-04 20:58:06 +01:00
Vincent Petry
912da8d277 Added session_keepalive setting
When session_keepalive is true (default) the heartbeat will be send as
often as the half of the session timeout value.
2014-02-04 13:56:10 +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
41b6d4b702 Added OC.buidQueryString() utility function
Makes it possible to create query strings by passing a JavaScript hash
map and automatically encodes the keys and values.
2014-01-24 12:44:31 +01:00
tsumi
f41255f652 Useless else removed
As suggested by @PVince81 : https://github.com/owncloud/core/pull/6721#issuecomment-32289922
2014-01-15 09:39:21 +01:00
tsumi
7c1649fc24 Added SVG fallback to apps settings popup
This fix issue of calendar app with IE8, see issue report for details:
https://github.com/owncloud/calendar/issues/291
2014-01-10 21:19:30 +01:00
Morris Jobke
ce3df44699 Merge pull request #6031 from s0taka/master
No decimal points for Kilobyte and Byte #5371.
2014-01-05 11:52:10 -08:00
Simon Könnecke
8fdc4585f7 spaces to tabs 2013-12-18 15:43:45 +01:00
Thomas Müller
f57c38df77 Merge pull request #6431 from owncloud/core-pluraltranslationsfix
Added plural translation fallback
2013-12-18 03:11:18 -08:00
Frank Karlitschek
753525c57f Merge pull request #6386 from owncloud/trash_always_show_deleted_files_breadcrumb
always show 'Deleted Files' breadcrumb
2013-12-17 00:25:06 -08:00
Bjoern Schiessle
3e17fbe30d always show home breadcrumb in files view 2013-12-16 17:40:35 +01:00
Vincent Petry
d8d11e3976 Fixed JS plural function to be per app
Some apps might not define the same "nplural" value.
To avoid conflicts, the plural function is now generated per app.

Fixes #6427
2013-12-16 16:00:23 +01:00
Vincent Petry
df1a404466 Fix webroot for update page
On the update page, config.js was missing which caused oc_webroot to not
be available. That would trigger the faulty oc_webroot fallback that
didn't take URLs like "/owncloud/index.php/files/apps" into account.

This fix adds config.js in the update page and also a fix for the
oc_webroot fallback, in case it is used elsewhere.
2013-12-13 12:56:48 +01:00
Morris Jobke
4c4c9096c4 fix plural translation - fixes #6226 2013-12-07 11:38:01 +01:00
Simon Könnecke
243f3f0c4c No decimal points for Kilobyte and Byte #5371. 2013-11-25 12:26:03 +01:00
Jörn Friedrich Dreyer
45e6d96702 prevent user from creating or renaming sth. to an existing filename
- show tooltip when violating naming constraints while typing
- when target filename exists on server fallback to dialog to interrupt the users flow because something unexpected went wrong
- fixes #5062
- also fixes some whitespace and codestyle issues in files js
- uses css selector over filterAttr in touched js files
2013-10-22 18:11:03 +02:00
raghunayyar
2def1a8853 Removes Bogus showpassword js. thx @PVince81 2013-10-15 14:41:18 +05:30
raghunayyar
4eed240296 Should Display PasswordToggle Eye Everywhere. 2013-10-15 11:36:44 +05:30
Jörn Friedrich Dreyer
9f9eb1b08f Merge pull request #4263 from owncloud/search_scrollto
initial scrollto implementation
2013-09-19 05:49:45 -07:00
Jörn Friedrich Dreyer
b40925ae17 initial scrollto implementation:
use places/folder icon,
move link construction to JS,
only show icon on hover,
use 'searchresult' as css class name,
add filter/unfilter methods,
highlight searched files in current filelist
only filter when correct FileList is present
2013-09-17 18:40:51 +02:00
Jörn Friedrich Dreyer
afe4f6a794 add exists method to jquery 2013-09-16 13:47:37 +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
85758f3d7d Merge pull request #4473 from owncloud/texteditor_polishing
Texteditor polishing
2013-09-03 05:38:59 -07:00
Morris Jobke
584857de69 Merge pull request #4627 from owncloud/trashbin-tipsy
change orientation for delete tooltip to left, fix #4589
2013-08-28 09:09:40 -07:00
Jan-Christoph Borchardt
e7b40983e4 change orientation for delete tooltip to left, fix #4589 2013-08-28 17:58:23 +02:00
Jan-Christoph Borchardt
c6eda25d50 remove show password toggle from log in page, ref #4577 #4580 2013-08-28 13:58:49 +02:00
Owen Winkler
1793ec1d5d Fixed inconsistent spacing. 2013-08-18 05:17:28 -04:00
Thomas Müller
15c9a0f405 fixing undefined js error 2013-08-17 19:24:06 +02:00
Jörn Friedrich Dreyer
5b8d30c6b6 refactor OC.Breadcrumbs, allow injection of container to allow rendering crumbs into full screen editor 2013-08-16 17:20:49 +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
Morris Jobke
5fb7aab7a0 remove jPlayer css rules from core css file 2013-08-15 16:08:49 +02:00
Jörn Friedrich Dreyer
8f3f47e868 Merge pull request #4376 from owncloud/use_plurals
Use plural translations
2013-08-14 10:23:19 -07:00
Jörn Friedrich Dreyer
5660f99592 add PERMISSIONS_ALL summary 2013-08-13 22:58:27 +02:00
kondou
9549bd3e68 Use plural translations 2013-08-09 20:37:18 +02:00
Owen Winkler
a2ac5e0163 Merge pull request #4271 from owncloud/plural_translations
Plural translations
2013-08-08 10:34:28 -07:00
Thomas Müller
d97e3c3571 adding proper evaluation of plural form - uses LGPL licensed code of jsgettext 2013-08-03 23:31:49 +02:00
Jörn Friedrich Dreyer
f8bb4e10ae use fixed OC.Breadcrumb.push() 2013-08-02 11:46:44 +02:00
Jörn Friedrich Dreyer
b12c1cb325 add OC.Breadcrumb.show(dir, filename, link) 2013-08-02 11:46:44 +02:00
Robin Appelman
44594fb41c make sure the first breadcrumb item is inserted before any other elements in the topbar 2013-08-01 16:46:01 +02:00
Thomas Müller
2a42021815 Merge branch 'master' into delete-fix
Conflicts:
	core/css/styles.css
2013-07-23 16:24:34 +02:00
Jan-Christoph Borchardt
48948ccf5f finally remove the file size obfuscation as it had more disadvantages. I was wrong, sorry. 2013-07-18 22:15:26 +02:00
Jan-Christoph Borchardt
8a25d1ad06 remove unnecessary tipsy for Files delete 2013-07-18 18:41:01 +02:00
Jakob Sack
bb0c5bff5f Add multiple plural forms to the php part 2013-07-16 22:16:53 +02:00
Jakob Sack
4e214883d6 Partly integrate plural translations into js 2013-07-07 20:26:09 +02:00
Victor Dubiniuk
16e5a1b100 Fix lazy styles loading in IE8 2013-07-02 18:44:10 +03:00
Morris Jobke
b19033b353 Merge pull request #3223 from owncloud/fix-2820
if rename of file fails, the rename is undone in the view - fix 2820
2013-07-01 01:28:17 -07:00
Thomas Mueller
e6c1db7a3f move javascript variables 'oc_current_user' and 'oc_requesttoken' to js.js - fixes #3853 2013-06-26 11:23:21 +02:00
Morris Jobke
e0547a25ab if rename of file fails, the rename is undone in the view - #fix 2820
Changes:
 * OC.dialog -> OC.Notification
 * Added test
 * Fixed OC.Notification.show() issue for queued items
 * Highlight failed item and show notification
2013-06-15 09:58:27 +02:00
Jörn Friedrich Dreyer
591b383f2d peselect filename without extension on rename 2013-05-13 15:54:45 +02:00
raghunayyar
59be6a910c Implements Toggle for Database Password. 2013-04-13 09:45:30 +05:30
Bernhard Posselt
18c873d1e5 Merge pull request #2554 from owncloud/hide-toggle-checkbox
Implements Hide / Display for the Password Toggle Button
2013-04-11 01:18:40 -07:00
Thomas Tanghus
75af38c1bd Move compatibility functions to compatibility.js and add two more. 2013-04-06 22:37:15 +02:00
raghunayyar
8d7aa42b9a Removes the setTimeout() method. 2013-03-26 23:32:26 +05:30
raghunayyar
25a8690318 Fixes autofill for display / hide toggle button, a better function name. 2013-03-25 16:09:35 +05:30
raghunayyar
d9cd9875e0 Initial Commit : Password Toggle Button hides if no input present 2013-03-25 04:30:09 +05:30
Doug Neiner
b8c1a4da3e Upgraded infield labels plugin to the latest version. Updated invocation to opt-in to pollling at the same duration you were using before, 100ms 2013-03-17 22:21:34 -05:00
Georg Ehrke
a83a5aa900 fix #2128 2013-03-06 13:02:44 +01:00
Michael Gapczynski
0488968443 Merge pull request #2034 from owncloud/fix_bug47
Fix #47 - Duplicate files create a (2) when multiples are uploaded
2013-03-03 11:49:04 -08:00
Georg Ehrke
620ddd3baa new Array() -> [] 2013-03-02 19:24:37 +01:00
Georg Ehrke
22424e8abc update OC.Notification.show 2013-03-02 17:36:04 +01:00
Georg Ehrke
ff9476b3e3 fix oc#47 2013-03-01 18:30:25 +01:00
Bernhard Posselt
a65b16f3e7 generate url only once 2013-02-26 20:45:25 +01:00
Bernhard Posselt
81bb4363a2 use 15 min instead of 15 sec timeout 2013-02-26 20:25:07 +01:00
Bernhard Posselt
4e55348054 implemented a heartbeat request which is calls the server every 15 minutes to prevent a session timeout 2013-02-26 19:34:46 +01:00
Jörn Friedrich Dreyer
0dd7fd0599 IE8 does not support window.onclick 2013-02-21 17:38:25 +01:00
Jan-Christoph Borchardt
3f09cc139f double speed for user menu slide 2013-02-14 17:13:50 +01:00