214 Commits

Author SHA1 Message Date
Pranav Kant
2c3d9ae8d9 Add support for PutRelativeFile for Save As. (#136) 2017-11-22 16:23:55 +01:00
Pranav Kant
72cb1956b0 Start listening for standard post messages and ignore deprecated ones (#126)
New online versions emits both the post messages (the older one with a
deprecated flag and newer one without). Ignore if the deprecated flag is
mentioned because it means that we would get another post message
without deprecated flag.
2017-10-20 11:26:26 +02:00
Pranav Kant
7d502a3135 Revert "Replace 3 dots to ellisis in l10n files" partially
This reverts commit c6a3e02b4b7af75341c573340ef11baef8bee39d partially.

Presumably, some unwanted modifications also found its way in with above
patch breaking the app. Revert problematic pieces.
2017-06-02 00:20:36 +05:30
Andras Timar
c6a3e02b4b Replace 3 dots to ellisis in l10n files 2017-06-01 09:39:44 +02:00
rakekniven
3c35d287b0 Update documents.js
Changed "..." to ellipsis
2017-05-31 23:02:56 +02:00
Pranav Kant
9bb400714c Fix file revisions 2017-05-11 21:09:46 +05:30
Pranav Kant
a5f6569591 Bin superfluous returnToDir logic
This was initially introduced in OC so that we know which directory to
go after we close the editor but this seems unnecessary here in NC as
richdocuments is just an iframe which is removed from DOM when we close
the document.
2017-05-11 21:09:43 +05:30
Pranav Kant
5596ae17ce Fix incorrect language tags feeding to loleaflet
loleaflet expect a BCP47 language tag syntax while OC.getLocale returns
a lanugage tag where subtags are separated by '_' instead of '-'
(BCP47).

It seems safe to just replace '_' with '-' before feeding it to
loleaflet
2017-04-05 15:55:26 +05:30
Lukas Reschke
9cd9258dbb
Append instance id to rev history
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-03 20:31:35 +01:00
Lukas Reschke
7ef24654cf
Public editing
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-07 00:57:01 +01:00
Lukas Reschke
75af90b4f1
Cleanup source code
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-06 21:09:40 +01:00
Lukas Reschke
62bd261c0b
Remove unrequired "Office" interface
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-06 12:53:09 +01:00
Pranav Kant
ee48a54cbf Pre-light revision history buttons on mouseover and tooltip 2016-11-28 13:05:40 +05:30
Pranav Kant
05e6ed7e0e Prevent a cramped-up revision history sidebar 2016-11-28 12:50:37 +05:30
Pranav Kant
309d5535ff Be backward compatible with older LOOLs 2016-10-28 17:29:05 +05:30
Pranav Kant
a12ff8d0d2 security: Support WOPI's PostMessageOrigin
Adds a new property PostMessageOrigin to WOPI's CheckFileInfo.
The inner frame then only sends message to target with origin
mentioned in this property.

Also implement editor initialization WOPI specs. Inner frame
sends a App_LoadingStatus message to us when ready, and we send
Host_PostmessageReady when we are ready.
2016-10-27 17:57:46 +05:30
Pranav Kant
93416e52a4 Kill edit for specific groups code 2016-10-19 21:12:29 +05:30
Pranav Kant
20d2ce582a Don't ignore non-updatable files
Don't discriminate with these files; let them have the right to
join the session or generate access token like other sessions
2016-10-19 21:12:29 +05:30
Pranav Kant
c98c1e6ba7 Handle empty arrays correctly 2016-10-14 15:26:05 +05:30
Pranav Kant
1ad1f667ee Simplify edit group checking algorithm
Rather than making a server call, which seems to be not working
always anyways, use a foolproof method for this.
2016-10-13 20:50:48 +05:30
Pranav Kant
145854400e New 'Use OOXML by default' option in admin settings 2016-10-13 14:41:49 +05:30
Pranav Kant
c24c5a0439 Only allow users to edit documents if part of edit groups
If edit group setting is not set in Collabora Online settings,
then allow all users.
2016-10-11 13:21:35 +05:30
Miklos Vajna
d6b65b7983 bccu#2033 Respect WOPI action names
Don't assume that the action name is 'edit' all the time. Instead, if
it's view, then initialize leaflet with permission=readonly.
2016-10-04 15:53:36 +02:00
Pranav Kant
cf97470caf Show relative timestamps as heading, formatted as tooltip
Be consistent with owncloud own version sidebar, and loleaflet's
DocumentRepair dialog.
2016-10-03 11:17:36 +05:30
Morris Jobke
d6a412caac
Fix error in richdocuments
Ports https://github.com/owncloud/documents/pull/652 by @vicdeo to richdocuments
2016-09-07 13:27:09 +02:00
Pranav Kant
4cda46798e Add restore button to the revision history sidebar 2016-07-18 11:11:52 +05:30
Pranav Kant
ea484bb357 Fix a typo 2016-07-18 11:11:52 +05:30
Andras Timar
53256007de Merge pull request #81 from pranavk/download_tooltip
Show 'Download' tooltip for download icon in revision history
2016-07-15 19:45:42 +02:00
Pranav Kant
d91151091d Show 'Download' tooltip for download icon in revision history 2016-07-04 13:55:42 +05:30
Pranav Kant
1a41f8bbd3 Respect lolang param in revision history mode too 2016-07-04 13:35:43 +05:30
Pranav Kant
c084533efb Wait till page is rendered
There's a race condition here between page being rendered with
all the document(s) information and showing the editor to the
user. The later requires the former as it uses data rendered into
the page.

In most cases, former is quick enough and we do not see any
problems, but in some cases, mostly when the server is responding
very slowly, it will lag behind the later causing the editor to
be shown before data is rendered into the page leading to '404
Object not found'.

This should, hopefully, avoid such cases.
2016-06-29 22:03:01 +05:30
Pranav Kant
c80a31ebe0 $.getJSON already returns a promise like object
... so no need to create a deferred object separately and then
resolve it manually. This is since jquery 1.5

See: https://api.jquery.com/jquery.getjson/
2016-06-29 21:12:15 +05:30
Pranav Kant
f3e7211ee5 Add Handlebars to global 2016-06-29 19:43:10 +05:30
Pranav Kant
58f9b4c5b4 Explicitly ask for revision history option
... since loleaflet explicitly requires it now if revision
history option is required.
2016-06-29 17:42:18 +05:30
Pranav Kant
50d1b609ba Move exist button to top right of revision sidebar 2016-06-28 17:00:58 +05:30
Pranav Kant
3235b886ad Add a revision history sidebar 2016-06-28 14:24:26 +05:30
Andras Timar
446372c0cb this string is not localizable 2016-06-26 17:12:52 +02:00
Pranav Kant
87f7720d12 Remove unused method
See 2b302fa1af99ccc05c38c9b29f57570e3a52fac2
2016-06-23 14:50:28 +05:30
Pranav Kant
8e56d58ff7 bccu#1882: Return to where user started by removing redundant call
Route /close/ doesn't mean anything, and we were making this
additional call always before closing the document. This had a
side-effect that sometimes /close/ call would be processed after
we assign returnToDir to window.location making browser always
stuck in richdocuments#index rather than reeturnToDir. This was
mainly the problem in firefox with owncloud9
2016-06-23 13:25:44 +05:30
Pranav Kant
04a3bacb4d give focus explicitly to loleafletframe after loading
This is mainly problem in firefox where sometime, key press
events are handled by the browser, but we do not want that.
2016-06-14 11:03:55 +05:30
Pranav Kant
b138109820 Don't load all documents when only one is clicked on from 'Files' 2016-06-09 20:17:36 +05:30
Jan Holesovsky
68b81e846b bccu#1882: Return to the 'Files' app when the editing started there.
Also retain the directory where the editing started.
2016-06-07 12:12:23 +02:00
Andras Timar
e22151a2b5 Pass the lang paramater to loleaflet from ownCloud user settings, which controls UI language 2016-05-29 00:16:27 +02:00
Andras Timar
cdc6d2dffc add tooltip with document path for icon view 2016-04-20 14:31:18 +02:00
Henry Castro
efcf28abc2 Add ulrsrc attribute when create new documents 2016-04-16 17:41:43 -04:00
Jan Holesovsky
e94fa64836 One more place where we need to present the error message. 2016-04-15 17:24:30 +02:00
Jan Holesovsky
ea47464459 More improvements in the error handling. 2016-04-15 16:55:15 +02:00
Jan Holesovsky
b48ae81a99 Small improvement in the documentation. 2016-04-13 19:24:01 +02:00
Jan Holesovsky
f2974bd618 Adapt to changes in loolwsd - pass only access_token via form post.
Also limit the amount of stuff that actually needs to be passed, and add
comments.
2016-04-13 19:07:37 +02:00
Pranav Kant
41f2f63907 Do not show scary warning dialog
... since we save to disk on abnormal client termination.
2016-04-13 12:04:04 +05:30