1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-09 07:25:23 +02:00

Compare commits

...

1323 commits

Author SHA1 Message Date
Harvey Kandola
efb092ef8f Prep v5.13.0 release 2024-12-31 13:09:30 -05:00
Harvey Kandola
3fc0a15f87 es-AR 2024-12-31 12:05:21 -05:00
Harvey Kandola
c841c85478 Add en-AR i18n 2024-12-30 13:49:39 -05:00
Harvey Kandola
2dae03332b Prep release 2024-06-18 11:53:23 -04:00
Harvey Kandola
44b1f263cd Restore activity and audit logs 2024-06-18 11:53:15 -04:00
Harvey Kandola
982e16737e Bump version 2024-02-19 11:55:21 -05:00
Harvey Kandola
f641e42434 Remove default conversion service URL 2024-02-19 11:55:15 -05:00
Harvey Kandola
8895db56af Skip restore of user logs 2024-02-19 11:54:50 -05:00
Harvey Kandola
acb59e1b43 Bump Go deps 2024-02-19 11:54:27 -05:00
Harvey Kandola
f2ba294be8 Prep 5.11.3 2024-02-16 10:53:02 -05:00
Harvey Kandola
69940cb7f1
Merge pull request #398 from mb3m/fix-win-build
Fix Windows build script
2024-02-02 06:44:23 -05:00
Harvey Kandola
6bfdda7178
Merge pull request #399 from mb3m/fix-french
French translation updates
2024-02-02 06:42:35 -05:00
Thomas Bolon
027fdf108c french translation updates
- uppercase with accent (E => É)
- Label => Étiquette
- misc terms
- space before punctuations ("?" => " ?")
2024-02-02 11:44:50 +01:00
Thomas Bolon
1f12df76aa typo 2024-02-02 11:17:49 +01:00
Thomas Bolon
d811b88896 fix windows build
- add a cd .. after ember build: the script moves to gui\ directory but
  does not move back, despite the rest of the script expecting running
  from the root directory.

- add multiple echo commands to help debug error

- fix robocopy wrong usage where glob patterns are specified on the
  source path instead of a specific third argument
2024-02-02 11:15:47 +01:00
Harvey Kandola
20fb853907 Implement Azure SQL database compatibility checks 2024-01-16 12:47:44 -05:00
Harvey Kandola
599c53a971 Loosen Microsoft SQL Server database compat. checks 2024-01-15 16:48:21 -05:00
Harvey Kandola
1f462ed4f7 Support Microsoft SQL Azure v12+ 2024-01-15 14:43:27 -05:00
Harvey Kandola
9f122fa79b Bump version 2024-01-11 11:15:43 -05:00
Harvey Kandola
4210caca48 Improve document transaction scopes 2024-01-10 15:54:56 -05:00
Harvey Kandola
c62fa4612b Upgrade Go deps 2024-01-10 14:47:49 -05:00
Harvey Kandola
510e1bd0bd Bump version to 5.11.0 2024-01-10 14:47:40 -05:00
Harvey Kandola
a32510b8e6 Add additional SQL Server indexes 2024-01-10 14:47:08 -05:00
Harvey Kandola
589f3f581f Prep 5.10.0 release 2023-09-18 12:27:18 -04:00
Harvey Kandola
20bba4cd7e Add performance indexes for MS SQL Server database provider 2023-09-18 12:27:09 -04:00
Harvey Kandola
cbf5f4be7d
Merge pull request #397 from armando-marra/master
Modified i18n.js and Readme.md
2023-09-08 12:15:28 -04:00
Armando Marra
dc63639c99
Update README.md
Added italian to languages list
2023-09-08 09:10:05 +02:00
Armando Marra
26f435bdc9
Merge branch 'documize:master' into master 2023-09-08 09:08:21 +02:00
Armando Marra
a8a82963fa
Merge pull request #1 from armando-marra/patch-1-it-lang
Update i18n.js
2023-09-08 09:07:42 +02:00
Armando Marra
ab8582e807
Update i18n.js
Added Italian language support
2023-09-08 09:06:48 +02:00
Harvey Kandola
4fa0566274
Merge pull request #396 from armando-marra/master
Added Italian translation
2023-08-23 09:09:45 -04:00
armando-marra
f4b45d2aa7
Update localize.go
Added Italian language
2023-08-23 14:22:47 +02:00
armando-marra
1abc5d3e52
Italian language JSON file 2023-08-23 14:14:38 +02:00
Harvey Kandola
6e463ff2f4 Bump version 2023-08-21 12:20:53 -04:00
Harvey Kandola
f80b3f3d10 5.8.0 2023-07-24 11:11:46 -04:00
Harvey Kandola
6c218cf087 Add additional indexes for SQL Server 2023-07-24 11:11:39 -04:00
Harvey Kandola
3d1c8a6c54 Remove archived versions from version selector 2023-07-24 11:11:25 -04:00
Harvey Kandola
576fd5e604
Merge pull request #395 from xadammr/patch-1
Add support for SQL Server 2022
2023-07-17 17:07:09 -04:00
Adam Roe
62407a28b4
Add support for SQL Server 2022 2023-07-15 18:27:20 +10:00
Harvey Kandola
0adf6d5dc8 Update permission.go 2023-06-12 13:24:47 -04:00
Harvey Kandola
15f8a64c86 Bump Go & improve SQL layer 2023-05-15 13:47:22 -04:00
Harvey Kandola
95c67acaa0
Merge pull request #394 from uchida-nunet/master
Minor corrections Japanese translation
2023-03-04 08:45:39 -05:00
Harvey Kandola
d8f66b5ffb Bump version 2023-02-27 13:30:34 -05:00
Uchida, Yasuhiro
c051e81a99 Update ja-JP.json 2023-02-24 01:08:43 +09:00
Uchida, Yasuhiro
1d86b98949
Update ja-JP.json 2023-02-24 00:59:06 +09:00
Harvey Kandola
0a1cc86907
Merge pull request #393 from uchida-nunet/master
add Japanese language support
2023-02-11 10:28:58 -05:00
uchida-nunet
a49869d35d Update ja-JP.json 2023-02-11 18:09:27 +09:00
uchida-nunet
848afd3263 change gui/app/services/i18n.js 2023-02-11 12:51:59 +09:00
uchida-nunet
b9cb99e3bb mod 2023-02-11 12:43:32 +09:00
uchida-nunet
64261ffcf5 Merge branch 'master' of https://github.com/uchida-nunet/documize-community 2023-02-11 12:30:12 +09:00
uchida-nunet
0030418707 add Japanese language support 2023-02-11 12:29:43 +09:00
uchida-nunet
0f91ee518e add Japanese language support 2023-02-11 12:06:29 +09:00
Harvey Kandola
5de1b7a92e
Merge pull request #392 from Xhelliom/dev
Minor corrections french translation
2023-02-07 11:04:17 -05:00
Stephane Wetterwald
a2524f785e Minor corrections 2023-02-07 15:57:25 +01:00
Harvey Kandola
f16b9f3810 Build prep 2023-02-06 14:01:19 -05:00
Harvey Kandola
1c09771c33 Bump version 2023-02-06 11:46:10 -05:00
Harvey Kandola
13fc5b5015 Test for user permissions before setting them 2023-02-06 11:46:03 -05:00
Harvey Kandola
76c777acc1 French localization 2023-02-06 11:45:47 -05:00
Harvey Kandola
ea9ff78411
Merge pull request #391 from Xhelliom/dev
Translate to french
2023-02-06 11:19:35 -05:00
Stephane Wetterwald
4a9dd47894 translate to french 2023-02-01 21:40:34 +01:00
Harvey Kandola
7565779ef1
Update docker-compose.yaml
Revert broken command
2023-01-11 20:04:00 -05:00
Stephane Wetterwald
c07e7b6afc more translations 2022-12-29 16:50:00 +01:00
Harvey Kandola
88bdafcb1b
Merge pull request #390 from rursache/patch-1
Updated docker-compose.yaml
2022-12-17 13:09:34 -05:00
Radu Ursache
5a3cb1b226
Updated docker-compose.yaml
Updated `docker-compose.yaml` to read the correct arch from device so arm64 devices can run Documize as well
2022-12-17 20:07:23 +02:00
Stephane Wetterwald
6ee8e6c7b4 translated to line 200 2022-12-15 12:32:35 +01:00
Stephane Wetterwald
599c464d2d add fr 2022-12-15 12:18:14 +01:00
Harvey Kandola
ae77fa2275
Merge pull request #389 from nemunaire/b/dockerfile
Dockerfile: Force node 16 + update go and alpine tags
2022-11-22 08:54:19 -05:00
Pierre-Olivier Mercier
610367aac5 Force node 16 + update go and alpine tags 2022-11-22 10:11:41 +01:00
Harvey Kandola
be2c2a7a2c v5.4.2 prep 2022-10-31 18:32:59 -04:00
Harvey Kandola
0d28b7ee79 Fix org reset during restore 2022-10-31 18:32:46 -04:00
Harvey Kandola
aa8b473018 Bump version to 5.4.1 2022-10-21 11:13:13 -04:00
Harvey Kandola
6993dc678f Fix regression for robots.txt and sitemap.xml 2022-10-21 11:13:03 -04:00
Harvey Kandola
e0e3f0c141 Fix middleware for favicon/sitemap 2022-10-21 11:12:46 -04:00
Harvey Kandola
4c031fe7e4 Set TLS min to 1.3 2022-10-21 11:12:17 -04:00
Harvey Kandola
e4025bee42 Bump to v5.4.0 2022-10-10 17:40:45 -04:00
Harvey Kandola
876775b395 Support TLS version selection
Allow config file and ENV variables to define minimum TLS version used for SSL connections.

tlsversion=1.3
2022-10-10 17:40:36 -04:00
Harvey Kandola
828c01d189 Update README.md 2022-09-18 15:40:10 -04:00
Harvey Kandola
a69bcc0af6 Update README.md 2022-09-18 15:39:16 -04:00
Harvey Kandola
5ec911dce2 Dotcom pricing landing page changes 2022-09-18 15:25:57 -04:00
Harvey Kandola
ce07d4d147 Bump version 2022-09-18 14:29:38 -04:00
Harvey Kandola
f3ef83162e
Update README.md 2022-09-16 12:25:02 -04:00
Harvey Kandola
f1a01ec195 Bump version to 5.2.2 2022-09-12 12:35:51 -04:00
Harvey Kandola
01e53c3d27 Fix sanitization of document title 2022-09-12 12:35:40 -04:00
Harvey Kandola
2cf21a7bea Fix i18n issue 2022-09-08 16:45:28 -04:00
Harvey Kandola
d4c606760c Bump version 2022-08-01 10:13:21 -04:00
Harvey Kandola
9343d77b26 Bump PDF viewer dep 2022-08-01 10:13:15 -04:00
Harvey Kandola
30aa8aadb6 Fix i18n bug for PDF viewer 2022-08-01 10:13:03 -04:00
Harvey Kandola
29bc2677a8 v5.2.0 2022-07-13 13:28:31 -04:00
Harvey Kandola
d9827df440
Merge pull request #387 from kmkzif/master
Add portuguese language support
2022-07-13 13:21:24 -04:00
KMKZ
cfd7ebd2bf Add portuguese language support 2022-07-12 22:14:26 -03:00
Harvey Kandola
b510615691 Update community.go 2022-07-10 15:49:34 -04:00
Harvey Kandola
e8641405cf Update package.json 2022-07-10 15:48:21 -04:00
Harvey Kandola
209f1b667e Bump version 2022-07-10 15:38:37 -04:00
Harvey Kandola
e70019d73b
Merge pull request #386 from 569258yin/master
Add chinese language support
2022-07-10 15:32:39 -04:00
manwang
dc26f063c8 add chinese language support 2022-07-09 08:50:35 +08:00
Harvey Kandola
68d067ef7b Update en-US.json 2022-05-16 16:30:17 -04:00
Harvey Kandola
0d52f434d5 Localized string updates 2022-05-16 16:23:19 -04:00
Harvey Kandola
ce22c78dac Bump version 2022-05-16 13:22:02 -04:00
Harvey Kandola
f976ea36f6 Fix version control translation strings 2022-05-16 13:12:55 -04:00
Harvey Kandola
1734963693 Remove unnecessary permission check 2022-05-12 12:27:06 -04:00
Harvey Kandola
247a2b2c03 Remove back tick 2022-04-15 15:53:47 -04:00
Harvey Kandola
38a790dd04 v5 release
Supported locales: English and German.
2022-04-13 13:54:27 -04:00
Harvey Kandola
b77b4abdc2 Add de-DE locale 2022-04-08 11:59:08 -04:00
Harvey Kandola
6b498a74c6
Merge pull request #383 from lafriks-fork/fix/docker_missing_i18n
Fix missing i18n files in docker build
2022-04-05 11:50:25 -04:00
Lauris BH
f6dd872782
Fix missing i18n files in docker build 2022-04-05 15:54:03 +03:00
Harvey Kandola
9473ecba9a Update flowchart.go 2022-03-24 13:13:11 -04:00
Harvey Kandola
1a909dd046 Support custom URLS for Diagrams.net 2022-03-24 13:05:45 -04:00
Harvey Kandola
607a2d5797 Create howto-localize.png 2022-03-23 12:35:32 -04:00
Harvey Kandola
037dfc40cd Update en-US.json 2022-03-22 13:18:32 -04:00
Harvey Kandola
65348eee28 More i18n strings 2022-03-22 13:13:57 -04:00
Harvey Kandola
78932fb8c7 Fix i18n strings 2022-03-22 12:14:31 -04:00
Harvey Kandola
6c8b10753d i18n fixes 2022-03-21 19:14:10 -04:00
Harvey Kandola
e56263564c
Merge pull request #382 from documize/i18n
Localization support
2022-03-21 13:18:44 -04:00
Harvey Kandola
22b6a4fb78 Update i18n.js 2022-03-21 13:15:53 -04:00
Harvey Kandola
7e26c003d6 Select user language before server language 2022-03-21 13:14:55 -04:00
Harvey Kandola
e81cbad385 Select language for server and per user 2022-03-21 12:43:45 -04:00
Harvey Kandola
4494ace0a2 Set org and per user locale 2022-03-19 18:07:38 -04:00
Harvey Kandola
23abcf1585 i18n fixes 2022-03-17 16:42:15 -04:00
Harvey Kandola
67070c3bfc Require sub check 2022-03-17 16:31:11 -04:00
Harvey Kandola
77c767a351 Update en-US.json 2022-03-17 16:17:37 -04:00
Harvey Kandola
17162ce336 i18n mail template strings 2022-03-17 13:03:04 -04:00
Harvey Kandola
7255eb4f56 i18n server-side strings 2022-03-16 17:39:01 -04:00
Harvey Kandola
df534f72fa i18n server-side strings 2022-03-16 16:58:42 -04:00
Harvey Kandola
f4a1350a41 i18n server-side loading and setup 2022-03-16 13:32:48 -04:00
Harvey Kandola
cd15c393fe Go 1.18 & tidy deps 2022-03-16 13:32:27 -04:00
McMatts
7f66977ac1 i18n notify strings 2022-03-14 14:49:10 -04:00
McMatts
33a9cbb5b0 Update licensing links 2022-03-14 14:33:54 -04:00
McMatts
716343680a i18n Enterprise feature-set 2022-03-14 14:09:50 -04:00
McMatts
5db5f4d63b i18n continuation 2022-03-14 12:01:46 -04:00
McMatts
3d3d50762e i18n section stings 2022-03-10 16:35:59 -05:00
McMatts
20c9168140 i18n section strings 2022-03-10 15:21:25 -05:00
McMatts
ce9c635fb4 i18n section strings 2022-03-10 13:49:19 -05:00
McMatts
f735ae1278 i18n section types 2022-03-10 12:10:39 -05:00
McMatts
bca7794c00 i18n doc strings 2022-03-09 15:20:16 -05:00
McMatts
371706fb49 i18n doc strings 2022-03-09 14:04:17 -05:00
McMatts
a236cbb01c i18n doc strings 2022-03-09 13:36:48 -05:00
McMatts
93b6f26365 i18n space strings 2022-03-08 17:05:12 -05:00
McMatts
5e687f5ef4 i18n space strings 2022-03-08 13:05:30 -05:00
McMatts
97c4c927ac i18n space strings 2022-03-08 12:50:34 -05:00
McMatts
4885a1b380 i18n space strings 2022-03-08 12:16:36 -05:00
McMatts
e0805d7131 i18n search strings 2022-03-08 11:35:59 -05:00
McMatts
6d735e8579 i18n page strings 2022-03-04 18:31:23 -05:00
McMatts
073ef81e80 i18n strings
Pods completed
2022-03-04 13:46:22 -05:00
McMatts
38c9a94a9c i18n strings 2022-03-04 13:28:36 -05:00
McMatts
59dc6ea991 i18n page strings 2022-03-04 13:07:11 -05:00
McMatts
4ab48cc67d i18n admin strings 2022-03-03 19:42:37 -05:00
McMatts
53297f7627 i18n admin strings 2022-03-03 19:10:06 -05:00
McMatts
4ed2b3902c JS build tweaks 2022-03-03 18:21:16 -05:00
McMatts
6968581e5b i18n admin strings 2022-03-03 14:38:27 -05:00
McMatts
c09a116e56 i18n admin strings 2022-03-03 14:03:48 -05:00
McMatts
7cf672646a i18n admin strings 2022-03-02 20:52:59 -05:00
McMatts
29447a2784 i18n admin strings 2022-03-02 20:30:39 -05:00
McMatts
479d03ba70 i18n admin sections 2022-03-02 19:55:52 -05:00
McMatts
a7dac6911c i18n strings 2022-03-01 22:59:56 -05:00
McMatts
08f21346c1 [WIP] i18n constant strings 2022-03-01 22:40:51 -05:00
McMatts
ce4f62d346 [WIP] i18n strings 2022-03-01 22:03:18 -05:00
McMatts
8a25509019 Implement basic i18n client-side foundation 2022-03-01 20:01:06 -05:00
McMatts
59c929d251 New logo 2022-03-01 20:00:33 -05:00
McMatts
245c538990 Initial i18n experiment 2022-03-01 16:22:53 -05:00
HarveyKandola
32a9528e6d Update README.md 2022-02-27 12:48:26 -05:00
HarveyKandola
a15f0c8eb6 Update README.md 2022-02-27 12:48:04 -05:00
HarveyKandola
eb9fbd25b9 Update README.md 2022-02-27 12:47:09 -05:00
Harvey Kandola
dbef758035
Merge pull request #381 from typkrft/master
Updated URL
2022-02-17 11:07:03 -05:00
Brandon
dea25a2b85
Updated URL
The current URL doesn't point to the actual download.
2022-02-17 10:59:25 -05:00
HarveyKandola
fcf38d8af9 Change downloads asset location 2022-02-14 14:23:10 -05:00
HarveyKandola
ce93a5e623 v4.2.2 2022-02-08 18:48:30 -05:00
HarveyKandola
8df1cc73b0 Update license-key.hbs 2022-02-08 18:31:37 -05:00
HarveyKandola
53ec7c9274 Update README.md 2022-01-12 14:15:56 -05:00
HarveyKandola
cfe85248ce Update screenshot 2022-01-12 14:15:11 -05:00
HarveyKandola
30c31a1ba7 Merge branch 'master' of https://github.com/documize/community 2022-01-12 14:13:18 -05:00
HarveyKandola
a97b6b22d9 Skip LDAP user creation if not sync'ed 2022-01-12 14:12:51 -05:00
Harvey Kandola
e985c5f808
Update README.md 2022-01-11 21:27:18 -05:00
HarveyKandola
4b89f3b1c2 Release 4.2.0 2022-01-11 21:20:01 -05:00
HarveyKandola
707dc1e052 Increase category name size 2022-01-11 13:52:41 -05:00
HarveyKandola
88211739f0 Bump deps 2022-01-11 13:52:30 -05:00
HarveyKandola
6b3cdb5033 Support for ARIA 2022-01-11 12:40:52 -05:00
HarveyKandola
45f216b8a1 Improved tooltip rendering speed 2022-01-10 17:14:08 -05:00
HarveyKandola
c31c130ffd Remove Ember Attacher add-on 2022-01-10 17:01:54 -05:00
HarveyKandola
5d5e212a6b FreeBSD builds 2021-11-19 08:34:19 -05:00
HarveyKandola
8fa5569ae5 Implement more re-branding updates 2021-11-15 14:52:29 -05:00
HarveyKandola
8976bf817b Update README 2021-11-10 19:31:03 -05:00
HarveyKandola
0c3fed2b18 Prep re-branding 2021-11-03 11:46:20 -04:00
HarveyKandola
60dfb54d54 Allow logger.Info multiple args 2021-10-07 14:16:05 -04:00
Harvey Kandola
c6863201b3
Merge pull request #380 from nemunaire/f/dockerfile 2021-09-22 10:31:34 -04:00
Pierre-Olivier Mercier
45567e274a Modernize Dockerfile 2021-09-21 22:14:30 +02:00
HarveyKandola
dff4c6929b Update README.md 2021-09-09 12:29:38 -04:00
HarveyKandola
eea8db9288 Fingerprint during Ember build 2021-09-07 20:18:30 -04:00
HarveyKandola
e19c4ad18a Update build.bat 2021-09-07 11:32:22 -04:00
HarveyKandola
989b7cd62c Sync with Community 2021-08-19 13:02:56 -04:00
HarveyKandola
df8f650319 Support VB.NET for code syntax highlighting 2021-08-18 19:41:19 -04:00
HarveyKandola
565a063231 Tweaked document list rendering of tooltips 2021-08-18 19:40:57 -04:00
HarveyKandola
cb46f34503 Update PDF dep 2021-08-18 19:40:12 -04:00
HarveyKandola
470e2d3ecf Move over to Go embed directive 2021-08-18 19:39:51 -04:00
HarveyKandola
cddba799f8 Update Ember deps 2021-08-18 19:39:14 -04:00
HarveyKandola
05df22ed4a Update go deps 2021-08-18 19:38:43 -04:00
HarveyKandola
a5dfa6ee39 Merge branch 'master' of https://github.com/documize/community 2021-03-28 16:03:51 -04:00
HarveyKandola
780ce2df61 Bump 3.9.0 release 2021-03-28 16:03:47 -04:00
Harvey Kandola
9f28e1bff2
Merge pull request #379 from esquith/patch-1
Update README.md
2021-03-28 21:02:53 +01:00
Esquith Allen
8ae94295a2
Update README.md 2021-03-28 16:00:39 -04:00
HarveyKandola
adb7b4d7bf Enforce TLS 1.2 minimum 2021-03-16 13:58:27 -04:00
HarveyKandola
66fcb77d8b Improve user management 2020-11-29 20:31:20 -05:00
Harvey Kandola
972413110f
Merge pull request #377 from Ma27/preview-button-toggle
gui/editors: toggle Preview/Edit button
2020-11-12 18:57:42 +00:00
Harvey Kandola
a0a166136e
Merge pull request #378 from Ma27/markdown-bulletpoints-margin
document/wysiwig: no margin for sublists
2020-11-12 18:54:17 +00:00
HarveyKandola
30d12ba756 Updated Draw.io integration 2020-11-09 11:01:09 -05:00
Maximilian Bosch
06bf9efcfc
document/wysiwig: no margin for sublists
When having a list with sublists in a `markdown` section like this

  * top-level
  * another one
    * sub-elem 1
    * sub-elem 2

then documize will create a margin of 15px before and after the sublist
which is rather unintuitive as this will create the wrong impression
that these bullet-points have no relation to the parent one even though
this is the most common semantic reason for sublists.

This patch removes the margin at the top and bottom for those kinds of
sublists.
2020-10-31 21:47:23 +01:00
Maximilian Bosch
9ed8f79315
gui/editors: toggle Preview/Edit button
When hitting "Preview" on a previewable section (e.g. one with
markdown), the tooltip and icon of the preview-button still show
"Preview". With this change, both the text and the button will be
switched accordingly.
2020-10-31 21:18:20 +01:00
Maximilian Bosch
73e8c7a278
docker-compose: explicitly pin postgres container to v12 2020-10-31 21:18:04 +01:00
Harvey Kandola
806efd7eac
Merge pull request #376 from AntonLydike/master
Fixed and updated Dockerfile
2020-08-23 15:14:57 +01:00
Anton Lydike
724f3c88b3 fixed and updated dockerfile 2020-08-21 15:42:10 +02:00
Harvey Kandola
4a7d915ebb
Merge pull request #375 from dimoonster/master
Proxy support when communicate with plantuml
2020-08-17 16:09:51 +01:00
Di_Moon
c7413da943 add proxy support when communicate with plantuml (remove spaces) 2020-08-14 11:56:27 +03:00
Di_Moon
4e0218f5ea add proxy support when communicate with plantuml 2020-08-14 11:54:30 +03:00
HarveyKandola
4fe022aa0c Database and LDAP upgrades
Bumped underlying dependencies affecting database and LDAP connectivity.

Bumped to Go v1.14.3 and released v3.8.0.
2020-05-21 12:32:46 +01:00
Harvey Kandola
aaa8c3282d
Update README.md 2020-03-09 12:37:13 +00:00
Harvey Kandola
5e022dd0b8
Update README.md 2020-03-09 12:30:37 +00:00
Harvey Kandola
bbca180298
Clarify support options 2020-03-09 12:30:16 +00:00
HarveyKandola
cdc7489659 Update Go modules/vendor directory
Closes #368
2020-02-15 15:42:54 +00:00
HarveyKandola
ab95fcc64d Prep 3.7.0 release
Awesome work @sauls8t !!
2020-02-04 14:43:47 +00:00
sauls8t
9bee58057e Add new pin related audit types 2020-02-04 14:37:02 +00:00
sauls8t
bda9719ecb Handle non-pinned spaces 2020-02-04 14:36:40 +00:00
sauls8t
fbd4b17c15 Record all doc pin related user actions 2020-02-04 14:36:11 +00:00
sauls8t
c689379f92 Restrict pin sequence changing
Only all documents filter enables the up/down pin sequence change clickers.
2020-02-04 12:37:59 +00:00
HarveyKandola
d1774b42bd Allow for clickable links in space description
Closes #361
2020-02-04 12:28:57 +00:00
sauls8t
8ac35a6b74 Routes for new pinned documents 2020-02-03 21:01:25 +00:00
sauls8t
813f270a9d Update schema for new pinned documents 2020-02-03 21:01:11 +00:00
sauls8t
e014f5b5c1 Pinned documents
Closes #278

Pin documents to the top of each space.
2020-02-03 21:00:35 +00:00
sauls8t
2b66d0096a MariaDB restore process compatibility 2020-02-03 20:58:25 +00:00
sauls8t
50f47f61a5 Rename folder/space for all space export 2020-02-03 20:57:36 +00:00
sauls8t
d26ecdc12f Prep 3.6.0 release 2019-12-14 13:13:47 +00:00
sauls8t
1a89201bd9 Provide generic IFrame section for documents
Closes #352
2019-12-09 12:31:44 +00:00
sauls8t
accf0a2c63 Use latest PlantUML lib and render as SVG
Closes #349 and #350
2019-12-09 10:54:02 +00:00
HarveyKandola
cafa3ceed0 Build prep 3.5.2 2019-12-06 18:02:00 +00:00
HarveyKandola
2b3e9dfbc9 Stop TinyMCE dialogs from scrolling background 2019-12-06 15:11:16 +00:00
HarveyKandola
1c1ebee15a Upgrade TinyMCE to 5.1.3 2019-12-06 15:10:50 +00:00
HarveyKandola
6ba4ca9c16 Fix scroll-to-section regression
Fixes #344
2019-12-06 11:09:02 +00:00
HarveyKandola
5aaa9f874d Hide PlantUML sample diagrams when you have content
Closes #346
2019-12-06 10:13:15 +00:00
sauls8t
51a25adbdb v3.5.1 2019-11-30 10:31:09 +00:00
Harvey Kandola
9d025c3f71
Update README.md 2019-11-19 18:11:49 +00:00
sauls8t
a4384210d4 Sanitize HTML in Markdown sections 2019-11-19 11:47:51 +00:00
HarveyKandola
6882491201 Build prep 2019-11-15 18:21:56 +00:00
HarveyKandola
d4edcb8b2c Show default category indicator to admins
Fixes #339
2019-11-15 16:38:56 +00:00
HarveyKandola
f117e91bcb Specify default categories for new documents
Closes #339

All new documents will be assigned default categories.

Documents created from templates that already have categories take precedence.
2019-11-15 14:51:52 +00:00
HarveyKandola
5c1ad25dc9 Allow rich rext for Site Message and Space Desc
Closes #291

Style both site-wide message and per space descriptions using the fully-featured rich text editor.
2019-11-15 12:41:08 +00:00
HarveyKandola
8970a21b58 Fix regression for downloading certain binary attachments 2019-11-14 17:38:53 +00:00
McMatts
0e6f2f1f5e Allow non space creators to manage space settings
Fixes #337
2019-11-13 09:49:19 +00:00
McMatts
7fc74be7cd Merge branch 'master' of https://github.com/documize/community 2019-11-08 14:55:32 +00:00
McMatts
faeadb2bbb Update embeded assets 2019-11-08 14:55:27 +00:00
McMatts
be50bf9f14
Update README.md 2019-11-08 14:54:33 +00:00
McMatts
60ef205948 Improve jump-to-section scrolling 2019-11-08 12:45:22 +00:00
McMatts
7ae801554d Bump version 2019-11-08 12:44:57 +00:00
McMatts
441efd42e9 Prevent edits to locked docs/sections 2019-11-08 12:44:41 +00:00
McMatts
a19ba46f7a Add http scheme for copied links 2019-11-08 11:11:27 +00:00
sauls8t
ad361c22ba Write HTTP headers before body write 2019-11-08 10:40:10 +00:00
sauls8t
7954f4b976 3.4.1 release 2019-11-02 09:22:09 +00:00
sauls8t
2d105f2154 Better handling for document.update TX 2019-10-30 13:57:26 +00:00
sauls8t
811e239baf Support comma-escaped LDAP DN values 2019-10-30 13:57:07 +00:00
HarveyKandola
c7e71173ea SQL Server per doc activity report 2019-10-28 15:04:36 +00:00
HarveyKandola
8fa8a3657c Handle escaped comma in LDAP DN string
Closes #326
2019-10-28 15:03:53 +00:00
HarveyKandola
a64a219ce8 Remove obsolete anchor plugin 2019-10-26 16:55:54 +01:00
HarveyKandola
d7a484a936 3.4 embedded assets 2019-10-26 16:16:16 +01:00
HarveyKandola
017b19141c 3.4.0 build prep 2019-10-26 16:15:56 +01:00
McMatts
39f457e90e Upgrade TinyMCE to v5.1.0
Introduces new sticky toolbar option!
2019-10-21 10:54:01 +01:00
McMatts
30d3e6f82e Improve canEdit permissions for attachments 2019-10-21 10:34:34 +01:00
McMatts
8c2bed283f Sync edit checks across editions 2019-10-21 10:34:10 +01:00
McMatts
a3867c617a Bump version and embed assets 2019-10-21 10:33:51 +01:00
McMatts
28424e7e4b Change audit store to use own TX 2019-10-21 10:33:37 +01:00
HarveyKandola
7c70274f5e Add edit check to atatchments list view 2019-10-14 17:29:34 +01:00
HarveyKandola
ef5b5cdb32 Bump version to 3.3.2 2019-10-14 12:27:41 +01:00
HarveyKandola
ccd756aca0 Document PostgreSQL wildcard search syntax 2019-10-10 11:58:41 +01:00
HarveyKandola
444b89e425 Improve SMTP setting persistence
Should close #327 by providing better handling of non-english dialect(?).
2019-10-07 15:44:07 +01:00
HarveyKandola
3d0f17386b Bump released to v3.3.1 2019-09-26 16:51:05 +01:00
HarveyKandola
513fd9f994 Enable tag searching for SQL Server database 2019-09-24 16:44:28 +01:00
HarveyKandola
5cef58eeba Re-sync space counts when moving docs
Between spaces!
2019-09-24 14:07:44 +01:00
HarveyKandola
fad1de2e41 Overhaul the space stats module
Closes #274

All space counters are reset after document and catergory operations.
2019-09-24 13:39:57 +01:00
sauls8t
6b723568d3 Provide Bash/Shell code syntax in Rich Text Editor
Closes #322
2019-09-18 11:25:21 +01:00
sauls8t
00889f0e0e Build number refresh 2019-09-17 11:13:34 +01:00
sauls8t
6629d76453 Add covering indexes to support super-size deployments
Resolves issues for enterprise customers with tonnes of data in these SQL tables:

- dmz_doc
- dmz_section

Multi-tenant compliant.
2019-09-14 13:04:56 +01:00
sauls8t
74300b009b v3.3.0 release prep 2019-09-12 13:16:10 +01:00
sauls8t
5004e5a85e Enable Full-text Search when using SQL Server 2016+ 2019-09-11 19:08:53 +01:00
HarveyKandola
0524a0c74c Added link to Go modules migration guide 2019-09-06 11:12:42 +01:00
HarveyKandola
b826852137 Moved from Dep to Go Modules
We have finally dropped go dep and moved over to go mod !

During the move, some dependencies have been bumped.
2019-09-06 11:06:28 +01:00
HarveyKandola
2c164a135a Remove obsolete build flag 2019-09-05 10:37:40 +01:00
HarveyKandola
44febcc25c Provide Docker Compose file for quick app+db setup
Closes #311
2019-08-29 14:14:10 +01:00
HarveyKandola
66e11cefbc Bump version to 3.2.0 2019-08-28 13:41:52 +01:00
HarveyKandola
5e9eeb5bf9 Use Ember v3.12.0
Bumped JS dependencies where possible
2019-08-28 12:57:02 +01:00
HarveyKandola
5b7610d726 Update README 2019-08-28 12:27:38 +01:00
HarveyKandola
0419f3b7b3 Update Jira client library to latest release
Related to #308
2019-08-27 17:16:06 +01:00
HarveyKandola
5b72da037c Ensure only change approvers can change doc level attachments
Does not affect section level attachments
2019-08-27 16:17:38 +01:00
HarveyKandola
d14e8a3ff6 Delete package-lock.json 2019-08-27 15:33:18 +01:00
HarveyKandola
9a3d2c3c28 Fixed HTML for new auth settings 2019-08-27 15:25:10 +01:00
HarveyKandola
3b76e10ee0 Ensure doc protected from non-category viewers
Closes #310
2019-08-27 15:24:59 +01:00
Harvey Kandola
29d7307537
Merge pull request #306 from dereknex/auth-with-cas
Authentication with Central Authentication Service (CAS) such as https://www.apereo.org/projects/cas
2019-08-27 11:05:18 +01:00
HarveyKandola
96e5812fc0 Improve CAS documentation 2019-08-27 11:02:56 +01:00
HarveyKandola
c35eb16fc5 Merge branch 'auth-with-cas' of https://github.com/dereknex/community into pr/306 2019-08-27 10:59:42 +01:00
HarveyKandola
9dd78ca9be Fix typos 2019-08-27 10:59:40 +01:00
Derek Chen
891ba07db8 add run cas server section 2019-08-21 23:25:12 +08:00
sauls8t
2ee9a9ff46 Setting first/last name for all scenarios 2019-08-18 15:23:01 +01:00
Derek Chen
399c36611f update user firstname and lastname when login with CAS 2019-08-18 21:33:25 +08:00
Derek Chen
fbb73560c0 Get firstname and lastname from CAS attributes 2019-08-17 22:13:37 +08:00
Derek Chen
15e687841f Merge branch 'auth-with-cas' of github.com:dereknex/community into auth-with-cas 2019-08-16 22:24:51 +08:00
Derek Chen
0a10087160 fix got blank page when CAS auth failure 2019-08-16 22:17:52 +08:00
Derek Chen
9d0d4a7861 fix got blank page when CAS auth failure 2019-08-16 22:00:55 +08:00
sauls8t
fc60a5917e Allow user sync when dual auth mode
LDAP sync can be executed if dual mode authentication is enabled.
2019-08-16 10:37:58 +01:00
sauls8t
285a01508b LDAP fix for dual mode 2019-08-15 17:28:45 +01:00
sauls8t
4f248bf018 Linting 2019-08-15 17:15:39 +01:00
sauls8t
32dbab826d Bumped database driver dependencies
Latest used for MySQL, SQL Server and PostgreSQL
2019-08-15 14:51:40 +01:00
sauls8t
b6e1543b7f Merge branch 'master' of https://github.com/documize/community 2019-08-15 13:57:00 +01:00
Harvey Kandola
f8bb879a70
Merge pull request #307 from dereknex/docker-build
Build Documize with docker
2019-08-15 13:54:53 +01:00
sauls8t
20366e6776 Fix typo 2019-08-15 13:54:26 +01:00
Derek Chen
ffacf17c5f update bindata.go 2019-08-14 17:39:41 +08:00
Chen Chong
bfe4c5d768 Update Dockerfile 2019-08-14 09:07:57 +00:00
Derek Chen
0f3a618140
Update Dockerfile
fix docker build miss 'gcc' error
2019-08-14 16:54:52 +08:00
Derek Chen
826f6d96a6 fix docker build miss gcc issue 2019-08-14 16:51:55 +08:00
苗超
6a9fa0140a Update Dockerfile 2019-08-14 08:38:47 +00:00
Derek Chen
24619c6a58 fix merge error 2019-08-14 11:48:59 +08:00
Derek Chen
ebc8214049 Merge branch 'docker-build' into auth-with-cas 2019-08-14 11:39:16 +08:00
Derek Chen
71c1def5c7 add Dockerfile 2019-08-14 11:36:41 +08:00
Derek Chen
fded0014a3 Merge branch 'master' into auth-with-cas 2019-08-13 22:32:40 +08:00
Derek Chen
041091504f fix lost auth token issue when refresh page 2019-08-13 22:10:08 +08:00
Derek Chen
8c2df6178d auth with cas 2019-08-09 13:44:03 +08:00
sauls8t
02d478c6dd Latest embedded assets 2019-08-07 17:21:39 -04:00
Derek Chen
8c99977fc9 working on forentend 2019-08-08 00:40:03 +08:00
sauls8t
9d6b6fec23 Bump version to 3.1.2 2019-08-05 13:54:25 -04:00
sauls8t
4e0e3b5101 Upgrade Markdown preview dependency
v9.0.1
2019-08-05 13:35:26 -04:00
sauls8t
e219c97a6b Enbale browser context menu for TinyMCE 2019-08-05 13:29:08 -04:00
sauls8t
7485f2cef7 Upgrade TinyMCE to v5.0.12 2019-08-05 13:28:48 -04:00
sauls8t
627195aae7 Clarify permissions explanation 2019-08-05 13:06:35 -04:00
Harvey Kandola
f39be2a594
Merge pull request #302 from Ma27/markdown-html-preview
Render HTML in Markdown during previews as well
2019-08-04 13:20:46 -04:00
Maximilian Bosch
444b4fd1f7
Render HTML in Markdown during previews as well
When having e.g. a markdown-based section in a document where you
reference another document, a HTML-link is generated. However when
previewing changes, the raw HTML is shown.

With setting `html: true` in the configuration for `markdownit`[1],
HTML is detected and properly parsed (Also markup tags such as `<h1>`
are rendered properly just like when using `blackfriday` to request a rendered
section).

Regarding probably harmful side-effects: setting e.g. `<style>* { display:
none !important; }</style>` causes a white page with `markdownit` as
well as with `blackfriday`. `<script>` tags aren't affected since
`handlebars` mostly breaks with `<script>` tags within variables that
are substituted using `{{{var}}}` into the DOM[3].

Please note that I didn't commit the modifications in `embed/bindata.go`
as it seemed to me after looking at the history that those updates are
only done when preparing a release.

[1] 1ad3aec204/lib/presets/default.js (L6-L9)
[2] https://github.com/documize/blackfriday/blob/master/markdown.go#L105-L146
[3] https://github.com/wycats/handlebars.js/issues/531
2019-08-01 21:02:35 +02:00
sauls8t
b31f330c41 Fixed SQL Server JSON support
Closes #298
2019-07-18 10:14:41 -04:00
sauls8t
69077ce419 Provider sample data for Cloud onboarding 2019-06-29 15:37:49 +01:00
sauls8t
201d2a339c Prep v3.1.0 build 2019-06-25 17:52:03 +01:00
sauls8t
326019d655 Add padding for section headings in export view 2019-06-25 17:25:00 +01:00
sauls8t
264c25cfe0 Prevent space user invitation for non-Documize auth providers
If running LDAP or Keycloak authentication, you cannot bypass user sync process to invite new users.

Closes #284
2019-06-25 17:05:25 +01:00
sauls8t
595301db64 Replace UPLOAD with + for attachments action 2019-06-25 16:53:43 +01:00
sauls8t
d6432afdad Sort labels by name
DB layer sorts, UI just receives and displays as-is.
2019-06-25 16:52:31 +01:00
HarveyKandola
9c36241b58 Update SQL Server driver library 2019-06-25 15:37:19 +01:00
HarveyKandola
c538fc9eb1 Update PostgreSQL driver library 2019-06-25 15:33:51 +01:00
HarveyKandola
f3df43efe0 Updated Go MySQL driver library 2019-06-25 15:26:53 +01:00
HarveyKandola
d04becc1a3 Improved backup/restore compatibility between DB providers 2019-06-25 15:26:38 +01:00
HarveyKandola
3621e2fb79 Install helps docs as part of onboarding process
Our own docs are installed as sample data!

Refactored search reindexing code.
2019-06-24 17:01:56 +01:00
HarveyKandola
411f64c359 Typo 2019-06-20 15:28:34 +01:00
HarveyKandola
ae923e7df1 Make tooltips use theme skin 2019-06-20 15:28:23 +01:00
HarveyKandola
bfe5262cb5 Streamlined add router methods 2019-06-20 15:27:09 +01:00
sauls8t
80f0876b51 Show admins incomplete config indicator
SMTP checks to start with.
2019-06-19 13:39:36 +01:00
sauls8t
b2cd375936 Increase border radius for UI card elements 2019-06-19 12:48:18 +01:00
sauls8t
243a170071 Fixed SQL syntax for SQL Server
Affected User Group admin
2019-06-19 12:47:47 +01:00
sauls8t
fb3f2cc24b Send product edition meta to setup wizard 2019-06-19 12:47:18 +01:00
sauls8t
946c433018 Detect first-time login event 2019-06-19 12:46:46 +01:00
sauls8t
4d2f30711c Accept activation key during setup process
Enterprise edition only.
2019-06-19 12:46:05 +01:00
HarveyKandola
887c999a1e Bumped Go compilation to v1.12.6 2019-06-14 15:16:28 +01:00
HarveyKandola
b256bf2e9d Move product assets to AWS S3
Moving from Google Cloud bucket to AWS S3 bucket.
2019-06-12 18:17:05 +01:00
Harvey Kandola
8f4cd755de
Merge pull request #282 from documize/core-0619
The all new v3 is here sporting a new layout, better theming, quick-jump to spaces and content, tonnes of document view improvements, comment replies, expand/collapse doc views and much more.
2019-06-12 14:19:12 +01:00
HarveyKandola
64612b825a Include new comment fields in backup/restore process
c_sectionid
c_replyto
2019-06-12 13:52:30 +01:00
HarveyKandola
216866a953 Shrink doc meta font size 2019-06-12 08:44:37 +01:00
HarveyKandola
14820df165 Move doc headings above doc meta 2019-06-11 18:03:28 +01:00
sauls8t
f7a738ad84 v3 build prep 2019-06-11 11:41:09 +01:00
sauls8t
df2775f8a4 Remove confusing dick handlers from document meta zone 2019-06-11 10:38:57 +01:00
sauls8t
a710839f69 Tidy up draft permission handling
Removes inconsistency of approvals vs. lifecycle.
2019-06-11 10:38:39 +01:00
sauls8t
2a45c82b46 Remove redundant logging 2019-06-11 10:37:49 +01:00
sauls8t
7eec01811a Add “Reply” to constants 2019-06-10 15:47:13 +01:00
sauls8t
ef5e4db298 Link comments doc sections + threaded replies
Allow for comments to be related to doc sections.

Enable one-level replies to comments.

closes #240
2019-06-07 19:44:06 +01:00
sauls8t
b1cb0ed155 Make section publish modal focus on first input 2019-06-06 18:29:38 +01:00
sauls8t
78fd14b3d3 Fix indentation 2019-06-06 18:17:03 +01:00
sauls8t
82ddcc057d Make copy/move process use dropdowns for selection
We currently use keyword searching to find target documents.

Replace this with space and document list dropdown for quicker and easier target document selection.
2019-06-06 17:58:48 +01:00
sauls8t
a90c5834fa Improve move/copy/merge sections between documents
Processx all child sections during copy/move/merge operation.

Ensure links work as expected within newly copied/moved content.

Index copied/moved content for searching.

fixes #138
fixes #248
2019-06-06 16:17:36 +01:00
sauls8t
ec8d5c78e2 Provide copy document option
Duplicates entire document tree into a new document (same space).
2019-06-06 11:45:41 +01:00
HarveyKandola
b75969ae90 Use app-meta service to construct section link 2019-06-05 12:56:02 +01:00
HarveyKandola
9b82f42cc1 Copy link to section to clipboard
Closes #174
2019-06-05 12:52:15 +01:00
HarveyKandola
b8fee6b962 Indent doc sections as per hierarchy
Reflect doc structure by indenting sections as you read the document.

Fixes #281.
2019-06-05 11:41:43 +01:00
HarveyKandola
8baad7e2f0 Enable doc section expand/collapse
Closes #170
2019-06-05 11:09:24 +01:00
HarveyKandola
99a5418dba Only show space dropdown when label has 2+ spaces 2019-06-03 17:00:32 +01:00
HarveyKandola
acd3dd63b5 Fix typo 2019-06-03 17:00:06 +01:00
HarveyKandola
96872990f9 Update export process CSS
This will ensure new styles are reflected during export process.
2019-06-03 12:21:18 +01:00
McMatts
c59a467cdb Print selected sections
Close #146
2019-05-31 19:41:34 +01:00
McMatts
715c31a1da Fix Ember lint issues and print view 2019-05-31 11:48:16 +01:00
McMatts
40237344e2 Show doc created/revised dates
Fixes #229
2019-05-30 15:10:28 +01:00
McMatts
91a3c59cd2 Remove redundant comment/feedback feature
Enterprise edition contains the feedbacl/comment feature and Community edition should not show this.

Closes #272
2019-05-30 10:41:09 +01:00
McMatts
fe7548cd97 Change position of doc attachments 2019-05-29 16:57:22 +01:00
McMatts
ca4a9a74ee Sync doc meta layout with Enterprise edition 2019-05-29 14:58:00 +01:00
McMatts
1e1cbdd843 Reduce space between doc sections
Fixes #253
2019-05-29 14:36:37 +01:00
McMatts
c8b82c85fe Sync doc meta style with Enterprise edition 2019-05-29 14:31:10 +01:00
McMatts
bae7909801 Sync with Enterprise edition changes 2019-05-29 12:49:20 +01:00
McMatts
c870547fa1 Move doc meta fields out of sidebar 2019-05-29 11:09:19 +01:00
McMatts
c0876e7be8 Allow for scrollable doc TOC + scroll to top + wrap section names
Closes #254
2019-05-28 16:12:25 +01:00
McMatts
cd9f681adf Resolve Code section type syntax load bug
For certain syntax types CodeMirror was missing required logic.

Fixes #276
2019-05-28 15:48:16 +01:00
McMatts
0240f98eb0 Add scroll to top option for document view
Closes #175
2019-05-28 14:08:19 +01:00
McMatts
c49707d160 Make popups close on doble-click + quote @size attrs
1. Popups should close on subsequent trigger clicks
2. @attrs should be quoted as oper linter warnings.
2019-05-28 10:59:48 +01:00
McMatts
c65eb97948 Show jump list to other space documents
Closes #219

Jump to documents within space when viewing a document.
2019-05-24 15:08:54 +01:00
McMatts
bc9dab72f2 Show quick list and jump to other spaces with same label
Closes #275
2019-05-24 13:45:01 +01:00
McMatts
6ae9414361 Complete UI refactoring to new nav and toolbar UX
Compact design!
2019-05-24 12:30:31 +01:00
McMatts
e37782e5b7 Fix edge case for attachments download auth checks
Edit permissions no longer interfere with download checks.
2019-05-24 12:29:46 +01:00
Harvey Kandola
2bbeaf91a0 Implement dropdown menu for document toolbar 2019-05-22 06:35:54 +01:00
Harvey Kandola
de273a38ed New toolbar styling and layout controls
Built to work with forthcoming feature set that requires display of more options.
2019-05-21 17:05:57 +01:00
Harvey Kandola
08794f8d5f Migrate views to new master layout 2019-05-20 17:40:57 +01:00
Harvey Kandola
14f313a836 Make Login action more prominent
Closes #247
2019-05-20 15:21:33 +01:00
Harvey Kandola
62c3cd03ad [WIP] Improve master layout for different devices + product growth
We have two pressing needs:

1. Improve experience on real estate challenged devices.
2. Make room for product feature-set growth.

To hit these targets, we need to develop better UX through smarter on-screen space management.
2019-05-20 10:39:48 +01:00
McMatts
bce1c1b166
Update README.md 2019-05-17 11:36:53 +01:00
Harvey Kandola
758bf07272 Bump version 2019-05-16 13:21:04 +01:00
Harvey Kandola
479508e436 Upgrade UI framework to Ember v3.10.0 2019-05-16 12:49:27 +01:00
Harvey Kandola
49bf4eeaa0 Update .gitignore 2019-05-16 12:48:46 +01:00
Harvey Kandola
1c45aef461 Fix TinyMCE toolbar 2019-05-16 11:14:34 +01:00
Harvey Kandola
a988bc0c3c
Update README.md 2019-05-15 16:50:51 +01:00
Harvey Kandola
91ec2f89d8 Compile for ARM and ARM64 (Raspberry Pi)
Closes #267 so folks can run Documize on the Pi.
2019-05-15 16:45:26 +01:00
McMatts
2477c36f11
Merge pull request #266 from documize/core-0519
Upgrade rich text editor, dual LDAP/forms authentication
2019-05-14 14:54:35 +01:00
McMatts
e2a3962092 Remove double screen blink after logout 2019-05-14 14:52:36 +01:00
McMatts
8ecbb9cdee Bump version 2.5.0 2019-05-14 14:52:11 +01:00
McMatts
f738077f5a Remove rogue log output 2019-05-14 14:51:58 +01:00
Harvey Kandola
f17de58fff Improve hyperlink color
Closes #261

Still more work to do, but an improvement nonetheless.
2019-05-14 11:28:19 +01:00
Harvey Kandola
40a0d77f93 Remove unecessary TRIM() from SQL queries
Should resolve #265
2019-05-14 09:38:26 +01:00
Harvey Kandola
072ca0dfed Ensure user admin works for new dual login mode 2019-05-13 16:50:20 +01:00
Harvey Kandola
b054addb9c Support dual login via LDAP and forms authentication
Closes #256 as we now support dual login -- LDAP and forms authentication.

Also bumped the vendored library to LDAP.v3 as it contains bug fixes.
2019-05-13 16:14:11 +01:00
Harvey Kandola
e59e1f060a
Update README.md 2019-05-13 15:58:30 +01:00
sauls8t
faf9a555d2 Upgrade to Tiny editor v5 2019-05-13 12:47:38 +01:00
sauls8t
8ab3cbe7e8 Support any name database
Closes #264
2019-05-10 16:38:19 +01:00
Saul S
86d25b2191
Update README.md 2019-04-29 13:37:00 +01:00
Saul S
9a53958c8f
Merge pull request #258 from documize/startup-config
Support for documize.conf files
2019-04-29 13:36:34 +01:00
sauls8t
b971c52469 Rebind dropzone elements for section attachments 2019-04-29 13:34:38 +01:00
sauls8t
34d1639899 Look for implicit documize.conf
@harveykandola

Now looks for implicit documize.conf, then specified .conf, then fallback to flags and envars.
2019-04-28 14:54:48 +01:00
sauls8t
1fefdaec9f Add comments 2019-04-27 17:11:58 +01:00
sauls8t
8f1bc8ce1f Specify runtime parameters in TOML format config file
In addition to specifying parameters in the command line and environment variables, you can now omit all parameters and provide a config file.

Example:

./documize myconfig.conf

Note: there is no switch setting, just provide the filename as an argument.

Fixes #243
2019-04-27 16:59:10 +01:00
sauls8t
d151555597 Update .gitignore to exclude .conf files
These are .toml format files
2019-04-26 19:54:31 +01:00
Harvey Kandola
4255291223 Merge branch 'master' of https://github.com/documize/community 2019-04-26 16:18:53 +01:00
Harvey Kandola
86a4e82c12 Reduce meta endpoint logging 2019-04-26 16:18:50 +01:00
Harvey Kandola
daa9e08ab4
Update README.md 2019-04-26 14:30:36 +01:00
Harvey Kandola
c666e68c2b v2.4.1 prep 2019-04-26 12:21:04 +01:00
Harvey Kandola
e6e3ed71ac
Merge pull request #250 from siepkes/postgresql_postgis_fix
Ignore PostGIS when determining if PostgreSQL is empty
2019-04-23 16:30:51 +01:00
Jasper Siepkes
89a28ad22f
Ignore PostGIS when determining if PostgreSQL is empty
If the PostGIS extension is installed in PostgreSQL the
'spatial_ref_sys' will automatically have been installed in the public
schema. Documize would see this table and incorrectly assume it
shouldn't enter setup mode.
2019-04-23 17:07:09 +02:00
Harvey Kandola
8e4ad6422b Ensure Backup/Restore process section attachments
New DB column c_sectionid means something new to backup and restore.
2019-04-21 11:53:48 +01:00
Harvey Kandola
4de83beba4 Update build process to include PDFJS 2019-04-19 15:09:12 +01:00
Harvey Kandola
10c57a0ae1
Merge pull request #249 from documize/section-pdf-files
PDF section type + section level attachments
2019-04-19 13:48:59 +01:00
Harvey Kandola
728789195c PDF section type build prep
Closes #207 -- view PDF's with new PDF section type.
2019-04-19 13:18:31 +01:00
Harvey Kandola
b5cd378302 Complete PDF section type 2019-04-19 11:30:40 +01:00
Harvey Kandola
7fde947a52 Enable PDF section editor 2019-04-18 15:42:18 +01:00
Harvey Kandola
61d0086337 Provide per section attachments
Upload and delete attachments on a per section basis.
2019-04-18 13:31:48 +01:00
Harvey Kandola
166aeba09b [WIP] PDF viewer section & per section attachments 2019-04-17 17:13:18 +01:00
Harvey Kandola
c0ed3c3d04 Bump version 2019-04-16 13:10:44 +01:00
Harvey Kandola
ab5314d5e1 Remove cursor from dropdown menu header 2019-04-16 12:53:35 +01:00
Harvey Kandola
51a0e1127e Add spam control basics 2019-04-16 12:53:22 +01:00
Harvey Kandola
e10d04d22e Exclude draft versions from non-lifecycle users
Only show draft documents to those with lifecycle permissions.

Closes #242
2019-04-15 13:23:41 +01:00
sauls8t
2fffb7869e Bump version 2019-04-13 17:23:37 +01:00
sauls8t
82ed36478b Show if search result is template
Helps to distinguish between docs and templates when listing search results.
2019-04-11 15:49:58 +01:00
sauls8t
1da49974cb Improve reverse proxy support
Should address edge cases and close #224 -- subject to field testing.

Does require the NGINX deployments use the following:

proxy_pass <http://documize-url:5001>;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
2019-04-11 14:45:36 +01:00
sauls8t
9e3eac19aa Allow doc/section/files links to open in tabs
Closes #233 and might help #236
2019-04-10 20:03:34 +01:00
Saul S
92696c5181
Include SQL Server 2019-04-09 15:31:29 +01:00
Saul S
eecf316d50
Merge pull request #238 from documize/mssqlserver
Microsoft SQL Server 2016+ database support
2019-04-09 15:30:11 +01:00
Harvey Kandola
fa383a58ff Bump version and update NOTICES 2019-04-09 13:24:42 +01:00
Harvey Kandola
b5a5cfd697 Give missing account warning during password reset
The reset password process will tell the user if they do not have an account.
2019-04-09 13:24:27 +01:00
Harvey Kandola
2ddd7ada9b Make storage providers generate row limit clause 2019-04-04 12:08:57 +01:00
Harvey Kandola
8515a77403 Remove debug info from compiled binaries 2019-04-04 12:08:30 +01:00
Harvey Kandola
f8d97d2a56 Make backup/restore compat with SQL Server 2019-04-02 15:47:31 +01:00
Harvey Kandola
e98f7b9218 Enable searching for SQL Server storage provider 2019-04-02 15:30:42 +01:00
Harvey Kandola
a41f43c380 WIP SQL Server support 2019-04-01 20:08:57 +01:00
Harvey Kandola
64403c402b Make store SQL Server compatible 2019-04-01 12:02:23 +01:00
Harvey Kandola
9ec858286f Create tables
Script to create tables with correct data types in SQL Server 2016 and above.

Search table not included.
2019-03-29 16:42:49 +00:00
Harvey Kandola
80aab3ce99 SQL Server provider basics 2019-03-27 15:09:48 -04:00
Harvey Kandola
deb579d8ad Microsoft SQL Server driver and prep 2019-03-26 08:51:02 -04:00
Harvey Kandola
e6335dd58c Prep 2.2.1 release 2019-03-25 13:41:22 -04:00
Harvey Kandola
e1a8f8b724 Display third party notices in UI 2019-03-24 17:53:22 -04:00
Harvey Kandola
e1001bb11e Merge branch 'master' of https://github.com/documize/community 2019-03-24 17:18:26 -04:00
Harvey Kandola
dbee77df56 Add more 3rd party library references 2019-03-24 17:18:24 -04:00
Harvey Kandola
9c2bff0374
Update README.md 2019-03-21 11:37:16 +00:00
Harvey Kandola
651cbb1dfe Add NOTICES.md
Covers third party dependencies
2019-03-20 12:53:50 +00:00
Harvey Kandola
a98c3a0fe2 Use + CONTENT for consistency
Closes #228
2019-03-18 18:04:34 +00:00
Harvey Kandola
a08b583b22 Use monospace font for Markdown editor
Closes #227
2019-03-18 18:02:47 +00:00
McMatts
6738d2c9e1
Merge pull request #225 from documize/dev0319
v2.2.0 merge
2019-03-15 13:01:28 +00:00
Harvey Kandola
441001fffe Make code section font size REM based
In line with recent changes.
2019-03-15 12:57:58 +00:00
Harvey Kandola
a4e07fbf7f Release v2.2.0 prep 2019-03-13 17:48:53 +00:00
McMatts
9a41e82aa3 Provide view density switcher for spaces & space view
Closes #218
2019-03-13 15:17:15 +00:00
McMatts
b89a297c70 Fixed an issue with duplicate search results
Issue crept in during switch to lodash lib.
2019-03-13 15:15:43 +00:00
McMatts
ca1e281775 Decrease tooltip delay 2019-03-13 15:15:12 +00:00
McMatts
c5fc0f93e0 Improve click handling for navigaiton elements in sidebar 2019-03-13 11:43:14 +00:00
McMatts
217e8a3a29 Add animation for ember attacher popup components 2019-03-13 11:42:55 +00:00
McMatts
1854998c80 Add diagnostic output for attachment download 2019-03-13 11:42:32 +00:00
McMatts
f4a371357e Clear new section title input box
After inserting new section we clear the seciton title
2019-03-13 11:42:12 +00:00
McMatts
1d00f8ac6e Allow sorting of search results and space contents
Closes #187

Sort search results and space contents by Name, Created or Revised.
2019-03-13 11:40:36 +00:00
McMatts
0985dbf5b6 Improve doc table of contents font sizing 2019-03-08 15:51:36 +00:00
McMatts
b2fcad649e Set new sidebar color 2019-03-08 15:51:19 +00:00
McMatts
f062005946 Introduce transaction isolation customization
Search related indexing transactions requires better TX begin/commit.

New helpers provide TX isolation control.
2019-03-08 15:50:55 +00:00
McMatts
36d7136210 Add diagnostic message for LDAP auth 2019-03-08 15:45:46 +00:00
McMatts
0bfde82040 Move space label to main view from sidebar
Solves long-standing debate about removing meta from sidebar, and keeping sidebat for navigation/filtering.
2019-03-08 15:45:12 +00:00
McMatts
e6e5f75ee7 Set doc revised for when section events
Supports new space recency filters.
2019-03-08 15:43:17 +00:00
McMatts
eb9501014d Make WYSIWYG font size & line height to REM
End of pixels @harveykandola
2019-03-06 14:11:37 +00:00
Harvey Kandola
e35639502d
Update README.md 2019-03-05 12:34:39 +00:00
Harvey Kandola
3db4981181
Update README.md 2019-03-05 12:33:16 +00:00
Harvey Kandola
3206eb4176
Update README.md 2019-03-05 12:32:45 +00:00
Harvey Kandola
576e1beade
Update README.md 2019-03-05 12:31:36 +00:00
Harvey Kandola
54eefc5132
Update README.md 2019-03-05 12:30:59 +00:00
McMatts
fbb1e334f8 Bump version to 2.1.1 2019-03-04 20:49:14 +00:00
McMatts
bb73655327 Write to stderr when onboarding shared space fails 2019-03-04 19:00:15 +00:00
McMatts
8c2febd636 Fixed lodash conversion issue with _.rest to _.drop
Solves move down on table of contents
2019-03-04 18:59:44 +00:00
McMatts
395008d06d Allow hypen in tag names with Firefox
When keycodes are different across browsers. :|
2019-03-04 18:59:06 +00:00
Harvey Kandola
d009e4ed2a Make setup process use new isEmail helper 2019-03-03 18:03:48 +00:00
Harvey Kandola
54bf258c61 Bump version + bundle web assets 2019-03-03 16:00:25 +00:00
Harvey Kandola
8332e8a03d Send back saved label after edits 2019-03-03 15:59:13 +00:00
Harvey Kandola
a6f8be2928 revert back to ember-ajax 3.x series 2019-03-03 15:58:58 +00:00
Harvey Kandola
cbd9fddcfe Space out save button 2019-03-03 15:58:39 +00:00
Harvey Kandola
4013b5ca03 Fix typo for self-host subdomain help info 2019-03-03 15:58:28 +00:00
Harvey Kandola
24b1326c31 Remove un-needed success alerts 2019-03-03 15:58:03 +00:00
Harvey Kandola
566807bc14 Replaced underscore.js & is.js with lodash.js 2019-03-03 13:10:04 +00:00
Harvey Kandola
df8e843bf5 Enabled TLS 1.3 support
IE11 might have issues so we don't support IE11.
2019-03-01 17:15:15 +00:00
Harvey Kandola
4d0de69489 New release prep 2019-03-01 17:13:29 +00:00
Harvey Kandola
25c247e99b Introduce new Tabular editor with CSV import support
Closes #211 and #202

An all-new tabular editor has been added -- this replaces the previous tabular editor.

Better formatting options.

CSV data can also be imported straight into the table.
2019-03-01 14:28:18 +00:00
Harvey Kandola
ed99b0c9f3 JS linting 2019-03-01 14:25:32 +00:00
Harvey Kandola
8b0bb456d9 Format Blockquote
Fixes #217 for both Rich Text and Markdown section types.
2019-03-01 12:59:10 +00:00
Harvey Kandola
e438542cab Upgrade ember-ajax to v4.0.1
Was v3.1.0
2019-02-28 17:47:12 +00:00
Harvey Kandola
553c17181e Upgrade EmberJS to v3.8.0 2019-02-28 17:46:02 +00:00
Harvey Kandola
9b06ddecb5 Refactor content linking code flow
Fixed EmberJS deprecation warnings by removing usage of observers.

Fixed edge case bug for repeated content link insertion modal clicks.
2019-02-28 15:11:46 +00:00
Harvey Kandola
3fd1d793a3 Standardize text color for PRE & CODE blocks 2019-02-28 14:16:51 +00:00
Harvey Kandola
fc17ea5225 Standardize style of PRE & CODE blocks
For Markdown, styling was not consistent between inline blocks and full code blocks.

Fixes #203
2019-02-28 13:58:59 +00:00
Harvey Kandola
f47f09661f Improve search by tag for MySQL
Fixes #214

MySQL requires specific full text search queries.
2019-02-28 13:39:53 +00:00
Harvey Kandola
4b7d4cf872 Ensure non-negative space summary counts
Sometimes users direct manipulate database and so space level counts don't match.

We ensure that counts don't go negative.
2019-02-28 12:42:42 +00:00
Harvey Kandola
c108d0eb30 Handle wrap-around for add section popup 2019-02-28 12:32:22 +00:00
Harvey Kandola
1f5221ffa0 Add install docs link to setup wizard 2019-02-28 12:31:57 +00:00
Harvey Kandola
a888b12ad1 Make TinyMCE Prism integration use full CSS path 2019-02-28 12:31:28 +00:00
Harvey Kandola
2510972a83 Allow SMTP config to specify FQDN of sending server
/cc @backba
2019-02-28 12:31:02 +00:00
Harvey Kandola
560f786b8b Merge branch 'master' of https://github.com/documize/community 2019-02-27 14:50:43 +00:00
Harvey Kandola
af641b93f1 Show doc links on setup screen 2019-02-27 14:50:42 +00:00
Harvey Kandola
f4fa63359f
Update README.md 2019-02-27 13:58:18 +00:00
Harvey Kandola
f828583b49 Allow admins to set subdomain for their instance
Fixes #209

Admins can see and set subdomain for their instance.

Self-host customers only!
2019-02-27 13:49:59 +00:00
Harvey Kandola
af9bc25660 PlantUML to force UTF-8 encoding
Should Fix #213
2019-02-27 13:10:19 +00:00
Harvey Kandola
66003dac21 Logo fetching to match on domain mismatch
Fixes #209

Sometimes people use subdomain like docs.example.org but backend does not reflect the domain, e.g. dmz_org.c_domain is empty.

So we fall back to loading logo for empty c_domain value as well.
2019-02-26 11:55:08 +00:00
sauls8t
d4f6694933 Change links to use www.documize.com 2019-02-24 18:41:18 +00:00
sauls8t
27030a0dc2 Update README.md 2019-02-22 18:28:22 +00:00
sauls8t
43f515a1f9 README update 2019-02-22 16:47:26 +00:00
sauls8t
9aaea9492a Fix issue with backup/restore of space labels
Closed #206
2019-02-21 10:56:15 +00:00
sauls8t
ac84eaf85d Ensure sqlx.In is compatible with latest PostgreSQL
Bump version
2019-02-12 12:15:09 +00:00
Harvey Kandola
9504a8cf6c Stop search view from messing iwht browser history
Fixes #195

Browser back button functions as expected.

Will go live in v2.0.3.
2019-02-10 16:46:09 +00:00
Harvey Kandola
fbe353475c Change location of jsconfig.json editor file 2019-02-10 13:12:47 +00:00
Harvey Kandola
bbed3e5a08 Chaneg build number data type to string
Fixes #198
2019-02-10 13:12:17 +00:00
McMatts
9f4715a494 Bump version 2019-02-05 20:27:02 +00:00
McMatts
d8cb69b6c0 Better UX for custom logo upload
Resolves issue with phantom click.
2019-02-05 20:26:47 +00:00
McMatts
7f2d2c01a6 Improved MS Word document name extraction
Use document filename and not H1 title inside document.

Supports both Linux & MSFT.
2019-02-05 20:25:36 +00:00
McMatts
f3e66b73c1 Increase size of space icon column in DB
Fixes #194
2019-02-05 20:23:26 +00:00
Harvey Kandola
02ffaa5f99 Tweak document toolbar layout
Position is to the high and right.
2019-01-27 15:40:01 +00:00
Harvey Kandola
9219dd9296 Set default label color if user does not pick one 2019-01-26 20:02:03 +00:00
Harvey Kandola
5faf6bda9b Remove label associations when deleting a label 2019-01-26 20:01:35 +00:00
sauls8t
89a7496c7f Improved self-managed install wizard layout 2019-01-26 13:24:54 +00:00
sauls8t
c0c3ca18e2 Fixed an issue with non-admin Jira connector auth
Role check should be OR and not AND.
2019-01-24 16:57:23 +00:00
sauls8t
2e443de84e Update bindata.go 2019-01-24 16:56:53 +00:00
sauls8t
9b51d9990f Update to latest EmberJS v3.7.x 2019-01-24 15:28:14 +00:00
sauls8t
278572c49b Use transition.to for query params 2019-01-24 15:27:50 +00:00
sauls8t
1e217274c6 Correctly unsubscribe from JS event listeners 2019-01-24 15:27:21 +00:00
sauls8t
9fd002b5da Change location of add section at bottom of content 2019-01-24 13:51:55 +00:00
sauls8t
f5bdbb49d0 Bump version 2019-01-24 13:51:31 +00:00
sauls8t
c69020f1e6 Move add section into section toolbar 2019-01-23 15:46:27 +00:00
sauls8t
0707bdd3d6 Improve Jira integration layout 2019-01-23 15:46:11 +00:00
sauls8t
36634be6f5 Put back to space button in sidebar (doc view) 2019-01-23 15:45:47 +00:00
sauls8t
6c71a1f18d Provide options for UI buttons to expand to fill parent 2019-01-23 15:44:46 +00:00
sauls8t
6126d4dd5d Introduce additional UI label constants 2019-01-23 15:44:20 +00:00
Harvey Kandola
013d09dda4 Lint space toolbar 2019-01-21 09:06:01 +00:00
Harvey Kandola
c6632fec1d Merge branch 'master' of https://github.com/documize/community 2019-01-20 16:49:34 +00:00
Harvey Kandola
e8735ffc12 Fix issue with MS Edge not downloading export HTML file 2019-01-20 16:49:32 +00:00
Harvey Kandola
c5155da74b
Update README.md 2019-01-20 16:46:15 +00:00
Harvey Kandola
e737339090 Change Save as Template confirm button label 2019-01-20 14:14:36 +00:00
Harvey Kandola
4f63a32ab1
Link to live docs 2019-01-18 13:18:10 +00:00
Harvey Kandola
7cc0b9c9b8
Merge pull request #189 from documize/core-1118
Documize v2.0
2019-01-18 13:14:56 +00:00
Harvey Kandola
560d00322f Embed latest web app assets 2019-01-18 13:13:31 +00:00
Harvey Kandola
b6d9c54667 Improve attachment and link handling 2019-01-16 16:55:43 +00:00
Harvey Kandola
6c07d2e569 Clean up popup menu rendering 2019-01-15 20:16:09 +00:00
Harvey Kandola
924b707db0 Allow session service to hold secure viewing token 2019-01-15 20:15:53 +00:00
Harvey Kandola
3da4144c1b Set correct model for space clone options 2019-01-15 20:15:12 +00:00
Harvey Kandola
1ef209b74f Change attachment deletion confirmation from modal to popover 2019-01-15 20:14:32 +00:00
Harvey Kandola
d281621d90 Optimize space deletion process
Utilize multiple SQL transactions to close out the space deletion process.
2019-01-15 20:13:45 +00:00
Harvey Kandola
d05052a5b4 Improve display on vertically constrained screens
Changed media queries to invoke mobile-first rendering if screen vertical height is less than 650px.
2019-01-13 13:57:12 +00:00
Harvey Kandola
317e9cbcaa Make sidebar nav scroll vertically on height restricted displays 2019-01-13 11:59:13 +00:00
Harvey Kandola
2efd239d14 Improve responsive long content wrapping 2019-01-13 09:40:22 +00:00
Harvey Kandola
984aa854e5 Reduce empty space for anon users on doc view 2019-01-13 09:40:00 +00:00
Harvey Kandola
ca213ba5d1 Detect and hide empty doc toolbar 2019-01-13 09:39:42 +00:00
Harvey Kandola
c1d796e6bc Update export process with latest build assets
We embed CSS into self-contained HTML file.

This change updates the CSS.
2019-01-12 15:14:55 +00:00
Harvey Kandola
60fbdfda11 Improve new user share space onboarding process 2019-01-11 14:03:03 +00:00
Harvey Kandola
659eb99c0f Remove redundant logging dependency 2019-01-09 11:04:23 +00:00
Harvey Kandola
bc28b36627 Make Markdown editor use Ember input helper 2019-01-09 11:03:58 +00:00
Harvey Kandola
f73c2f13d4 Syntax highlight code snippets added via TinyMCE
Prism dependencies included.
2019-01-09 11:02:59 +00:00
Harvey Kandola
0ce10ae5a2 Back-port CSS changes to export process
Export process produces a self-enclosed HMTL file.

The new styles introduced in v2 need to be available to the export process, hence this commit.
2019-01-08 18:11:48 +00:00
Harvey Kandola
a1d5dcaed9 Tweak sidebar responsive CSS 2019-01-08 17:47:51 +00:00
Harvey Kandola
3beb47fd49 Bump version to 2.0.0 2019-01-08 17:47:26 +00:00
Harvey Kandola
aa0f76d3e2 Add material icons dep for Tabular section type
It's required so not much we can do about it.
2019-01-08 17:47:11 +00:00
Harvey Kandola
479a61a3ef Update CodeMirror dep to v5.42.2
Affects Code and Markdown section types
2019-01-08 14:48:23 +00:00
Harvey Kandola
c706edec47 Improve print and PDF rendering 2019-01-08 13:56:42 +00:00
Harvey Kandola
5467771542 Display category names in documents list (space view)
We pre-fetch category names and attach them to documents.
2019-01-08 12:43:25 +00:00
Harvey Kandola
1d4a20cdfe Optimize category SQL code
Removed redundant join condition -- should speed things up!
2019-01-08 12:42:32 +00:00
Harvey Kandola
1b268d42de Remove redundant asset-map add-on 2019-01-07 19:35:07 +00:00
Harvey Kandola
4ddbe59556 Implement simpler solution for dynamic theme loading 2019-01-07 19:26:08 +00:00
Harvey Kandola
a424bbfcae Round the corners for label color box! 2019-01-07 19:25:36 +00:00
Harvey Kandola
fb391d49a5 Change CSS ul/ol/li default styling
Should support custom bullet styles eminating from add-ons.
2019-01-07 14:44:58 +00:00
Harvey Kandola
9206e9aaa1 Improve Ember build process 2019-01-07 14:43:56 +00:00
McMatts
e6ddb1ec24 Upgrade TinyMCE dependency to v4.9.2 2019-01-07 14:42:43 +00:00
McMatts
0b94d55fb9 Improve checkbox UI element styling 2019-01-07 12:42:27 +00:00
McMatts
4d83f5efd7 Update readme with new v2 screenshot 2019-01-07 12:42:11 +00:00
McMatts
dd355958a2 Refactor custom & default logo logic 2019-01-07 12:41:55 +00:00
McMatts
90aa9710a6 Develop PostgreSQL migration scripts 2019-01-07 12:40:47 +00:00
McMatts
036f36ba1d Enable custom logo upload and rendering 2019-01-06 13:50:12 +00:00
McMatts
a211ba051a Per space label, icon, description
Labels introduce visual grouping and filtering of spaces.
2019-01-04 16:33:30 +00:00
McMatts
fe8068965c Improve Document Toolbar iconography 2018-12-27 17:45:04 +00:00
McMatts
5757b2d36e Apply changes backported from Enterprise edition 2018-12-26 18:13:00 +00:00
McMatts
3d0a3cecf9 On start, fail if invald database connection
Fixes #188 and #186
2018-12-23 16:07:44 +00:00
McMatts
eb56169fe5 Fix up post-Enterprise Edition merge 2018-12-23 16:06:15 +00:00
Harvey Kandola
6f495dd1c6 Make document meta fields click-to-edit 2018-12-21 18:03:35 +00:00
Harvey Kandola
b495041222 Hanel empty state for document meta fields 2018-12-21 17:39:09 +00:00
Harvey Kandola
92cb03a1db Make content linker compat with new attachment API
Moved fom /attachments to /attachment API endpoint name.
2018-12-21 17:38:55 +00:00
Harvey Kandola
60f8cb7b5b Move Add Section wizard to new UI framework 2018-12-21 12:49:55 +00:00
Harvey Kandola
60d2ef57bb Remove Boostrap Grid
Replaced with CSS Grid layout.
2018-12-21 11:46:51 +00:00
Harvey Kandola
61c648a7ac Replaced Material Icons & Boostrap with custom UI framework 2018-12-21 11:15:59 +00:00
Harvey Kandola
d0f0a12f2d Use new UI framework for content block editor 2018-12-20 18:20:56 +00:00
Harvey Kandola
89957c8278 Change add-ons to use new UI framework 2018-12-20 18:12:17 +00:00
McMatts
e140caff55 Break out document tag and category mng sections
Separate out screens for tag and category management.
2018-12-20 14:31:59 +00:00
sauls8t
3c81297fc6 Move revisions to new ui framework 2018-12-20 13:05:22 +00:00
sauls8t
2042454e77 Add missing super call in routes 2018-12-20 13:05:06 +00:00
sauls8t
329c43eba0 Implement new toolbar for document view 2018-12-19 19:23:17 +00:00
sauls8t
93253be0f2 Update document view to use new UI framework
1. Sidebar contains ToC & attachments.
2. Document meta moved up before content (to frame  context).
3. Per section toolbar re-designed.

Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-12-19 18:36:45 +00:00
sauls8t
3d2060ca60 Migrate document attachments view to new UI framework 2018-12-19 12:41:36 +00:00
Harvey Kandola
7cdf97aa86 Revamp document view using new layout
New master page system and UI framework implemented on document view.

Sidebar contains ToC and Attachments.
2018-12-18 19:03:34 +00:00
Harvey Kandola
b4b3dbcb4c Complete the UI migration for all space setting views
Permissions and Categories admin views have been migrated to the new UI layout system.
2018-12-18 11:12:11 +00:00
McMatts
60e92b63a9 Applied new layout to space admin screens
Applied the new master layout and UI controls to the following space admin screens:

1. General options.
2. Deletion.
3. Permissions.
4. Content blocks.

Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-12-17 18:32:26 +00:00
McMatts
d5b5e015d1 Update Space view to use new layout 2018-12-17 13:39:13 +00:00
Harvey Kandola
0cc83c13c8 Move What's New into dedicated page
No longer a modal popup.

Also merged About dialog content.
2018-12-17 10:19:16 +00:00
Harvey Kandola
42db78ce14 Ensure modals in sidebar show in main view
z-index shenanigans to ensure modals rooted in position:fixed sidebar appear correct centered over main view.
2018-12-16 17:22:49 +00:00
Harvey Kandola
05a1db9d8a Put settings link to new sidebar UX
Just above Search but below all other core app views.
2018-12-16 17:21:43 +00:00
Harvey Kandola
9f35cbb64a Use font antiasliasing
Set as default site-wide.
2018-12-16 17:21:02 +00:00
Harvey Kandola
d1bc4a5b4c Provide better user list paging UX 2018-12-16 12:56:50 +00:00
Harvey Kandola
8a654fcf3d Change Search & Profile views to use new UX/UI 2018-12-14 16:40:54 +00:00
Harvey Kandola
0ec0c65002 Complete UI revamp for admin screens 2018-12-14 15:47:41 +00:00
Harvey Kandola
edb256e754 Bring new UX to each admin view 2018-12-14 11:52:31 +00:00
McMatts
ff1d737c68 New look and feel for auth screens 2018-12-13 13:34:26 +00:00
Harvey Kandola
8d525ce733 Optimize document fetching SQL
Removed redundant sub-query to speed up fetching of documents by space.

There is no cross-tenant leak of information with this change.
2018-12-13 12:25:53 +00:00
McMatts
f442081a41 Redesign setting screens
We're using iconography to stylize each setting screen.

Imeplemented new color palletes and shades.
2018-12-13 12:24:16 +00:00
Harvey Kandola
02102f9bf3 Provide icon rendering framework 2018-12-12 13:35:16 +00:00
Harvey Kandola
6eb68f84e0 Introduce modular UI framework
1. Modals wrapped
2. Toolbar icon actions: click and link-to navigation
3. Moved components into sub-folders
4. Replaced Bootstrap Tooltip and Dropdown libs with Ember specific add-ons

And more.

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
Co-Authored-By: McMatts <matt@documize.com>
2018-12-11 18:00:08 +00:00
Harvey Kandola
f140e7ef77 Componentize UI elements: buttons, toolbars 2018-12-10 18:22:11 +00:00
Harvey Kandola
adbd00bdd7 [WIP] Upgrade EmberJS -- lint pass! 2018-12-08 20:54:19 +00:00
Harvey Kandola
c7808d0b5a [WIP] Upgrade EmberJS: add-on upgrades 2018-12-08 19:06:43 +00:00
Harvey Kandola
cf263a4f6a WIP EmberJS upgrade 2018-12-08 15:57:58 +00:00
Harvey Kandola
70a3b5915c WIP EmberJS upgrade 2018-12-08 15:54:10 +00:00
Harvey Kandola
5cfbf07e55 [WIP] Upgrading EmberJS codemods 2018-12-08 15:39:31 +00:00
Harvey Kandola
4b68529090 [WIP] Upgrade EmberJS to 3.5.x 2018-12-08 15:35:41 +00:00
Harvey Kandola
44d3e40663 Componentize new UI buttons and toolbar 2018-12-08 15:16:04 +00:00
Harvey Kandola
0de7efdf20 Introduce new button and toolbar styles 2018-12-06 20:13:03 +00:00
sauls8t
3b179d5bc0 Remove excess JS libs 2018-12-06 14:40:35 +00:00
sauls8t
75a19a80f9 Replace Bootstrap tooltips/popovers/dropdowns
With Ember Attacher component.

This commit removes redundant BS code.

Co-Authored-By: McMatts <matt@documize.com>
2018-12-06 14:10:00 +00:00
sauls8t
f05a6fc999 Introduce new nofications framework
Integrated https://github.com/documize/iziToast and added 4 log levels.
2018-12-05 13:44:10 +00:00
Harvey Kandola
f44cda66e6 Updated themes to use new color framework 2018-12-04 17:36:59 +00:00
Harvey Kandola
d7a46ceee6 Implement new refactored color scheme 2018-12-04 17:26:57 +00:00
Harvey Kandola
da0861b3fd Implement new sidebar and master layout 2018-12-03 19:51:34 +00:00
Harvey Kandola
34d54745f3 New theme layout 2018-12-02 16:19:25 +00:00
Harvey Kandola
679049d2b1 [WIP] User can select theme 2018-11-24 18:39:43 +00:00
Harvey Kandola
11e164496b [WIP] theme selector 2018-11-24 16:13:21 +00:00
Harvey Kandola
a7e52809dc Bump version 2018-11-21 12:01:03 +00:00
Harvey Kandola
7428199fdd Handle edge case of self-approving sections changes
Prevents double-submission bug leading to section being hidden from view.
2018-11-21 11:53:12 +00:00
Harvey Kandola
d499888cfd Revision history will respect doc lifecycle stage
Protected documents cannot be rolled back!
2018-11-21 11:52:33 +00:00
Harvey Kandola
c152d029f2 Add comments 2018-11-21 11:51:54 +00:00
McMatts
5d632712e0 Improve Space permissions
Closes out loopholes that allowed managers to kick owners.
2018-11-16 19:18:10 +00:00
McMatts
09635b67ab Experimental TX refactoring 2018-11-16 19:13:41 +00:00
McMatts
73d91a2dae Ensure Backup/Restore process activation keys 2018-11-16 19:13:18 +00:00
McMatts
5153d49ad7 Removed redundant vote code 2018-11-13 18:53:29 +00:00
sauls8t
b1865b2318 Sync'ed versions between EE & CE
Both sit @ 1.76.0
2018-11-13 15:19:05 +00:00
sauls8t
7e959b448c Move space deletion & archived docs into Space settings 2018-11-13 15:18:34 +00:00
sauls8t
b37f9d601f Bump version 2018-11-12 20:26:07 +00:00
sauls8t
0a313be1de Ignore product subscription column for table updates 2018-11-12 20:25:55 +00:00
sauls8t
1d8bb2d3ad Add experimental string to timestamp for backup/restore 2018-11-12 20:25:30 +00:00
sauls8t
3913995dd0 Use timestamp type for comments backup/restore 2018-11-12 20:24:59 +00:00
Harvey Kandola
5e58b56182 Removed redundant code 2018-11-12 15:02:25 +00:00
Harvey Kandola
cb9fd0940d
Merge pull request #185 from documize/app-subscription
App subscription
2018-11-11 18:37:13 +00:00
Harvey Kandola
4df1574663 Bump version 2018-11-11 16:54:47 +00:00
Harvey Kandola
77ab56dbf8 Tweaked app subscription logic 2018-11-11 16:54:36 +00:00
Harvey Kandola
c0e1bd5045 Conditionally backup/restore dmz_config 2018-11-11 16:54:11 +00:00
Harvey Kandola
0a64afd6b5 account deactivation process 2018-11-09 13:42:58 +00:00
Harvey Kandola
6a9ad7f540 Merge code between editions 2018-11-07 15:56:05 +00:00
Harvey Kandola
d1b803b246 PRovide basic in-app purchase/renewal flow 2018-11-05 19:48:50 +00:00
Harvey Kandola
745e610bcb
Merge pull request #183 from simonw/master
Better password advice
2018-10-31 17:27:44 +00:00
Simon Willison
db78d75489
Better password advice 2018-10-31 10:12:19 -07:00
Harvey Kandola
e116d3b000 Subscription checks 2018-10-29 16:53:54 +00:00
Harvey Kandola
6e4c5194e2 Latest build embed assets 2018-10-26 14:41:26 +01:00
Harvey Kandola
eb57cfbfd6 Backup process no longer indents JSON
Save time and memory on large datasets
2018-10-23 16:58:33 +01:00
Harvey Kandola
cccf160d37 Removed spaces 2018-10-23 16:57:58 +01:00
Harvey Kandola
4b543733e7 Provide better Keycloak aiuth failure msg 2018-10-23 16:57:40 +01:00
sauls8t
8cc6bf3d40 bump version 2018-10-23 13:47:41 +01:00
sauls8t
9c6075c6a4 State minimum MySQL v8 version 2018-10-23 13:47:34 +01:00
sauls8t
150f86025b Replace folderId with spaceId 2018-10-23 13:47:13 +01:00
sauls8t
313ed7f90a Allow inline doc title/desc editing 2018-10-23 13:47:00 +01:00
sauls8t
f950075593 Remove redundant code 2018-10-23 13:46:38 +01:00
Harvey Kandola
9667e8c2a0 Record user event backed-up-database 2018-10-20 17:31:59 +01:00
Saul S
88b84dc5ed
Merge pull request #179 from documize/backup-resttore
In-app Backup & Restore
2018-10-20 12:46:23 +01:00
sauls8t
cee71cb313 Tweaks to backup process permissions 2018-10-20 12:41:26 +01:00
sauls8t
db04057d9e Enable in-app backup/restore for global/tenants
Re-mapping of ORG and USER ID values ensures conflict-free merging.

Version numbers bumped.

Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-10-19 12:40:45 +01:00
sauls8t
ec1939c01d Provide Backup/Restore for system and tenant 2018-10-17 14:27:40 +01:00
sauls8t
b3383f46ca Update SQLX dependency 2018-10-17 14:27:02 +01:00
sauls8t
516140dd7e [WIP] Provide system restore facility
Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-10-15 18:59:21 +01:00
sauls8t
71a2860716 [WIP] Restore process
Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-10-12 17:54:30 +01:00
sauls8t
e0457b40da EmberJS: FolderID to SpaceID
Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-10-12 17:54:15 +01:00
sauls8t
66d5e73ed1 Generate global or tenant level backup file 2018-10-11 16:19:11 +01:00
sauls8t
4094677792 [WIP] Backup process outline 2018-10-10 15:13:09 +01:00
Saul S
8bbb0d3e82
Update README.md 2018-10-07 15:46:27 +01:00
Saul S
4aa3bba7bc
Merge pull request #178 from documize/sql-store
Pluggable storage provider + PostgreSQL support
2018-10-07 14:02:45 +01:00
sauls8t
49f05746bd Correct SQL Group BY for space user list SQL 2018-10-07 13:58:30 +01:00
Harvey Kandola
8eb930d281 Make search re-indexing multi-tenant aware
Makes things easier when having to reindex in multi-tenant deployments.
2018-10-06 17:23:55 +01:00
Harvey Kandola
85b3f6e8ee Bump version 2018-10-05 17:42:52 +01:00
Harvey Kandola
5b4c3ec8cd Faster candidate link selection via SQL.
Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-10-05 17:42:42 +01:00
Harvey Kandola
df0e3c108e Improved secure mode viewing
Co-Authored-By: McMatts <matt@documize.com>
2018-10-05 17:42:06 +01:00
Harvey Kandola
ab2cbd4ff7 Add the basis for in-app backup/restore process
Zip format output.
2018-10-04 21:04:31 +01:00
Harvey Kandola
391c143483 Change RefID field size from 16 to 20 with updated algo
Xid dependency updated.

Moved to 20 length ID values.

Added new revision number to version and meta information. Revision number is timestamp format.
2018-10-04 21:03:47 +01:00
Harvey Kandola
7860bc1808 Remove redundant Bower files 2018-10-01 18:24:27 +01:00
Harvey Kandola
486395c1ce Reorder user dropdown menu options
Bring Settings up to the top.
2018-10-01 18:24:13 +01:00
Harvey Kandola
1c3eef345f Bump version 2018-10-01 18:23:47 +01:00
Harvey Kandola
c5476d99e9 Replace all SQL bool 0/1 to true/false
For more consistent database provider support.
2018-10-01 18:23:32 +01:00
sauls8t
6dfb1ad2e5 Improve document attachment upload process
Increase to 50MB file size.
2018-10-01 13:31:47 +01:00
sauls8t
075060d11c Implemented per database provider DATE INTERVAL queries 2018-10-01 13:31:22 +01:00
sauls8t
97d36fa2c8 Upgrade to latest Bootstrap 4.1.3 2018-10-01 13:30:38 +01:00
sauls8t
58aad87770 All in with Yarn, removed Bower 2018-10-01 13:30:03 +01:00
HarveyKandola
8a65567169 Implement PostgreSQL Full Text Search++
1. Full text search supports MySQL, MariaDB, Percona and now PostgreSQL.
2. Changed SQL Variant to typed enum.
3. Changed doc.Versioned from INT to BOOL.
4. Search Reindexer now parses all documents and attachments.
5. Site meta API call returns storage provider type.
6. README prep'ed for PostgreSQL support.
7. DELETE SQL statements ignore zero rows affected.

Closes #100 !!!

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
Co-Authored-By: McMatts <matt@documize.com>
2018-09-28 16:33:15 +01:00
HarveyKandola
97beb3f4d3 Continued MySQL/PostgreSQL store provider refactoring
Refactored, renamed, removed storage related code.

Basic smoke test passed for PostgreSQL whilst fully working on MySQL variants as per usual.
2018-09-27 15:14:48 +01:00
HarveyKandola
b455e5eaf5 PostgreSQL prep
Update of vendored SQL libs and refactoring of store provider layer.
2018-09-26 17:59:56 +01:00
HarveyKandola
d0e005f638 Jira connector improvements and PostgresSQL schema 2018-09-24 18:53:01 +01:00
HarveyKandola
a9e12f3b4c Ensure installer process supports new database schema 2018-09-23 16:14:05 +01:00
sauls8t
153e38a5d4 Fix missing return on error 2018-09-20 17:23:26 +01:00
sauls8t
fe7389e7ca Improve SQL store for new schema 2018-09-20 17:07:40 +01:00
sauls8t
8ee63de6c7 More SQL changes in line with new schema 2018-09-20 12:47:47 +01:00
sauls8t
944fd98421 Fixed up more SQL store breaking changes 2018-09-20 11:12:17 +01:00
Harvey Kandola
5376bd88d8 Merge branch 'sql-store' of https://github.com/documize/community into sql-store 2018-09-20 09:31:42 +01:00
Harvey Kandola
3ea6ae3c37 Make Sitemap & Robots.txt use new schema 2018-09-20 09:31:06 +01:00
Harvey Kandola
d67767fcfc Make Sitemap & Robots.txt use new schema 2018-09-19 16:38:05 +01:00
Harvey Kandola
4f0cc2f616 Make API work with new schema 2018-09-19 16:03:29 +01:00
Harvey Kandola
28342fcf5e [WIP] new schema implementation 2018-09-18 20:55:40 +01:00
Harvey Kandola
9c2594b1b4 New schema implementation 2018-09-17 18:00:00 +01:00
Harvey Kandola
4f525bd634 [WIP] Schema refactor
Necessary work ahead of PostgresSQL and MS SQL Server support.
2018-09-17 15:31:22 +01:00
Harvey Kandola
09de686fcf Generic support for populating empty database 2018-09-14 18:17:05 +01:00
Harvey Kandola
97d90662dd Make database boot process storage provider agonistic
Moved database queries into provider specific object to ensure database checking, installation, upgrade procedures are pluggable.
2018-09-14 18:00:24 +01:00
Harvey Kandola
4c733ce581 Boot process logger message consistency and improvements 2018-09-14 13:00:58 +01:00
Harvey Kandola
2336dab69f Make database install/upgrade provider aware
Ground work for installing and upgrading database schema based upon DB provider (MySQL, PostgresSQL, SQL Server, etc.)

Cleaned up legacy cruft, refactored, commented and made simpler for to support additional database providers.
2018-09-14 12:50:30 +01:00
Harvey Kandola
cf1e1ff943 Make group membership UX clearer
By labelling buttons with more copy!
2018-09-13 10:10:28 +01:00
Harvey Kandola
3bccd6a537 Refactoring of database init code 2018-09-12 20:03:34 +01:00
Harvey Kandola
d7fea2125f LDAP improvements 2018-09-12 20:03:06 +01:00
Harvey Kandola
2792c8c1da Accept SSL for Jira connector 2018-09-11 14:15:39 +01:00
McMatts
0f19826556 Fix typo
Nice spot @harveykandola !
2018-09-11 12:26:00 +01:00
McMatts
64e6a41353 Correct Trello computed property for non-admins 2018-09-10 17:41:01 +01:00
McMatts
0847a82fc9 Reduce cloned space permissions copy
Removed unnecessary results from SQL.
2018-09-10 17:40:42 +01:00
Harvey Kandola
9ee9526a47 Display subscription information 2018-09-10 10:12:14 +01:00
Saul S
53e4861ded
Merge pull request #167 from documize/ldap
Native LDAP and Active Directory sync and authentication
2018-09-08 12:52:25 +01:00
sauls8t
8ab23c657b Provide link to mock user data 2018-09-07 17:47:08 +01:00
sauls8t
e03497032b Use paging for LDAP queries 2018-09-07 15:09:54 +01:00
sauls8t
ae084ae0bb Improve LDAP tests and preview process 2018-09-05 15:54:00 +01:00
sauls8t
6e0958b3c3 Bump version 2018-09-04 17:44:40 +01:00
sauls8t
074eea3aeb PRovide LDAP sync and authentication 2018-09-04 17:19:26 +01:00
sauls8t
63b17f9b88 Preview LDAP connection results 2018-09-03 18:19:46 +01:00
sauls8t
1ce7e53398 Capture LDAP configuration 2018-09-03 17:36:54 +01:00
sauls8t
fd167234ae Discrete data loading functions 2018-09-01 14:50:37 +01:00
sauls8t
e6b557f43b Refactor LDAP code into discrete functions 2018-08-31 21:00:51 +01:00
sauls8t
a7865d0f71 Refactor LDAP tests with reusable code 2018-08-30 16:01:36 +01:00
sauls8t
7df0fbcb2b Process mulitple groups in LDAP/AD group filter 2018-08-30 11:37:05 +01:00
sauls8t
e490407260 Refactor LDAP tests
Local tests run against OpenLDAP Docker container with sample data.

Public tests run against OpenLDAP server hosted by enterprising 3rd party ( https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server).

AD tests run against AD server hosted in Azure.
2018-08-29 17:05:01 +01:00
sauls8t
e7bff0359a Authentication tests against LDAP and AD 2018-08-29 16:58:54 +01:00
sauls8t
2a2831e576 LDAP group fetching and AD connectivity 2018-08-29 16:20:37 +01:00
sauls8t
8d3dfcc3c7 [WIP] Basic LDAP connectivity 2018-08-28 10:19:22 +01:00
sauls8t
f28b7497fa Content links conditional checking
Whe link is interna,
2018-08-24 11:54:45 +01:00
McMatts
b1a35b7f75 Improved Draw.io integration pending changes detection 2018-08-23 12:29:55 +01:00
McMatts
8a30f3681c Bump version 2018-08-22 19:27:59 +01:00
McMatts
6073b24036 Increased Keycloak sync max results setting
Set to 99999 to support larger installations.
2018-08-21 15:41:46 +01:00
McMatts
1b16be2505 Make bulk group member management easier
Add and Remove members separated.

Introduced user list paging size.
2018-08-21 15:33:54 +01:00
McMatts
bd2e8ac165 Keep text inside tabnav control on small screens 2018-08-21 13:00:36 +01:00
McMatts
351b8dcc12 Set user admin max results and Keycloak sync option 2018-08-20 17:17:25 +01:00
McMatts
2c8b757ff6 Put search examples in scrollable component 2018-08-20 12:03:14 +01:00
HarveyKandola
abc0b206a4 Trim GOPATH from binary compile process 2018-08-17 13:50:39 +01:00
Harvey Kandola
47bb9d7d74
Merge pull request #164 from documize/jira-connector
Jira connector
2018-08-10 15:17:13 +01:00
HarveyKandola
58fc03f4c1 Make Trello config dependent on user permission 2018-08-10 15:16:49 +01:00
HarveyKandola
9987d29b7b Provide UI to configure Trello connector 2018-08-09 15:31:36 +01:00
HarveyKandola
7206f721f4 Provide UI for managing integration config
Closes #110
2018-08-08 14:57:56 +01:00
HarveyKandola
4d1eb952b2 Fully working Jira connector using JQL 2018-08-08 12:18:04 +01:00
HarveyKandola
64b1394ec1 Bump version 2018-08-08 12:17:11 +01:00
HarveyKandola
7b178a76b2 Render Jira issues 2018-08-07 19:43:25 +01:00
HarveyKandola
0f9602e3a0 Fetching Jira issues 2018-08-07 19:15:25 +01:00
HarveyKandola
7878a244d3 [WIP] Admin level Jira creds and vendored jira libs 2018-08-06 19:39:31 +01:00
sauls8t
0c5ec43c80 bump version 2018-08-01 19:34:08 -04:00
sauls8t
39891a0758 Fix Draw.io integratoin timing issue 2018-08-01 17:33:57 -04:00
sauls8t
63ce324eae Exclude non-live documents from space level category counts. 2018-08-01 13:50:39 -04:00
sauls8t
b74dfe6385 Scrolling for long category lists on space view 2018-07-31 14:30:04 -04:00
sauls8t
aaca1c73b1 Improve examples for search screen 2018-07-31 13:13:29 -04:00
Harvey Kandola
67bb3bae4f
Merge pull request #162 from documize/export-html
Export spaces, categories, documents to self-enclosed HTML file
2018-07-29 17:26:48 -04:00
HarveyKandola
39677791b3 Bump version 2018-07-29 16:41:26 -04:00
HarveyKandola
82a5bfe198 Better client-side download file process 2018-07-29 16:41:18 -04:00
HarveyKandola
9d80c5fc8c Handle draft documents during export process 2018-07-29 16:40:56 -04:00
HarveyKandola
4949043df9 Pre-process section types for HTML export 2018-07-29 14:08:39 -04:00
HarveyKandola
b7fa4e1a1a Export to HTML all content from shared spaces 2018-07-29 12:36:48 -04:00
HarveyKandola
def01b6265 Export single or multiple documents 2018-07-29 10:59:24 -04:00
HarveyKandola
cf0b06923d Color tweaks for timestamp 2018-07-28 17:35:29 -04:00
HarveyKandola
ef425a6ce2 WIP 2018-07-28 17:15:16 -04:00
HarveyKandola
689e5078b8 WIP 2018-07-28 15:47:14 -04:00
HarveyKandola
f916801008 WIP 2018-07-28 15:30:33 -04:00
HarveyKandola
d0970c153b WIP 2018-07-28 11:43:45 -04:00
Harvey Kandola
743eae5aad Templates document carry forward categories 2018-07-18 17:57:17 -04:00
Harvey Kandola
f884926df7 Reload permissions matrix after invites sent 2018-07-18 12:44:28 -04:00
Harvey Kandola
50c7fabeb6 Protect document activity and revisions from external users 2018-07-18 12:43:49 -04:00
Harvey Kandola
6617a5de45 Show notifications in footer 2018-07-11 08:44:12 -04:00
Harvey Kandola
4cfbd57871 Allow content to contain links to network locations 2018-07-09 14:41:55 -04:00
Harvey Kandola
19736aab04 New config setting: how many tags per document? 2018-07-05 12:02:10 -04:00
sauls8t
0743ae002c Version bump 2018-06-29 16:07:01 +01:00
sauls8t
4130d1f129 Flexbox for auth UI
Providing better support for flaky IE/Edge browsers.
2018-06-29 16:06:50 +01:00
sauls8t
10a184ad10 Cap category @ 30 2018-06-29 15:53:57 +01:00
sauls8t
a0f6626367 Cross-browser support for JS strings startWith 2018-06-29 15:53:38 +01:00
sauls8t
d5be8ec843 All new space permission managament
Using ember-toggle add-on.
2018-06-27 18:56:03 +01:00
sauls8t
13deb55cbb Display local datetimes
From UTC to local.

Closes #156
2018-06-27 13:29:29 +01:00
sauls8t
5ed180396e Add new check permissions helper 2018-06-27 13:09:25 +01:00
sauls8t
ad44112359 Document meta fields: better popovers & click-through editing
Non-admins receive popovers on hover.

Admins receive no popovers and get click-through to settings tab.

Space and document settings support jump to sub-section.

Co-Authored-By: Harvey Kandola <harvey@documize.com>
2018-06-25 19:43:29 +01:00
sauls8t
5d80480d75 Comment fix for attachment endpoint 2018-06-25 19:40:04 +01:00
sauls8t
ecc306136a Quick-abort space settings save operation if no permission 2018-06-25 19:39:32 +01:00
sauls8t
419ce1bbb5 Move permissions explainer matrix to end of layout 2018-06-25 19:38:37 +01:00
Harvey Kandola
3c5065375d
Merge pull request #159 from documize/search-data-limits
Search data limits
2018-06-23 08:31:10 +01:00
HarveyKandola
dc091fed7b bump version
Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-06-23 08:30:48 +01:00
HarveyKandola
467acec3c4 Implement category-based permissioning for search results
Only see what you can see.

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-06-22 17:01:26 +01:00
HarveyKandola
ae50b889c5 Jump scroll to section for internal links 2018-06-22 12:44:20 +01:00
HarveyKandola
6ff74cf45e Removed obsolete doc general settings code 2018-06-22 11:02:31 +01:00
HarveyKandola
785e4c245d Removed space.category screen references 2018-06-21 13:58:45 +01:00
HarveyKandola
5d33860a15 Bump version 2018-06-21 12:38:26 +01:00
HarveyKandola
d689cbc281 Normalized remaining space options into settings admin
Moved space naming and category management into space settings.
2018-06-21 12:38:13 +01:00
McMatts
29534273b8 Add spacing to attachments view 2018-06-17 14:50:43 +01:00
McMatts
03be1ce904 Bump version 2018-06-15 14:26:24 +01:00
McMatts
30856433f8 License key workflow improved
Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-06-15 14:26:02 +01:00
McMatts
27fde0dac8 Streamline document meta view and editing experience
Meta data:

1. Condensed layout.
2. Unified editing.

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-06-15 14:25:05 +01:00
sauls8t
f70d4b33a3 Warn if search criteria too short
Minimum keywords > 3
2018-06-13 15:54:58 +01:00
sauls8t
df9d9e174a Automatiically set Everyone as viewer on Public spaces 2018-06-13 12:47:40 +01:00
sauls8t
6e7f3cceaa Customizable Contact Us link in email notifications 2018-06-13 12:47:06 +01:00
sauls8t
8db452a18b Refresh documents list after document deletion 2018-06-13 12:46:23 +01:00
sauls8t
0b139c871f Bump version 2018-06-12 14:09:09 +01:00
sauls8t
5a480479a1 Bottom padding for Code section type in print media 2018-06-12 14:08:57 +01:00
sauls8t
ee28e27b16 Change order of links in top bar
Space should right-most.
2018-06-12 14:08:29 +01:00
sauls8t
ce9d314837 Display Keycloak settings outcome on save
Errors detected and displayed.
2018-06-12 14:07:50 +01:00
Saul S
628a633a0a
Merge pull request #158 from documize/may18-ux
Kick-ass UX/UI roll-out
2018-06-11 18:48:22 +01:00
Harvey Kandola
ed6edd8dcb Include latest embeddable assets 2018-06-11 14:57:53 +01:00
Harvey Kandola
ad2e653f3c Export to PDF related improvements 2018-06-11 14:40:21 +01:00
Harvey Kandola
2e9734e73e Handle edge case for document numbering + tests 2018-06-09 19:13:38 +01:00
Harvey Kandola
0da8ae9e4a Tweaked flexbox max-width for crazy long content 2018-06-09 19:13:15 +01:00
Harvey Kandola
d88adef5b5 Remove flexbox css for print media 2018-06-09 18:18:21 +01:00
Harvey Kandola
acdf2025ab Better defaults for content like setting 2018-06-08 13:43:46 +01:00
Harvey Kandola
78cdca3266 Reworked product license form 2018-06-07 19:14:45 +01:00
Harvey Kandola
5fe094a2d7 Save CodeMirror editor instance at end of process 2018-06-07 19:14:09 +01:00
Harvey Kandola
b316ba80d8 Format diagnostic message 2018-06-07 14:24:41 +01:00
Harvey Kandola
bf305d271e Improve style of empty state for add new section 2018-06-07 14:24:27 +01:00
Harvey Kandola
dea7a99aed Favicon cache buster 2018-06-07 14:24:08 +01:00
Harvey Kandola
94a2e2c0f7 Allow for empty document excerpt 2018-06-07 14:23:54 +01:00
Harvey Kandola
2d2296591b Bump version 2018-06-07 14:23:39 +01:00
Harvey Kandola
b34e41f65c Image upload for WYSIWYG editor
Fixes #106
2018-06-06 16:53:31 +01:00
Harvey Kandola
b828145163 New product icon color to match app color 2018-06-06 16:53:03 +01:00
Harvey Kandola
9a3259b60e Sync two editions and deal with the diff 2018-06-06 13:59:12 +01:00
Harvey Kandola
372b3f3692 Improve copy for template admin 2018-06-05 15:48:33 +01:00
Harvey Kandola
e68a18395e Add category breadrcrumb 2018-06-05 15:48:20 +01:00
Harvey Kandola
fcd95cf415 Link to category admin UI from space settings
Shortcut for better UX
2018-06-05 15:47:58 +01:00
Harvey Kandola
92f8fe550e Change space settings management into tab views 2018-06-05 14:04:14 +01:00
Harvey Kandola
738b3d94b6 Enable all serahcs options by default 2018-06-04 14:40:35 +01:00
sauls8t
59bc495b56 Set analytics permisison during on-board process 2018-06-04 14:39:38 +01:00
sauls8t
193d6914d6 Improve modality mixin with better $ event usage 2018-06-04 14:38:52 +01:00
sauls8t
06b28991a7 Stop background shift on modal open 2018-06-04 14:38:19 +01:00
sauls8t
fca6cc7ede Turn add section UX into modal flow
At long last we have a modal-driven add section process @HarveyKandola !
2018-06-04 14:37:21 +01:00
Harvey Kandola
716bd062d7 Provide each doc section with TOC controls
Put up/down/indent/outdent options on the section menu dropdown for easier TOC manipulation.
2018-06-01 11:49:09 +01:00
McMatts
d5157615e0 Move section save notification after logic checks 2018-05-31 18:20:36 +01:00
McMatts
dc2c7a5f7c Tooltip for new document sidebar 2018-05-31 18:20:10 +01:00
McMatts
f9e2141ed4 Make long section names wrap correctly and pad better 2018-05-31 18:19:52 +01:00
McMatts
b0daabb577 Handle Ember destoy state for notifications bus
Notifications should only bee active when Ember component is not destroyed.
2018-05-31 18:18:50 +01:00
McMatts
983b84235c Improve document sidebar flexbox CSS
Maximum widths to control table of contents wrapping.
2018-05-31 17:03:59 +01:00
McMatts
25fd13bd3f Sidebar more responsive and sticky
Tweaked CSS to support small-to-large screen real estate.
2018-05-31 15:15:48 +01:00
McMatts
f20a1d1d5f Removed previous page layout framework 2018-05-30 16:08:25 +01:00
McMatts
c7cc36b307 Move attachments into meta zone 2018-05-30 11:27:29 +01:00
Harvey Kandola
c5561491a2 Upgrade TinyMCE to 4.7.13 2018-05-29 18:28:08 +01:00
Harvey Kandola
cfe30dcde5 CodeMirror upgrade to 5.38.0 2018-05-29 18:27:42 +01:00
Harvey Kandola
36be6243ad WIP new document UX/UI 2018-05-29 18:26:04 +01:00
Harvey Kandola
21ba55a58f Change position of new space content dropdown 2018-05-25 12:14:24 +01:00
Harvey Kandola
3903e58367 Start of space admin functionality refactoring 2018-05-24 18:29:58 +01:00
Harvey Kandola
5d757c992f More UI conversion to new framework 2018-05-24 18:09:38 +01:00
Harvey Kandola
a453052087 Spaces view 2018-05-23 15:57:30 +01:00
Harvey Kandola
95323c90ee Upgrade to Ember 3.1.2 ++
Also disabled optional feature Application Template Wrapper.
2018-05-23 15:14:47 +01:00
Harvey Kandola
09d698fd2a WIP 2018-05-23 12:37:21 +01:00
Harvey Kandola
31580d883c Rename layout zones 2018-05-22 17:00:42 +01:00
Harvey Kandola
eb7ebf391d Provide the basic layout framework for UX/UI 2018-05-22 15:56:54 +01:00
Harvey Kandola
942bc386f4 Outline framework in place 2018-05-18 20:11:24 +01:00
Harvey Kandola
4045197871 Bump versions 2018-05-17 11:01:19 +01:00
Harvey Kandola
46ee4b1a58 Merge branch 'master' of https://github.com/documize/community 2018-05-14 11:52:52 +01:00
Harvey Kandola
f5b196c334 Draft documents always visible to editors when space lifecycle set to Draft mode 2018-05-14 11:52:51 +01:00
Harvey Kandola
53c2404822
Update README.md 2018-05-14 10:33:22 +01:00
Harvey Kandola
df1e022e71
Update README.md 2018-05-14 10:32:58 +01:00
Harvey Kandola
3e428de4cc
Update README.md 2018-05-14 10:28:22 +01:00
Harvey Kandola
17fc2329df
Update README.md 2018-05-14 10:27:51 +01:00
Saul S
9724f85653
Update README.md 2018-05-11 15:25:46 +01:00
sauls8t
e85744e1b3 Provide granular Dashbaord/Action view permissions
Closes #154
2018-05-11 15:17:10 +01:00
sauls8t
c66fae703c Fix keyword quoted string failure for MariaDB
Closes #153
2018-05-11 09:28:04 +01:00
sauls8t
e4c075ea4b Bump version 2018-05-10 15:35:09 +01:00
sauls8t
2066f72258 Support MySQL 8.x series
Two issues resolved relating to MySQL 8:

1. DB version checking skips MINOR/PATCH checks if MAJOR release changed.
2. Keyword 'admin' quoted to ensure MySQL compat.

Closes #152
2018-05-10 15:14:50 +01:00
sauls8t
0f87d5b07e New spaces to result in live documents
Ensure community edition users do not see Draft document lifecycle.
2018-05-10 15:12:17 +01:00
sauls8t
c94fd9cfcf Enforce non-draft mode lifecycle for CE
Closes #151 by enforcing non-draft mode settings for Community Edition.
2018-05-10 15:10:15 +01:00
Saul S
fb193ce9f9
Merge pull request #148 from documize/draw
Draw.io integration
2018-05-04 12:37:01 +01:00
sauls8t
2298ac3376 Set ReplyTo for SMTP based notifications
Ensure all replies go back to person who initiated the notification.
2018-05-03 18:03:25 +01:00
McMatts
3b0291d94c Bump version 2018-05-03 12:50:58 +01:00
McMatts
c32d094e91 Detect edge case for new section insert 2018-05-03 12:50:51 +01:00
McMatts
3bc775582d Code linting 2018-05-03 12:49:49 +01:00
McMatts
af632615cf Change UX for user group member management
Placed search results below existing members list.
2018-05-03 12:48:45 +01:00
Harvey Kandola
85b6e40d8c Finished up Draw.io integration 2018-05-03 12:46:15 +01:00
Harvey Kandola
d746c90624 Draw.io integration WIP 2018-05-02 14:55:02 +01:00
Harvey Kandola
2b8a7921ad Fix typo for user admin section 2018-05-02 14:54:24 +01:00
Harvey Kandola
567ee10c5f Include Codemirror vendor in libs 2018-05-02 14:54:08 +01:00
Harvey Kandola
ba42d5e282 Move ugly Codemirror init to vendor libs 2018-05-02 14:53:54 +01:00
Harvey Kandola
fb8adc6491 Prevent ember actions on destroyed objects 2018-05-02 14:53:26 +01:00
Harvey Kandola
455a384eb0 Prettify 2018-05-02 14:52:23 +01:00
Harvey Kandola
e234471b1e Ensure initials calculate correctly for Unicode via runes 2018-05-02 14:50:22 +01:00
Harvey Kandola
b839a0753c Latest build assets 2018-04-27 09:53:12 +01:00
sauls8t
05da8894b9 Trap for empty text diagram before generating 2018-04-26 15:14:41 +01:00
McMatts
734e8653dd Bump build numbers 2018-04-26 15:02:06 +01:00
McMatts
3e37b9b7e4 Flip revisions diff format, by popular request
Switch from 'what you will lose' to 'what you will gain'...
2018-04-26 15:01:43 +01:00
McMatts
b1e0e31a9e Prettify code 2018-04-26 13:44:41 +01:00
McMatts
f2a903d054 Ensure activity view works on UTC date formats 2018-04-26 13:44:29 +01:00
McMatts
b40db1433e Use default Ember object ID for permissions model 2018-04-26 12:03:23 +01:00
McMatts
962a8369aa Prettify some code 2018-04-26 12:02:36 +01:00
McMatts
f21c80d960 Revert section title change on cancel operation 2018-04-26 12:01:58 +01:00
McMatts
7b619101f1 Switch search to InnoDB
Better, faster searching
2018-04-25 12:19:47 +01:00
McMatts
08557c369c Implement User API support
Direct User API usage impacted UI usage of API.

Moved setting of new user permissions up the call chain.
2018-04-25 12:19:14 +01:00
Harvey Kandola
e47c5e61fc Remove superfluous SQL param
superflous
2018-04-25 12:17:12 +01:00
sauls8t
123fce6c17 Use unicode compat slug engine 2018-04-25 12:15:17 +01:00
sauls8t
91c8b05d89 Make Keycloak integration compatible with 4 series
Troubleshooting information provided
2018-04-23 12:47:31 +01:00
sauls8t
74e9699e1e Replace showNotificaiton() calls 2018-04-23 12:46:34 +01:00
McMatts
9235c183c5 Support for document draft-live publication workflows 2018-04-20 14:38:35 +01:00
McMatts
bde0091a4a Reafctor client side (EJS) constants 2018-04-20 14:38:10 +01:00
McMatts
8fb001422a Slow down space view component lifecycle eagerness 2018-04-17 18:03:32 +01:00
McMatts
0019e860ad Ensure document TOC listens to section add event 2018-04-17 16:53:09 +01:00
McMatts
591579251e Make consistent cloneID 2018-04-17 16:10:13 +01:00
McMatts
46f5f25acc Grant document lifecycle permission when adding new space 2018-04-17 16:09:53 +01:00
McMatts
94ca80f052 Show content like box if not draft document 2018-04-17 16:09:28 +01:00
Harvey Kandola
22b6674edb Content liking
New per space option that allows users to like/dislike content.

The prompt is configurable per space, e.g. "Was this useful?".

Enterprise edition gets new Votes report providing insights into most/least liked content.
2018-04-13 11:01:36 +01:00
Harvey Kandola
6c8f23792c Add tooltips to bulk doc ops in space view 2018-04-12 12:12:48 +01:00
Harvey Kandola
1887eb8100 Removed db snippet 2018-04-11 15:52:24 +01:00
Harvey Kandola
1ea30ee8e1 Disable native GitHub commits module 2018-04-11 15:08:03 +01:00
Harvey Kandola
b1d677778b Remove "| Documize" suffice from browser title when viewing doc
This helps to improve print/pdf rendering.
2018-04-11 14:30:38 +01:00
Harvey Kandola
a3157749f0 Reuse ctx.Transaction during search index operations 2018-04-11 14:29:33 +01:00
Harvey Kandola
cc7bcc31be
Update README.md 2018-04-09 14:13:27 +01:00
Saul S
2dce8a89a4
Merge pull request #144 from documize/content-analytics
Content analytics and reporting
2018-04-09 10:26:59 +01:00
Harvey Kandola
efcc0fe9ac Embed static assets for build 2018-04-09 10:24:44 +01:00
McMatts
ddd90a4aaf Auto-load serach results 2018-04-07 14:30:31 +01:00
McMatts
c92ab3a589 Refactoring fof nav elements across both editions 2018-04-05 20:01:10 +01:00
McMatts
5fb41e9fb1 Change document activity records after space move 2018-04-05 20:00:42 +01:00
McMatts
19a916a4b4 New user role: view analytics 2018-04-05 19:59:57 +01:00
McMatts
b65a00dd1c Fix silent error drop 2018-04-05 14:25:36 +01:00
McMatts
f2b1b5af03 Return promise from document model refresh process 2018-04-05 14:25:15 +01:00
McMatts
ca62d74a19 Pass keywords from search route to component 2018-04-05 14:24:58 +01:00
McMatts
335a1d1f81 Search will pass source down to document being viewed
Backend records search referrer of document being viewed.
2018-04-05 14:24:27 +01:00
McMatts
c9e429ea1a Tag document view activity with source/referrer 2018-04-05 14:23:39 +01:00
McMatts
663ec23c75 Fix slient error drop 2018-04-05 14:22:23 +01:00
McMatts
c29426f2d7 Record search history only for share spaces 2018-04-05 14:21:55 +01:00
McMatts
274b77cb8f Clean up category code/formatting for MySQL store 2018-04-04 14:38:41 +01:00
McMatts
01720722d6 Upper case navigation text 2018-04-04 14:38:21 +01:00
McMatts
2579382280 Copt document categories when copying document 2018-04-04 14:38:04 +01:00
McMatts
e19e3682b7 Provide support for analytics/reporting 2018-04-04 14:37:25 +01:00
McMatts
38772f5961 Introduce new gray color 2018-04-04 14:35:25 +01:00
McMatts
0d78cf3dda Implement new search page query filters 2018-04-04 14:35:03 +01:00
McMatts
18930fb610 Add Help menu option 2018-04-04 14:34:17 +01:00
McMatts
ca91cd8e49 Set explicit MySQL InnoDB engine
Closes #142
2018-03-30 22:12:18 +01:00
McMatts
ee10e6db3b Search history recording
Controller re-worked.
2018-03-30 20:00:49 +01:00
McMatts
b4c4decb3b Search history recording
1. Record all search queries.
2. Replaced typeahead with form style for faster search result fetch/rendering.
2018-03-30 20:00:24 +01:00
McMatts
a6828e6b7f Record document search history 2018-03-30 17:03:18 +01:00
McMatts
4816cf73c0 Record space activity actions
Record user space, creation, view and deletion.

View action also covers anonymous users.
2018-03-30 12:55:17 +01:00
McMatts
c138716ff4 Refactor document view activity recording 2018-03-30 12:54:15 +01:00
sauls8t
527b02e8b3 Improve JS slugify process
To handle non-recognized charsets.
2018-03-30 11:27:25 +01:00
sauls8t
1944690540 Restrict 'update available' msg to Global admins 2018-03-30 11:25:56 +01:00
sauls8t
df0a13b6ed Rebuild search index 2018-03-29 12:23:09 +01:00
sauls8t
30315a36c7 Update README.md with latest version numbers 2018-03-28 14:25:37 +01:00
sauls8t
ad4030bc17 Fix space permissions group vs. user role overriding 2018-03-27 11:33:43 +01:00
sauls8t
e1d2d4c037 Add missing semi-colon for MariaDB installation
Closes #140
2018-03-25 19:20:39 +01:00
sauls8t
c3c4e9820e Improve Print & PDF rendering
Tweaked CSS for more compact format utilizing print real estate.
2018-03-24 14:42:35 +00:00
sauls8t
3e1ee64e6f Set Table of Contents breakpoint to 1600
For lower resolution displays.
2018-03-24 14:41:45 +00:00
sauls8t
d45182b382 Exclude anonymous users from What's New
No need to notifiy anon users of product updates.
2018-03-24 13:27:39 +00:00
Harvey Kandola
8077dd939a Improve semver unit test
Now handles empty database scenario
2018-03-23 13:01:25 +00:00
Harvey Kandola
c31711c130 Updated README with edition download links 2018-03-23 12:02:27 +00:00
McMatts
0b85657536 Semver based in-app news and update notification
Ignore semver.patch for Whats New notifications.

Use semver.major.minor.patch for Admin notifications.

Changed endpoint to /news.
2018-03-23 11:52:19 +00:00
McMatts
8d65c2d571 Default to empty array results in Ember services 2018-03-23 11:50:21 +00:00
McMatts
38e8c4665a Stop Ember booting app when testing 2018-03-23 11:49:15 +00:00
McMatts
5c0b87bac5 Upgrade EmberJS testing 2018-03-23 11:47:59 +00:00
sauls8t
eaf46f06c1 Provide in-app What's New & new release notifications 2018-03-22 17:29:59 +00:00
Harvey Kandola
97cc5374f0 Remove duplicate response header write 2018-03-21 10:08:11 +00:00
Harvey Kandola
c5acaae677 Differentiate H1-H6 heading styles 2018-03-20 19:38:27 +00:00
Harvey Kandola
297ce94546 Set document lifecycle defaults 2018-03-20 14:17:11 +00:00
Harvey Kandola
d9a2b16c2a Use new Bootstrap format for checkboxes 2018-03-20 10:41:11 +00:00
sauls8t
6ac035f196 Dashboard activity for versioned, archived, drafted events 2018-03-19 16:24:58 +00:00
Saul S
7eb99c52f2
Merge pull request #137 from documize/version-drafts-history-archiving
Document lifecycle and versioning
2018-03-19 16:20:40 +00:00
sauls8t
f825e9fdc9 Improved full text search matching 2018-03-19 15:04:02 +00:00
sauls8t
eb3bebf20d Add activity type TypeVersioned 2018-03-19 13:01:53 +00:00
sauls8t
a7a82d9fe3 Support for document versioning 2018-03-19 12:24:58 +00:00
sauls8t
bc2cab5721 Provide helpers to for adding API routes 2018-03-19 12:24:34 +00:00
sauls8t
8466cafe1f Upgrade npm 2018-03-19 12:24:09 +00:00
Harvey Kandola
ddcc61d5e0 Update sortable.js 2018-03-18 13:56:20 +00:00
Harvey Kandola
089457f16e WIP document versioning 2018-03-16 18:27:33 +00:00
Harvey Kandola
ba52dfa11d Provide basis for document lifecycle 2018-03-15 17:11:53 +00:00
Harvey Kandola
d9a9a828ed Include Bootstrap badge component 2018-03-15 17:11:29 +00:00
Harvey Kandola
b2e3f2be7e Record details of failed tenant access 2018-03-15 17:11:01 +00:00
Harvey Kandola
958f4d30b9 Provider foundation for doc lifecycle and versions 2018-03-14 13:38:37 +00:00
Harvey Kandola
4e32bffebe Update TinyMCE cache buster 2018-03-13 15:02:01 +00:00
Harvey Kandola
c7ebbff318 Make editorconfig add new line 2018-03-09 11:14:29 +00:00
Harvey Kandola
359e0e29eb Remove group permissions on delete event 2018-03-09 09:51:44 +00:00
Saul S
1c4a4424e5
Merge pull request #136 from documize/user-groups
User groups
2018-03-08 12:11:59 +00:00
sauls8t
f3e4b4060e Create default users groups during setup process 2018-03-08 11:54:57 +00:00
sauls8t
e6e099db1a Consistency of store empty result checks 2018-03-08 10:51:12 +00:00
sauls8t
bd43319bb2 New SMTP library and refactoring of mailer code 2018-03-07 18:52:19 +00:00
sauls8t
99220641f3 Refresh document content when switcing to content view
Closes #135
2018-03-06 15:59:07 +00:00
sauls8t
b2b3e6fca6 Decrease CSS line-height for document content viewing 2018-03-06 15:58:35 +00:00
sauls8t
ada775e074 Ensure permission records parsed for groups and users 2018-03-06 15:40:00 +00:00
sauls8t
ad3f406876 Rename document role to permission 2018-03-06 13:36:11 +00:00
sauls8t
93b95b9eca Removed dead code from category admin 2018-03-06 12:19:03 +00:00
sauls8t
22679920d0 Set category permissions for both users and groups 2018-03-06 10:39:47 +00:00
sauls8t
d1fdb385e9 User picker for permission admin 2018-03-05 12:47:42 +00:00
sauls8t
7ccb3b4658 Persist space permissions for groups and users 2018-03-03 17:46:29 +00:00
sauls8t
0d39f7251e Make rolemember DB queries consistent 2018-03-02 14:48:41 +00:00
sauls8t
08f0c2cd0b Replace permission related strings with typed values 2018-03-02 14:47:58 +00:00
sauls8t
99f0a16d71 Replaced remaining tip form classes with muted style 2018-03-02 11:28:45 +00:00
sauls8t
f0aed0ba77 Remove console.log() 2018-03-01 19:16:12 +00:00
sauls8t
ed11c0ad11 add/remove group membership 2018-03-01 19:14:27 +00:00
sauls8t
0b5ed8fd9e add bulk users 2018-03-01 10:58:55 +00:00
sauls8t
7e6d6366da renamed load() to loadGroups() 2018-02-28 15:51:48 +00:00
sauls8t
e4d78904dc join and leave group persistence 2018-02-28 15:39:46 +00:00
sauls8t
0680a72ee2 list group members & non-members 2018-02-28 14:55:36 +00:00
sauls8t
19b4a3de49 Allow admins to add, edit, delete user groups! 2018-02-27 14:16:23 +00:00
sauls8t
00f415214c Bump version 2018-02-23 14:33:37 +00:00
sauls8t
f8e47fe1d2 Correct space public/protected/private detection logic 2018-02-23 14:25:07 +00:00
sauls8t
ae6494b4f0 Hide document workflow meta info when Print/PDF 2018-02-22 18:16:13 +00:00
sauls8t
e9e1d76831 Remove +SECTION from Print & PDF 2018-02-22 18:15:13 +00:00
sauls8t
92533036a7 Bump version 2018-02-22 18:14:42 +00:00
sauls8t
421fde56e8 Fix package import ordering 2018-02-22 18:14:12 +00:00
sauls8t
8d4c6a19ee Provide space add/remove event notifications 2018-02-22 18:13:56 +00:00
sauls8t
c705e8c299 Explicit computed properties declaration for section header 2018-02-19 09:46:04 +00:00
sauls8t
3993cfeb8e Ensure space view permission comes before doc permissions 2018-02-16 12:56:05 +00:00
sauls8t
c1667e97b7 Make space permission toolbar icon first 2018-02-16 12:55:26 +00:00
Harvey Kandola
fc742a2282 Clear localstorage when user permissions change 2018-02-15 17:10:29 +00:00
Harvey Kandola
bca306347d
Merge pull request #133 from documize/godep-migration
go dep
2018-02-14 15:29:28 +00:00
Harvey Kandola
fd693f4ff4 go dep
Migrated from plain /vendor to go dep
2018-02-14 15:23:46 +00:00
Harvey Kandola
0262763c95 Upgrade to latest Markdown processing engine 2018-02-09 13:34:53 +00:00
Harvey Kandola
1e2c468dc4 Generate assets for latest release 2018-02-09 09:17:49 +00:00
Harvey Kandola
26de0551ae Resolve lint issues 2018-02-08 17:23:17 +00:00
Harvey Kandola
b5aef1dc87 Make consistent style imports 2018-02-08 12:23:15 +00:00
sauls8t
8f0440d55f Improve position of WYSIWYG editor toolbar 2018-02-08 12:12:27 +00:00
sauls8t
1ef8807b2d increase token expiry 2018-02-08 11:40:04 +00:00
sauls8t
9d82682797 Enhance + SECTION to always be visible 2018-02-07 19:16:23 +00:00
sauls8t
7d3473365a PlantUML integration 2018-02-07 13:44:18 +00:00
sauls8t
0f3de51ad5 Update TinyMCE editor to v4.7.6 release
Fixes issue with double scroll bar and subsequent position of inline editing toolbar.
2018-02-04 15:51:14 +00:00
sauls8t
f967949513 WYSIWYG editor now calls Ember parent lifecycle event
Missing ember component event calls added.
2018-02-04 15:50:17 +00:00
sauls8t
1370b2f2b5 Remove usage of outline success button styling
All positive/success button actions should be solid green.
2018-02-04 15:46:11 +00:00
sauls8t
bd9b7e120e Experimental Mermaid integration document section type
WIP and not hopeful
2018-02-04 15:45:28 +00:00
sauls8t
0997655e0a Fix order of DB transaction commits
Some DB commit commands were out of sequence and so have been fixed to be consist across the board. Specially, audit log entries have their own DB TX and so should be  executed outside of any other commit cycle.
2018-02-04 15:43:57 +00:00
sauls8t
880f39f1cb Merge branch 'master' of https://github.com/documize/community 2018-01-29 17:29:40 +00:00
sauls8t
f61f260db1 Add additional languages to TinyMCE Codesample plugin
Whilst this commit brings new language support for
TinyMCE Codesample plugin, it looks like hardcode TinyMCE defaults take precendence hence not all new languages receive proper theme formatting. To be fixed later.
2018-01-29 17:29:37 +00:00
Saul S
c000a66eef
Document how to write good commit messages 2018-01-29 09:23:02 +00:00
Harvey Kandola
c77b5c05ca
Merge pull request #131 from documize/protection-approvals
Document approval and locking
2018-01-28 18:04:00 +00:00
sauls8t
ce3e5c829b Show solid green button for success buttons 2018-01-28 17:44:01 +00:00
sauls8t
717df79e16 Correctly rename column approval to status 2018-01-28 17:42:59 +00:00
sauls8t
bffdd1f2b1 Ensure global admin is also default document approver 2018-01-28 17:42:24 +00:00
sauls8t
601262db12 Provide latest embeddable assets 2018-01-28 17:42:00 +00:00
sauls8t
a1833f56a3 revised screenshots 2018-01-28 14:04:35 +00:00
sauls8t
9d8b1d2f3c Fix an issue with Everyone permissions not being observed 2018-01-26 15:34:20 +00:00
sauls8t
91bab8c710 State press ENTER to add tag 2018-01-25 18:12:24 +00:00
sauls8t
5295f8a41f Resolve password changing bug for logged in user 2018-01-25 17:50:13 +00:00
sauls8t
8ddc6cedde Enable browser spell checker for WYSIWYG editor 2018-01-25 17:49:32 +00:00
sauls8t
2d8dc62ca4 Update to TinyMCE latest build 2018-01-25 16:14:37 +00:00
sauls8t
412127811e Scroll to correct point in document for edit mode 2018-01-25 13:20:22 +00:00
sauls8t
c0d70e38de Save smart sections correctly post callback refactoring 2018-01-24 14:00:12 +00:00
sauls8t
adef6dfffa Set consistent browser titles 2018-01-24 13:23:11 +00:00
sauls8t
88b99979a9 Update TinyMCE to v4.7.5
Resolves Codesample inline editing glitch.
2018-01-23 12:34:43 +00:00
sauls8t
4c80b8877d package.json updated 2018-01-22 16:35:37 +00:00
sauls8t
8ec36cfa49 bump version 2018-01-22 11:09:24 +00:00
sauls8t
cb4b6ee6c3 tweak color 2018-01-22 11:09:17 +00:00
sauls8t
5dd7d9c181 upgraded Ember and Bootstrap, merged changes 2018-01-22 10:31:03 +00:00
sauls8t
b4fd42da38 velocity update 2018-01-21 14:21:30 +00:00
sauls8t
b7811eccde improved canEdit for document heading 2018-01-21 14:08:03 +00:00
Harvey Kandola
c0d19f2531 bulk data model ID 2018-01-19 16:01:22 +00:00
Harvey Kandola
6409ad0d63 WIP vendored dep upgrades 2018-01-19 11:36:38 +00:00
Harvey Kandola
5f59e95495 improve level code 2018-01-10 16:07:17 +00:00
Harvey Kandola
049b83e0b9 improvements to numbering logic edge case detection 2018-01-09 17:47:26 +00:00
Harvey Kandola
a13b631a7e better constants for EmberJS 2017-12-26 15:38:55 +00:00
Harvey Kandola
b9394a4967 document level permissions 2017-12-26 13:25:10 +00:00
Harvey Kandola
f4f32bcfcb document approvals and protection 2017-12-24 15:51:43 +00:00
Harvey Kandola
58c88e2127 scrollbar css for document TOC 2017-12-24 09:14:32 +00:00
Harvey Kandola
7505904de1 tweaked document meta fields responsive layout 2017-12-22 09:16:31 +00:00
Harvey Kandola
9a804b5666 guard against no meta data before trim() 2017-12-21 13:10:05 +00:00
Harvey Kandola
40ade5c777 Uppercase 'save' button caption 2017-12-21 13:09:50 +00:00
Harvey Kandola
0b0cae4a8d improved manifest.json and API 401 redirect logic 2017-12-21 11:40:20 +00:00
Harvey Kandola
cafa410d16
Update README.md 2017-12-20 16:52:36 +00:00
Harvey Kandola
00070d7f0d added screenshot to README 2017-12-20 16:51:32 +00:00
Harvey Kandola
d0f28daa7c edge case detection for page numbering logic 2017-12-20 11:49:09 +00:00
Harvey Kandola
ebdaa9529c no need for SHA on CodeMirror assets 2017-12-20 11:37:14 +00:00
Harvey Kandola
e897b078fd bump ember version in readme 2017-12-20 09:05:25 +00:00
Harvey Kandola
c3a2717bfa
Merge pull request #126 from documize/nov-17-improvements
All new UX
2017-12-20 08:33:08 +00:00
Harvey Kandola
34d7a97ae8 removed empty line 2017-12-20 08:27:46 +00:00
Harvey Kandola
43d3e84573 latest build assets 2017-12-19 20:00:36 +00:00
Harvey Kandola
50a17256e5 setup UX improvements 2017-12-19 17:58:22 +00:00
Harvey Kandola
ca783dd323 fixed bug with app boot 2017-12-19 16:52:40 +00:00
Harvey Kandola
4de19dcbec print improvements 2017-12-19 14:27:17 +00:00
Harvey Kandola
8b05e7ab81 switch to doc content view when clicking on TOC entry 2017-12-19 14:00:53 +00:00
Harvey Kandola
44970a7861 upgrade to Ember 2.17.x 2017-12-18 15:05:12 +00:00
Harvey Kandola
0336f84a83 CodeMirror dependency upgraded to v5.32.0
For handling Markdown and Code section types
2017-12-18 13:10:51 +00:00
Harvey Kandola
3337db6b27 ensure section updates always display latest numbering 2017-12-18 09:54:09 +00:00
Harvey Kandola
1ed6427532 open/edit doc templates 2017-12-16 16:01:22 +00:00
Harvey Kandola
5d3ddaa2d9 edit/delete reusable content blocks 2017-12-15 18:43:22 +00:00
Harvey Kandola
f72b02cbb2 tweak start section button style 2017-12-15 16:47:44 +00:00
Harvey Kandola
af7e089764 add document section UX 2017-12-15 16:14:44 +00:00
Harvey Kandola
a728f14d41 push doc toc down the side bar 2017-12-15 13:56:37 +00:00
Harvey Kandola
9afc4ca98b removed start-document redundant code 2017-12-15 13:44:32 +00:00
Harvey Kandola
ab475ede04 doc start: empty, template, import 2017-12-15 13:41:20 +00:00
Harvey Kandola
e25f23e94c removed TOc dead code 2017-12-14 20:02:49 +00:00
Harvey Kandola
26243a5a55 improved TOC resizer logic 2017-12-14 19:10:26 +00:00
Harvey Kandola
c449bdcd16 removed rogue console.log 2017-12-14 16:54:13 +00:00
Harvey Kandola
dd45a67537 fixed bug with initial jump to page scrolling 2017-12-14 16:50:30 +00:00
Harvey Kandola
6f1b0564e2 improved TOC/page jumps 2017-12-14 16:48:12 +00:00
Harvey Kandola
215f644d11 dispose of interact object 2017-12-14 14:07:40 +00:00
Harvey Kandola
3329942d8a responsive doc TOC 2017-12-14 13:25:05 +00:00
Harvey Kandola
b339df5125 WIP sticky doc toc with sticky toc toolbox 2017-12-12 18:30:39 +00:00
Harvey Kandola
e158c9f0f8 WIP document TOC for widescreen displays 2017-12-12 16:21:05 +00:00
Harvey Kandola
4cf8c34ebd fixed forgot css 2017-12-11 21:02:49 +00:00
Harvey Kandola
3f2edcaa96 removed redundant colors, widgets 2017-12-11 20:59:28 +00:00
Harvey Kandola
869884abda upgraded js libs 2017-12-11 14:57:29 +00:00
Harvey Kandola
daf61dfe9f removed unused libs 2017-12-11 14:50:11 +00:00
Harvey Kandola
cc1c216754 removed redundant UI code 2017-12-11 14:39:12 +00:00
Harvey Kandola
5edd08ee04 fixed form submit for document title editing 2017-12-11 13:54:38 +00:00
Harvey Kandola
e61b2d0aa8 document view revisions UX 2017-12-11 13:45:56 +00:00
Harvey Kandola
66bc874d95 view activity date formatting 2017-12-11 12:34:54 +00:00
Harvey Kandola
cce1b5ef50 document view activity 2017-12-11 12:04:48 +00:00
Harvey Kandola
486b5983d9 document attachments view 2017-12-11 11:40:12 +00:00
Harvey Kandola
6cc78f76da go fmt fixes 2017-12-11 09:47:37 +00:00
Harvey Kandola
c5c988709d page numbering engine 2017-12-10 14:05:23 +00:00
Harvey Kandola
5de856e579 removed upgrade file 2017-12-09 12:45:32 +00:00
Harvey Kandola
2da0089c1c inymce upgrade 4.7.4 2017-12-09 12:42:35 +00:00
Harvey Kandola
9dcaf697a8 section UX complete 2017-12-09 12:21:14 +00:00
Harvey Kandola
c12d66643c github smart section UX 2017-12-08 18:03:25 +00:00
Harvey Kandola
0eef10e586 reworked smart section UX 2017-12-08 17:42:54 +00:00
Harvey Kandola
57b3801f87 WIP section editors UX 2017-12-08 17:24:39 +00:00
Harvey Kandola
35947ffbfc direct 401 API calls and redirect to login page 2017-12-08 14:34:21 +00:00
Harvey Kandola
23a6b25b0a content linker styled using standard list picker control 2017-12-07 20:47:26 +00:00
Harvey Kandola
db1b3aef8c WIP content linker UX 2017-12-07 19:43:46 +00:00
Harvey Kandola
531e9c88d7 garvatar initials bold 2017-12-07 11:04:44 +00:00
Harvey Kandola
13a879a89b page toolbar 2017-12-06 19:56:51 +00:00
Harvey Kandola
836b7f3fb4 WIP document view 2017-12-05 19:03:38 +00:00
Harvey Kandola
72615ba77b new document toolbar 2017-12-05 11:47:10 +00:00
Harvey Kandola
9fd53142f3 filter docs by category, search query params 2017-12-05 11:34:18 +00:00
Harvey Kandola
666ab3151e document tag editor 2017-12-05 10:46:53 +00:00
Harvey Kandola
8415f11303 document category picker 2017-12-04 17:25:33 +00:00
Harvey Kandola
60fb4e5008 WIP document view 2017-12-04 14:47:44 +00:00
Harvey Kandola
2d7e3c2904 revised color theme 2017-12-01 12:41:42 +00:00
Harvey Kandola
e8785f5420 include auth.scss file and redirect once on logout 2017-11-30 14:37:47 +00:00
Harvey Kandola
7188324714 setup UI 2017-11-29 11:20:04 +00:00
Harvey Kandola
fbb6f3485d search UI 2017-11-29 11:09:54 +00:00
Harvey Kandola
95bb440a65 user admin UX 2017-11-29 10:31:00 +00:00
Harvey Kandola
79531e01b3 auth settings ne wUI 2017-11-28 12:49:48 +00:00
Harvey Kandola
75aa00beca refactored license/smtp/genral settings UI 2017-11-28 12:27:50 +00:00
Harvey Kandola
fd6b4c051b restructure CSS files 2017-11-28 11:32:14 +00:00
Harvey Kandola
68f5008a52 responsive login, profile new UX 2017-11-28 10:06:39 +00:00
Harvey Kandola
2ba948bc82 onboard new UX 2017-11-27 19:33:42 +00:00
Harvey Kandola
102f0c3800 auth page UX update 2017-11-27 19:07:36 +00:00
Harvey Kandola
533a0f094e tooltip rendering bug 2017-11-27 16:17:17 +00:00
Harvey Kandola
1f0fc844a8 new UX for category management 2017-11-27 15:38:39 +00:00
Harvey Kandola
1c08a7fbcf [WIP] space permissions UX 2017-11-24 12:50:06 +00:00
Harvey Kandola
e10313b7cc upgraded material icon fonts, space invite popup UX 2017-11-23 20:40:46 +00:00
Harvey Kandola
18fc5db8c6 [WIP] refactoring start document UX 2017-11-22 17:27:09 +00:00
Harvey Kandola
aee9345886 move documents new UX 2017-11-22 16:28:17 +00:00
Harvey Kandola
bae1245d47 delete docs moved to new UX 2017-11-22 13:39:46 +00:00
Harvey Kandola
9cbee80f51 delete space, pin space migrated to new UX 2017-11-22 11:02:35 +00:00
Harvey Kandola
acc947c2ed [WIP ]space view
Document list renders as per design
2017-11-21 14:47:49 +00:00
Harvey Kandola
4bc08cbdee new spaces view
New modal dialog framework used for Add Space.
2017-11-20 13:01:44 +00:00
Harvey Kandola
ec5d21be4a [WIP] using new components 2017-11-17 11:31:54 +00:00
Harvey Kandola
b31ab712c1 upgraded Ember and integrated Bootstrap 4
Upgraded to Ember JS 2.16.x release. This upgrade uses the new JavaScript modules API syntax.

Integrated Bootstrap 4 Beta 2 via package.json and associated popper.js library. Overridden Bootstrap styles using bootstrap.scss -- this file selectively imports the modules we need.
2017-11-16 13:28:05 +00:00
Harvey Kandola
0f04be4ea1 upgrade to latest ember deps 2017-11-15 13:05:59 +00:00
Harvey Kandola
f35fdab9ba user delete -- dismiss dialog via Ember mixin 2017-11-07 10:27:21 -05:00
Harvey Kandola
e265323a90 document unpin bug 2017-10-31 15:59:56 -04:00
Harvey Kandola
2b642f25d3 boosted SQL maxAllowedPacket 2017-10-29 19:49:11 -04:00
Harvey Kandola
5ad905a576 better print/pdf output rendering 2017-10-13 12:07:19 -04:00
Harvey Kandola
cb6dce9613 latest embedded assets 2017-10-12 07:18:53 -04:00
Harvey Kandola
1e3f8e51f0 sticky form headers, category improvements, dropdown improvements 2017-10-11 16:05:24 -04:00
Harvey Kandola
785d12191e choose icon for empty state control 2017-10-10 16:39:39 -04:00
Harvey Kandola
38b401f646 improved empty state and dropdown positions 2017-10-10 16:02:46 -04:00
Harvey Kandola
c77b384215 space related bug fixesx 2017-10-09 10:56:59 -04:00
Harvey Kandola
f2794a9836 Merge pull request #121 from documize/granular-permissions
Granular permissions
2017-10-08 21:09:08 -04:00
Harvey Kandola
d9eda2a0ff latest build assets 2017-10-08 21:08:50 -04:00
Harvey Kandola
e44837c8db Merge branch 'master' into granular-permissions 2017-10-08 21:07:45 -04:00
Harvey Kandola
41340a7b15 latest embed assets 2017-10-08 21:02:14 -04:00
Harvey Kandola
318abef710 bulk data load methods for space and document views 2017-10-08 20:53:25 -04:00
Harvey Kandola
bc72db711f added sql indexes 2017-10-08 11:26:58 -04:00
Harvey Kandola
82c381de0d updated readme 2017-10-07 11:39:02 -04:00
Harvey Kandola
94f52760ec updated readme 2017-10-07 09:06:42 -04:00
Harvey Kandola
f5c819331d space invitation process endpoint change 2017-10-06 15:19:35 -04:00
Harvey Kandola
8680237016 latest build assets 2017-10-06 14:17:09 -04:00
Harvey Kandola
b8d848549e improved setup process and space view rendering 2017-10-06 13:59:58 -04:00
Harvey Kandola
b2138d6bdb space view labels 2017-10-05 19:33:59 -04:00
Harvey Kandola
604bdf78da improve print css 2017-10-05 16:37:00 -04:00
Harvey Kandola
de384f2412 returns users you can see spaces 2017-10-05 15:02:39 -04:00
Harvey Kandola
c8dc284d03 css tweaks 2017-10-05 11:41:53 -04:00
Harvey Kandola
0e00085f81 highlight current page on document TOC 2017-10-04 14:50:10 -04:00
Harvey Kandola
ab7a515b9d secure category list when viewing document 2017-10-04 14:42:07 -04:00
Harvey Kandola
1d2109aa44 upgraded gorilla mux dependency, improved anon viewing 2017-10-04 14:02:03 -04:00
Harvey Kandola
7ce3adb65e anon user space/categopry handling 2017-10-04 13:27:48 -04:00
Harvey Kandola
30321781c2 implemented view users permission 2017-10-04 12:27:56 -04:00
Harvey Kandola
f5f30d2322 user/account store loading 2017-10-03 17:52:03 -04:00
Harvey Kandola
620fe28b27 global space admin re-worked 2017-10-03 09:50:38 -04:00
Harvey Kandola
ba5988dca3 select space root or category docs 2017-10-02 13:48:37 -04:00
Harvey Kandola
8d761da939 delete space, mov doc edge cases 2017-09-26 20:13:44 +01:00
Harvey Kandola
5481de4e1c document list: show by selected space/category 2017-09-26 16:30:16 +01:00
Harvey Kandola
2cee83d570 refactored, improved doc import routine to show progress 2017-09-26 10:12:46 +01:00
Harvey Kandola
a0a1dd396a [WIP] moved start-document functionality, reworked folder view
WIP -- import files still BROKEN
2017-09-25 19:14:33 +01:00
Harvey Kandola
8f80673cde removed named sql statements 2017-09-25 14:37:11 +01:00
Harvey Kandola
9ccd0fd19c document tag editor re-vamped 2017-09-25 11:52:26 +01:00
Harvey Kandola
d6e18b4289 explicit account table column selecttion 2017-09-25 09:27:04 +01:00
Harvey Kandola
37563632ef improved self-host multi-tenant detection 2017-09-24 19:50:21 +01:00
Harvey Kandola
1b548ea03e commented out domain match check during auth 2017-09-24 18:02:24 +01:00
Harvey Kandola
f0582e18f7 add category to document 2017-09-22 17:23:14 +01:00
Harvey Kandola
508ec00c6a restrict user lists based on account.users permission 2017-09-22 10:22:52 +01:00
Harvey Kandola
b56d3426d2 ember-truth-helpers, allow for no category viewers 2017-09-22 08:52:11 +01:00
Harvey Kandola
3a9675eb14 refined category permission checks 2017-09-21 18:59:43 +01:00
Harvey Kandola
4d989e2497 dropdown mixin to handle dialog open/close lifecycle 2017-09-21 16:27:36 +01:00
Harvey Kandola
3f31d6d15e category permission admin, re-vamped view layout 2017-09-21 15:48:00 +01:00
Harvey Kandola
0c152c219f improved favorite JS code 2017-09-20 08:28:41 +01:00
Harvey Kandola
775990f040 navigation merged into left sidebar 2017-09-20 08:10:43 +01:00
Harvey Kandola
ea38729f55 edit category 2017-09-19 18:55:33 +01:00
Harvey Kandola
4874d23f15 space categorty management 2017-09-19 17:58:33 +01:00
Harvey Kandola
a86d52388e improved tooltips 2017-09-19 09:21:51 +01:00
Harvey Kandola
6a651770b5 refactored permission code 2017-09-18 17:53:42 +01:00
Harvey Kandola
c12c000ef3 re-position space heading and toolbars 2017-09-18 14:13:34 +01:00
Harvey Kandola
c4c95a9d24 revised calc for space type 2017-09-18 13:50:44 +01:00
Harvey Kandola
cd543a1506 force space delete 2017-09-18 13:35:51 +01:00
Harvey Kandola
300b617583 using all new permissions for securing spaces and documents
WIP
2017-09-18 13:02:15 +01:00
Harvey Kandola
ef285c91de persist permissions
WIP
2017-09-15 11:08:05 +01:00
Harvey Kandola
5f7c6d211f new permission endpoint
WIP
2017-09-14 12:54:57 +01:00
Harvey Kandola
ae05cacf3f re-working space permissions -- WIP 2017-09-13 19:22:38 +01:00
Samuel Reeve
eae1a9a429 Organization store test 2017-09-13 12:53:56 +01:00
Harvey Kandola
c51ba65b1d New schema for permissions and roles management 2017-09-12 09:59:43 +01:00
Harvey Kandola
fbf2222eda latest build embed assets 2017-09-10 19:30:02 +01:00
Harvey Kandola
2386dcbd83 improved url domain matching for multi-tenant deployments 2017-09-08 19:41:46 +01:00
Samuel Reeve
e92ad317d8 Space store tests
Test all space database operations
2017-09-05 13:41:56 +01:00
Harvey Kandola
42b86b0513 address js lint warning 2017-09-05 12:21:18 +01:00
Harvey Kandola
f4f2f5c032 readme changes 2017-09-04 09:58:11 +01:00
Harvey Kandola
0de060138d bumped ember version + yarn 2017-09-04 09:56:09 +01:00
Harvey Kandola
66497d5407 test teardown 2017-09-01 16:29:51 +01:00
Harvey Kandola
6ecf5a87cd test space update 2017-09-01 15:57:10 +01:00
Harvey Kandola
d6a17d5a56 subtests 2017-09-01 15:28:05 +01:00
Harvey Kandola
dba57a15a8 removed embed init() for unit testing 2017-09-01 14:11:09 +01:00
Harvey Kandola
a982af6e79 permission screen UI overflow fix
1. handle long username overflow on space permissions screen
2. only show document history to editors
3. removed redundant document editing permission check
4. Ensure subdomain is detected when accepting space invitation
2017-08-31 18:01:07 +01:00
Harvey Kandola
e505bb36e2 Add dbtype command line switch and improved database type detection
Closes #116 and #117
2017-08-30 13:00:07 +01:00
Harvey Kandola
d3512b499a improved setup wizard redirection 2017-08-29 17:55:41 +01:00
Harvey Kandola
8081b60146 set defaults for request context 2017-08-27 16:39:09 +01:00
Harvey Kandola
63b24aed3f clone space options expandable 2017-08-24 14:04:05 +01:00
Harvey Kandola
c235fb569e bumped version 2017-08-22 17:23:30 +01:00
Harvey Kandola
07c8238664 Merge branch 'space-templates' 2017-08-21 18:54:55 +01:00
Harvey Kandola
5a2c44717e clone reusable content blocks 2017-08-21 18:47:59 +01:00
Harvey Kandola
bf390ed0b9 clone space! 2017-08-21 17:51:06 +01:00
Harvey Kandola
81cd22e130 fix for starting new document from empty template 2017-08-21 07:58:34 +01:00
Harvey Kandola
866b4eba8a wip 2017-08-21 07:43:18 +01:00
Harvey Kandola
17db964b10 new document commit tweak 2017-08-18 14:31:36 +01:00
Harvey Kandola
adbe93a28a latest release assets 2017-08-18 13:02:00 +01:00
Harvey Kandola
5b70ffd954 chained bulk doc delete promises 2017-08-17 18:31:19 +01:00
Harvey Kandola
eeb3d8f070 get list of visible users
Which users can you see?
2017-08-17 13:47:43 +01:00
Harvey Kandola
f3c7f0eca7 trim SMTP credentials 2017-08-17 10:34:12 +01:00
Harvey Kandola
558d90d2ba per space templates 2017-08-17 09:37:33 +01:00
Harvey Kandola
574139ae21 Update README.md 2017-08-16 12:37:09 +01:00
Harvey Kandola
a306ca2fcd Merge pull request #115 from documize/search-revamp
Search revamp
2017-08-16 12:35:28 +01:00
Harvey Kandola
599b961a38 enhanced DB migration process 2017-08-16 11:46:56 +01:00
Harvey Kandola
b2a5bc8451 bump version 2017-08-16 11:00:40 +01:00
Harvey Kandola
d4463b5aaa rogue one (bracket) 2017-08-15 20:29:35 +01:00
Harvey Kandola
1b96c9093f add entries to search index 2017-08-15 19:41:44 +01:00
SamReeve96
19ae74b388 Windows build .bat 2017-08-15 14:38:32 +01:00
Harvey Kandola
2c5f73a486 new search options and schema 2017-08-15 14:15:31 +01:00
Harvey Kandola
6c3042fd4e removed redundant params to license change event 2017-08-10 15:47:03 +01:00
Harvey Kandola
7d0c1a3922 latest embedded assets 2017-08-10 13:22:13 +01:00
Harvey Kandola
4ff78efef2 Merge pull request #114 from documize/inject-domain
All new architecture for backend API
2017-08-10 12:51:49 +01:00
Harvey Kandola
4fc83c9734 Merge branch 'master' into inject-domain 2017-08-10 12:51:44 +01:00
Harvey Kandola
888569d070 setup mode message & license change callback params 2017-08-10 12:38:05 +01:00
Harvey Kandola
4b24cbc686 send ready signal after HTTP server init 2017-08-10 11:14:29 +01:00
Harvey Kandola
00c2d17fcb utf8mb4, MariaDB, pluggable stiorage provider
Closes #109, #102, #74
2017-08-09 16:18:03 +01:00
Harvey Kandola
db1af55c6c Experimental MariaDB support
Closes #74 and #102
2017-08-08 18:21:38 +01:00
Harvey Kandola
d45aa70157 sidebar position 2017-08-08 14:24:24 +01:00
Harvey Kandola
9e20a5f085 manifest.json 2017-08-08 11:24:21 +01:00
Harvey Kandola
557da2847e bug fixes galore 2017-08-07 14:42:02 +01:00
Harvey Kandola
62b7b149c1 updated vendored deps 2017-08-04 13:42:59 +01:00
Harvey Kandola
0ee2903608 latest build assets 2017-08-04 13:17:19 +01:00
Harvey Kandola
4046accc23 latest build assets 2017-08-04 13:17:09 +01:00
Harvey Kandola
476403bf46 wrap errors up, log at top level only 2017-08-03 10:00:24 +01:00
Harvey Kandola
ecc94f31c9 changed indexer coupling 2017-08-02 15:58:39 +01:00
Harvey Kandola
562872a4a8 removed old API 2017-08-02 15:26:31 +01:00
Harvey Kandola
e284a46f86 first pass of code move to new API 2017-08-02 12:39:12 +01:00
Harvey Kandola
5e2c96bf5b templates moved to new API 2017-08-02 11:46:45 +01:00
Harvey Kandola
23e111f60d keycloak integration code moved to new API 2017-08-02 10:29:25 +01:00
Harvey Kandola
d5bc9bb7cb page codebase moved to new API 2017-08-01 15:35:13 +01:00
Harvey Kandola
f7bcf1366c block code moved to new API 2017-08-01 11:33:16 +01:00
Harvey Kandola
7faf6d6cff search indexing process coupling 2017-08-01 10:39:07 +01:00
Harvey Kandola
65390ab67d refactored document & search codebase to new API 2017-07-31 18:17:30 +01:00
Harvey Kandola
7756a50d64 removed rogue pkg reference! 2017-07-31 13:40:01 +01:00
Harvey Kandola
d90b3249c3 still moving codebase to new API (WIP) 2017-07-26 20:03:23 +01:00
Harvey Kandola
72b14def6d moving endpoints to new API (WIP) 2017-07-26 10:50:26 +01:00
Harvey Kandola
27640dffc4 pointers to Runtime! 2017-07-24 19:10:49 +01:00
Harvey Kandola
792c3e2ce8 major code repair from old to new API -- WIP 2017-07-24 16:24:21 +01:00
Harvey Kandola
25b576f861 cosmetics 2017-07-21 18:21:34 +01:00
Harvey Kandola
d888962082 refactored routing/web serving logic 2017-07-21 18:14:19 +01:00
Harvey Kandola
76d77bef9b server init moved to new logger 2017-07-21 14:53:32 +01:00
Harvey Kandola
1f713c11b6 comments 2017-07-21 14:11:57 +01:00
Harvey Kandola
3defc062bd refactored smart section code 2017-07-21 13:39:53 +01:00
Harvey Kandola
5acfae3d0d refactored salt code 2017-07-21 12:20:13 +01:00
Harvey Kandola
6fd6bc6d26 Fixes #105 2017-07-20 18:46:11 +01:00
Harvey Kandola
56238b00c5 latest embed assets 2017-07-20 12:56:50 +01:00
Harvey Kandola
89cfbf3e48 Merge pull request #104 from documize/tech-debt
Tech debt
2017-07-20 12:37:48 +01:00
Harvey Kandola
d85218ccd2 refactored runtime boot code 2017-07-20 12:30:03 +01:00
Harvey Kandola
bc49041359 fixed #103 and bumped version
bumped version
fixed #103
2017-07-20 11:37:38 +01:00
Harvey Kandola
763bd1f0e2 check parsed flags 2017-07-20 10:48:27 +01:00
Harvey Kandola
68130122e7 refactored flag/env loading 2017-07-19 18:47:01 +01:00
Harvey Kandola
dc49dbbeff moved emberjs to gui folder 2017-07-19 14:48:33 +01:00
Harvey Kandola
6a18d18f91 renamed ember app folder to gui 2017-07-19 14:47:20 +01:00
Harvey Kandola
fe05cf7bb5 refactored unique ID generator package 2017-07-18 22:03:23 +01:00
Harvey Kandola
cf58f8164d major package structure refactoring 2017-07-18 21:55:17 +01:00
Harvey Kandola
7b8cec9a6c renamed env filename 2017-07-18 16:51:41 +01:00
Harvey Kandola
23948aa386 removed gocheck.sh 2017-07-18 14:00:23 +01:00
Harvey Kandola
bcfe638863 removed stock templates for new docs 2017-07-18 13:56:38 +01:00
Harvey Kandola
6e1cca8658 removed obsolete plugin 2017-07-18 13:39:32 +01:00
Harvey Kandola
b6616d4965 main.go rejig 2017-07-18 13:17:20 +01:00
Harvey Kandola
7455a027fc removed experimental code 2017-07-18 13:10:52 +01:00
Harvey Kandola
fddaf9effe improved setup mode detection 2017-07-18 11:13:20 +01:00
Harvey Kandola
761d3c212c meta.json added 2017-07-17 13:29:43 +01:00
Harvey Kandola
69e90ec56a build 1.49.1 prep 2017-07-17 11:55:40 +01:00
Harvey Kandola
34527d76e2 upgraded sortable.js lib 2017-07-17 11:50:29 +01:00
Harvey Kandola
d4062db02d Activate newly added users
Fixes #101
2017-07-17 11:50:01 +01:00
Harvey Kandola
3d6727ff4c Fixes issue with auth login redirect failure 2017-07-17 10:28:32 +01:00
Harvey Kandola
a8e8d141d2 Upgraded to latest JS SPA release 2017-07-14 12:58:33 +01:00
Harvey Kandola
7397812307 editors can add sections 2017-06-23 14:07:06 -04:00
Harvey Kandola
567d49f794 Delete Icon 2017-06-19 11:47:05 -04:00
Harvey Kandola
3c1306d178 Delete Icon 2017-06-19 11:46:54 -04:00
Harvey Kandola
b1b1544d60 Delete Icon 2017-06-19 11:39:07 -04:00
Harvey Kandola
19baae5a3f latest embed assets 2017-06-11 16:18:44 -04:00
Harvey Kandola
d46c32c7a2 bump version 2017-06-11 15:23:09 -04:00
Harvey Kandola
86dcbbd684 accept .markdown files and trap fro no spaces on space admin screen 2017-06-11 15:20:48 -04:00
Harvey Kandola
bbcba8eb18 self-host enhancements for Word/PDF handling 2017-06-06 19:00:35 -04:00
3972 changed files with 578764 additions and 811961 deletions

View file

@ -1,3 +1,6 @@
.DS_Store .DS_Store
.git .git
bin bin
.idea
selfcert
gui/dist-prod

40
.gitignore vendored
View file

@ -18,8 +18,9 @@ _convert
bin/* bin/*
dist/* dist/*
embed/bindata/* embed/bindata/*
app/dist/* edition/static/*
app/dist-prod/* gui/dist/*
gui/dist-prod/*
# Architecture specific extensions/prefixes # Architecture specific extensions/prefixes
*.[568vq] *.[568vq]
@ -38,28 +39,35 @@ _testmain.go
/plugin-libreoffice/plugin-libreoffice-osx /plugin-libreoffice/plugin-libreoffice-osx
# Ember specific # Ember specific
/app/dist /gui/dist
/app/dist-prod /gui/dist-prod
/app/tmp /gui/tmp
/app/bower_components /gui/bower_components
/app/node_modules /gui/node_modules
/app/.sass-cache /gui/.sass-cache
/app/connect.lock /gui/connect.lock
/app/coverage/* /gui/coverage/*
/app/libpeerconnection.log /gui/libpeerconnection.log
/app/npm-debug.log /gui/npm-debug.log
/app/testem.log /gui/testem.log
node_modules node_modules
# Misc. # Misc.
build
plugin-msword/plugin-msword plugin-msword/plugin-msword
plugin-msword/plugin-msword-osx plugin-msword/plugin-msword-osx
npm-debug.log npm-debug.log
debug debug
*.pem *.pem
*.crt *.crt
Dockerfile
container.sh container.sh
make.sh make.sh
jsconfig.json jsconfig.json
yarn-error.log
testem.log
# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
embed/bindata_assetfs.go
dmz-backup*.zip
*.conf

View file

@ -1,62 +0,0 @@
{
"css": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"newline_between_rules": true,
"selector_separator_newlines": true
},
"scss": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"newline_between_rules": true,
"selector_separator_newlines": true
},
"html": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"preserve_newlines": true,
"max_preserve_newlines": 2,
"wrap_line_length": 0,
"indent_handlebars": true,
"indent_inner_html": false,
"indent_scripts": "keep"
},
"hbs": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"max_preserve_newlines": 2,
"preserve_newlines": true,
"wrap_line_length": 0
},
"js": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true,
"preserve_newlines": true,
"wrap_line_length": 0,
"break_chained_methods": false,
"max_preserve_newlines": 2,
"jslint_happy": true,
"brace_style": "collapse-preserve-inline",
"keep_function_indentation": false,
"space_after_anon_function": false,
"space_before_anon_function": false,
"space_before_conditional": true,
"space_in_empty_paren": false,
"space_before_func_paren": false,
"space_in_paren": false
},
"sql": {
"indent_size": 4,
"indent_level": 0,
"indent_with_tabs": true
}
}

View file

@ -1,4 +0,0 @@
app/public/tinymce/**
app/public/tinymce/
app/public/tinymce

View file

@ -1,3 +1,3 @@
Please see this document for contribution guidelines and process: Please see this document for contribution guidelines and process:
https://developers.documize.com/s/leFaXwlU/open-source/d/VzO94aMOCgABGyfe/contributing https://docs.documize.com/s/leFaXwlU/open-source/d/VzO94aMOCgABGyfe/contributing

32
Dockerfile Normal file
View file

@ -0,0 +1,32 @@
FROM node:16-alpine as frontbuilder
WORKDIR /go/src/github.com/documize/community/gui
COPY ./gui /go/src/github.com/documize/community/gui
RUN npm --network-timeout=100000 install
RUN npm run build -- --environment=production --output-path dist-prod --suppress-sizes true
FROM golang:1.21-alpine as builder
WORKDIR /go/src/github.com/documize/community
COPY . /go/src/github.com/documize/community
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/assets /go/src/github.com/documize/community/edition/static/public/assets
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/codemirror /go/src/github.com/documize/community/edition/static/public/codemirror
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/prism /go/src/github.com/documize/community/edition/static/public/prism
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/sections /go/src/github.com/documize/community/edition/static/public/sections
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/tinymce /go/src/github.com/documize/community/edition/static/public/tinymce
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/pdfjs /go/src/github.com/documize/community/edition/static/public/pdfjs
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/i18n /go/src/github.com/documize/community/edition/static/public/i18n
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/*.* /go/src/github.com/documize/community/edition/static/
COPY --from=frontbuilder /go/src/github.com/documize/community/gui/dist-prod/i18n/*.json /go/src/github.com/documize/community/edition/static/i18n/
COPY domain/mail/*.html /go/src/github.com/documize/community/edition/static/mail/
COPY core/database/templates/*.html /go/src/github.com/documize/community/edition/static/
COPY core/database/scripts/mysql/*.sql /go/src/github.com/documize/community/edition/static/scripts/mysql/
COPY core/database/scripts/postgresql/*.sql /go/src/github.com/documize/community/edition/static/scripts/postgresql/
COPY core/database/scripts/sqlserver/*.sql /go/src/github.com/documize/community/edition/static/scripts/sqlserver/
COPY domain/onboard/*.json /go/src/github.com/documize/community/edition/static/onboard/
RUN env GODEBUG=tls13=1 go build -mod=vendor -o bin/documize-community ./edition/community.go
# build release image
FROM alpine:3.16
RUN apk add --no-cache ca-certificates
COPY --from=builder /go/src/github.com/documize/community/bin/documize-community /documize
EXPOSE 5001
ENTRYPOINT [ "/documize" ]

2572
NOTICES.md Normal file

File diff suppressed because it is too large Load diff

109
README.md
View file

@ -1,53 +1,110 @@
# Documize Community Edition Documize Community is an open source, modern, self-hosted, enterprise-grade knowledge management solution.
Documize is an Integrated Document Environment (IDE) unifying documents, wiki, reporting and dashboards -- one tool to power the enterprise-wide knowledge backbone. - Built for technical and non-technical users
- Designed to unify both customer-facing and internal documentation
- Organization through labels, spaces and categories
![Alt text](screenshot.png "Documize") It's built with Golang + EmberJS and compiled down to a single executable binary that is available for Linux, Windows and Mac.
The mission is to bring software dev inspired features (refactoring, testing, linting, metrics, PRs) to those poor souls stuck writing docs in the dark ages. All you need to provide is your database -- PostgreSQL, Microsoft SQL Server or any MySQL variant.
## Latest version ![Documize Community](https://github.com/documize/community/blob/master/screenshot.png?raw=true)
v1.47.2 ## Latest Release
[Community edition: v5.13.0](https://github.com/documize/community/releases)
[Community+ edition: v5.13.0](https://www.documize.com/community/get-started)
The Community+ edition is the "enterprise" offering with advanced capabilities and customer support:
- content approval workflows
- content organization by label, space and category
- content version management
- content lifecycle management
- content feedback capture
- content PDF export
- analytics and reporting
- activity streams
- audit logs
- actions assignments
- product support
The Community+ edition is [free](https://www.documize.com/community/get-started) for the first five users -- thereafter pricing starts at just $900 annually for 100 users.
## OS Support ## OS Support
- Windows
- Linux - Linux
- Windows
- macOS - macOS
- Raspberry Pi (ARM build)
## Tech stack Support for AMD and ARM 64 bit architectures.
- EmberJS (v2.12.0) ## Database Support
- Go (v1.8)
- MySQL (v5.7.10+) or Percona (v5.7.16-10+)
## Documentation For all database types, Full-Text Search (FTS) support is mandatory.
<https://docs.documize.com> - PostgreSQL (v9.6+)
- Microsoft SQL Server (2016+ with FTS)
- Microsoft SQL Azure (v12+)
- MySQL (v5.7.10+ and v8.0.12+)
- Percona (v5.7.16-10+)
- MariaDB (10.3.0+)
## Keycloak Integration ## Browser Support
Documize provides out-of-the-box integration with [Redhat Keycloak](http://www.keycloak.org) for open source identity and access management. - Firefox
- Chrome
- Safari
- Microsoft Edge
- Brave
- Vivaldi
- Opera
Connect and authenticate with LDAP, Active Directory and more. ## Technology Stack
<https://docs.documize.com> - Go (v1.23.4)
- Ember JS (v3.12.0)
## Auth0 Compatible ## Authentication Options
Documize is compatible with Auth0 identity as a service. Besides email/password login, you can also authenticate via:
[![JWT Auth for open source projects](https://cdn.auth0.com/oss/badges/a0-badge-dark.png)](https://auth0.com/?utm_source=oss&utm_medium=gp&utm_campaign=oss) * LDAP
* Active Directory
* Red Hat Keycloak
* Central Authentication Service (CAS)
Open Source Identity and Access Management When using LDAP/Active Directory, you can enable dual-authentication with email/password.
## Word Conversion to HTML ## Localization
- [Code for `wordconvert` utility](https://github.com/documize/community/tree/master/cmd/wordconvert) Languages supported out-of-the-box:
## Legal - English
- German
- French
- Chinese (中文)
- Portuguese (Brazil) (Português - Brasil)
- Japanese (日本語)
- Italian
- Spanish Argentinian
<https://documize.com> PR's welcome for additional languages.
This software (Documize Community Edition) is licensed under GNU AGPL v3 <http://www.gnu.org/licenses/agpl-3.0.en.html>. You can operate outside the AGPL restrictions by purchasing Documize Enterprise Edition and obtaining a commercial license by contacting <sales@documize.com>. Documize® is a registered trade mark of Documize Inc. ## Product/Technical Support
For both Community and Community+ editions, please contact our help desk for product help, suggestions and other enquiries.
<support@documize.com>
We aim to respond within two working days.
## The Legal Bit
<https://www.documize.com>
This software (Documize Community edition) is licensed under GNU AGPL v3 <http://www.gnu.org/licenses/agpl-3.0.en.html>.
Documize Community uses other open source components and we acknowledge them in [NOTICES](NOTICES.md)

View file

@ -1,4 +0,0 @@
{
"directory": "bower_components",
"analytics": false
}

View file

@ -1,20 +0,0 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4
[*.hbs]
insert_final_newline = false
[*.{diff,md}]
trim_trailing_whitespace = false

View file

@ -1,6 +0,0 @@
public/tinymce/**
public/tinymce/
public/tinymce
public/codemirror/**
public/codemirror/
public/codemirror

View file

@ -1,36 +0,0 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
extends: 'eslint:recommended',
env: {
browser: true,
jquery: true,
qunit: true,
embertest: true
},
rules: {
},
globals: {
"$": true,
"is": true,
"_": true,
"tinymce": true,
"CodeMirror": true,
"Drop": true,
"Mousetrap": true,
"Sortable": true,
"moment": true,
"Dropzone": true,
"Tooltip": true,
"server": true,
"authenticateUser": true,
"stubAudit": true,
"stubUserNotification": true,
"userLogin": true,
"Keycloak": true,
"slug": true
}
};

18
app/.gitignore vendored
View file

@ -1,18 +0,0 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/dist-prod
/tmp
# dependencies
/node_modules
/bower_components
# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log*
testem.log

View file

@ -1,24 +0,0 @@
---
language: node_js
node_js:
- "6"
sudo: false
cache:
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache
before_install:
- npm config set spin false
- npm install -g bower phantomjs-prebuilt
- bower --version
- phantomjs --version
install:
- npm install
- bower install
script:
- npm test

View file

@ -1,3 +0,0 @@
{
"ignore_dirs": ["tmp", "dist", "dist-prod"]
}

View file

@ -1,53 +0,0 @@
# Documize
This README outlines the details of collaborating on this Ember application.
A short introduction of this app could easily go here.
## Prerequisites
You will need the following things properly installed on your computer.
* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)
* [Bower](http://bower.io/)
* [Ember CLI](http://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)
## Installation
* `git clone <repository-url>` this repository
* `cd documize`
* `npm install`
* `bower install`
## Running / Development
* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).
### Code Generators
Make use of the many generators for code, try `ember help generate` for more details
### Running Tests
* `ember test`
* `ember test --server`
### Building
* `ember build` (development)
* `ember build --environment production` (production)
### Deploying
Specify what it takes to deploy your app.
## Further Reading / Useful Links
* [ember.js](http://emberjs.com/)
* [ember-cli](http://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)

View file

@ -1,26 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import Base from 'ember-simple-auth/authenticators/base';
const {
RSVP: { resolve }
} = Ember;
export default Base.extend({
restore(data) {
return resolve(data);
},
authenticate(data) {
return resolve(data);
}
});

View file

@ -1,54 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import Base from 'ember-simple-auth/authenticators/base';
import netUtil from '../utils/net';
const {
isPresent,
RSVP: { resolve, reject },
inject: { service }
} = Ember;
export default Base.extend({
ajax: service(),
appMeta: service(),
kcAuth: service(),
localStorage: service(),
restore(data) {
// TODO: verify authentication data
if (data) {
return resolve(data);
}
return reject();
},
authenticate(data) {
data.domain = netUtil.getSubdomain();
if (!isPresent(data.token) || !isPresent(data.email)) {
return Ember.RSVP.reject("invalid");
}
return this.get('ajax').post('public/authenticate/keycloak', {
data: JSON.stringify(data),
contentType: 'json'
});
},
invalidate() {
this.get('localStorage').clearAll();
return this.get('kcAuth').logout();
}
});

View file

@ -1,15 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
});

View file

@ -1,156 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import constants from '../../utils/constants';
import encoding from '../../utils/encoding';
import NotifierMixin from "../../mixins/notifier";
const {
computed
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
appMeta: Ember.inject.service(),
isDocumizeProvider: computed.equal('authProvider', constants.AuthProvider.Documize),
isKeycloakProvider: computed.equal('authProvider', constants.AuthProvider.Keycloak),
KeycloakUrlError: computed.empty('keycloakConfig.url'),
KeycloakRealmError: computed.empty('keycloakConfig.realm'),
KeycloakClientIdError: computed.empty('keycloakConfig.clientId'),
KeycloakPublicKeyError: computed.empty('keycloakConfig.publicKey'),
KeycloakAdminUserError: computed.empty('keycloakConfig.adminUser'),
KeycloakAdminPasswordError: computed.empty('keycloakConfig.adminPassword'),
keycloakConfig: {
url: '',
realm: '',
clientId: '',
publicKey: '',
adminUser: '',
adminPassword: '',
group: '',
disableLogout: false,
defaultPermissionAddSpace: false
},
didReceiveAttrs() {
this._super(...arguments);
let provider = this.get('authProvider');
switch (provider) {
case constants.AuthProvider.Documize:
// nothing to do
break;
case constants.AuthProvider.Keycloak: // eslint-disable-line no-case-declarations
let config = this.get('authConfig');
if (is.undefined(config) || is.null(config) || is.empty(config) ) {
config = {};
} else {
config = JSON.parse(config);
config.publicKey = encoding.Base64.decode(config.publicKey);
config.defaultPermissionAddSpace = config.hasOwnProperty('defaultPermissionAddSpace') ? config.defaultPermissionAddSpace : false;
config.disableLogout = config.hasOwnProperty('disableLogout') ? config.disableLogout : true;
}
this.set('keycloakConfig', config);
break;
}
},
actions: {
onDocumize() {
this.set('authProvider', constants.AuthProvider.Documize);
},
onKeycloak() {
this.set('authProvider', constants.AuthProvider.Keycloak);
},
onSave() {
let provider = this.get('authProvider');
let config = this.get('authConfig');
switch (provider) {
case constants.AuthProvider.Documize:
config = {};
break;
case constants.AuthProvider.Keycloak:
if (this.get('KeycloakUrlError')) {
this.$("#keycloak-url").focus();
return;
}
if (this.get('KeycloakRealmError')) {
this.$("#keycloak-realm").focus();
return;
}
if (this.get('KeycloakClientIdError')) {
this.$("#keycloak-clientId").focus();
return;
}
if (this.get('KeycloakPublicKeyError')) {
this.$("#keycloak-publicKey").focus();
return;
}
if (this.get('KeycloakAdminUserError')) {
this.$("#keycloak-admin-user").focus();
return;
}
if (this.get('KeycloakAdminPasswordError')) {
this.$("#keycloak-admin-password").focus();
return;
}
config = Ember.copy(this.get('keycloakConfig'));
config.url = config.url.trim();
config.realm = config.realm.trim();
config.clientId = config.clientId.trim();
config.publicKey = config.publicKey.trim();
config.group = is.undefined(config.group) ? '' : config.group.trim();
config.adminUser = config.adminUser.trim();
config.adminPassword = config.adminPassword.trim();
config.defaultPermissionAddSpace = config.hasOwnProperty('defaultPermissionAddSpace') ? config.defaultPermissionAddSpace : true;
config.disableLogout = config.hasOwnProperty('disableLogout') ? config.disableLogout : true;
if (is.endWith(config.url, '/')) {
config.url = config.url.substring(0, config.url.length-1);
}
Ember.set(config, 'publicKey', encoding.Base64.encode(this.get('keycloakConfig.publicKey')));
break;
}
let data = { authProvider: provider, authConfig: JSON.stringify(config) };
this.get('onSave')(data).then(() => {
if (data.authProvider === constants.AuthProvider.Keycloak) {
this.get('onSync')().then((response) => {
if (response.isError) {
this.showNotification(response.message);
data.authProvider = constants.AuthProvider.Documize;
this.get('onSave')(data).then(() => {
this.showNotification('Reverted back to Documize');
});
} else {
if (data.authProvider === this.get('appMeta.authProvider')) {
this.showNotification(response.message);
} else {
this.get('onChange')(data);
}
}
});
} else {
this.showNotification('Saved');
}
});
}
}
});

View file

@ -1,45 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
isEmpty,
computed,
set
} = Ember;
export default Ember.Component.extend({
titleEmpty: computed.empty('model.general.title'),
messageEmpty: computed.empty('model.general.message'),
hasTitleInputError: computed.and('titleEmpty', 'titleError'),
hasMessageInputError: computed.and('messageEmpty', 'messageError'),
actions: {
save() {
if (isEmpty(this.get('model.general.title'))) {
set(this, 'titleError', true);
return $("#siteTitle").focus();
}
if (isEmpty(this.get('model.general.message'))) {
set(this, 'messageError', true);
return $("#siteMessage").focus();
}
this.model.general.set('allowAnonymousAccess', Ember.$("#allowAnonymousAccess").prop('checked'));
this.get('save')().then(() => {
set(this, 'titleError', false);
set(this, 'messageError', false);
});
}
}
});

View file

@ -1,58 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
computed
} = Ember;
export default Ember.Component.extend({
SMTPHostEmptyError: computed.empty('model.smtp.host'),
SMTPPortEmptyError: computed.empty('model.smtp.port'),
SMTPSenderEmptyError: computed.empty('model.smtp.sender'),
SMTPUserIdEmptyError: computed.empty('model.smtp.userid'),
SMTPPasswordEmptyError: computed.empty('model.smtp.password'),
actions: {
saveSMTP() {
if (this.get('SMTPHostEmptyError')) {
$("#smtp-host").focus();
return;
}
if (this.get('SMTPPortEmptyError')) {
$("#smtp-port").focus();
return;
}
if (this.get('SMTPSenderEmptyError')) {
$("#smtp-sender").focus();
return;
}
if (this.get('SMTPUserIdEmptyError')) {
$("#smtp-userid").focus();
return;
}
if (this.get('SMTPPasswordEmptyError')) {
$("#smtp-password").focus();
return;
}
this.get('saveSMTP')().then(() => {
});
},
saveLicense() {
this.get('saveLicense')().then(() => {
window.location.reload();
});
}
}
});

View file

@ -1,202 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import AuthProvider from '../../mixins/auth';
export default Ember.Component.extend(AuthProvider, {
editUser: null,
deleteUser: null,
drop: null,
password: {},
filter: '',
filteredUsers: [],
selectedUsers: [],
hasSelectedUsers: false,
didReceiveAttrs() {
this.users.forEach(user => {
user.set('me', user.get('id') === this.get('session.session.authenticated.user.id'));
user.set('selected', false);
});
this.set('filteredUsers', this.users);
},
willDestroyElement() {
let drop = this.get('drop');
if (is.not.null(drop)) {
drop.destroy();
}
},
onKeywordChange: function () {
Ember.run.debounce(this, this.filterUsers, 350);
}.observes('filter'),
filterUsers() {
let users = this.get('users');
let filteredUsers = [];
let filter = this.get('filter').toLowerCase();
users.forEach(user => {
if (user.get('fullname').toLowerCase().includes(filter) || user.get('email').toLowerCase().includes(filter)) {
filteredUsers.pushObject(user);
}
});
this.set('filteredUsers', filteredUsers);
},
actions: {
toggleSelect(user) {
user.set('selected', !user.get('selected'));
let su = this.get('selectedUsers');
if (user.get('selected')) {
su.push(user.get('id'));
} else {
su = _.reject(su, function(id){ return id === user.get('id') });
}
this.set('selectedUsers', su);
this.set('hasSelectedUsers', su.length > 0);
},
toggleActive(id) {
let user = this.users.findBy("id", id);
user.set('active', !user.get('active'));
this.attrs.onSave(user);
},
toggleEditor(id) {
let user = this.users.findBy("id", id);
user.set('editor', !user.get('editor'));
this.attrs.onSave(user);
},
toggleAdmin(id) {
let user = this.users.findBy("id", id);
user.set('admin', !user.get('admin'));
this.attrs.onSave(user);
},
edit(id) {
let self = this;
let user = this.users.findBy("id", id);
let userCopy = user.getProperties('id', 'created', 'revised', 'firstname', 'lastname', 'email', 'initials', 'active', 'editor', 'admin', 'accounts');
this.set('editUser', userCopy);
this.set('password', {
password: "",
confirmation: ""
});
$(".edit-user-dialog").css("display", "block");
$("input").removeClass("error");
let drop = new Drop({
target: $(".edit-button-" + id)[0],
content: $(".edit-user-dialog")[0],
classes: 'drop-theme-basic',
position: "bottom right",
openOn: "always",
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0"
},
remove: false
});
self.set('drop', drop);
drop.on('open', function () {
self.$("#edit-firstname").focus();
});
},
confirmDelete(id) {
let user = this.users.findBy("id", id);
this.set('deleteUser', user);
$(".delete-user-dialog").css("display", "block");
let drop = new Drop({
target: $(".delete-button-" + id)[0],
content: $(".delete-user-dialog")[0],
classes: 'drop-theme-basic',
position: "bottom right",
openOn: "always",
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0"
},
remove: false
});
this.set('drop', drop);
},
cancel() {
let drop = this.get('drop');
drop.close();
},
save() {
let user = this.get('editUser');
let password = this.get('password');
if (is.empty(user.firstname)) {
$("#edit-firstname").addClass("error").focus();
return;
}
if (is.empty(user.lastname)) {
$("#edit-lastname").addClass("error").focus();
return;
}
if (is.empty(user.email)) {
$("#edit-email").addClass("error").focus();
return;
}
let drop = this.get('drop');
drop.close();
this.attrs.onSave(user);
if (is.not.empty(password.password) && is.not.empty(password.confirmation) &&
password.password === password.confirmation) {
this.attrs.onPassword(user, password.password);
}
},
delete() {
let drop = this.get('drop');
drop.close();
this.set('selectedUsers', []);
this.set('hasSelectedUsers', false);
this.attrs.onDelete(this.get('deleteUser.id'));
},
onBulkDelete() {
let su = this.get('selectedUsers');
su.forEach(userId => {
this.attrs.onDelete(userId);
});
this.set('selectedUsers', []);
this.set('hasSelectedUsers', false);
return true;
}
}
});

View file

@ -1,57 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import AuthProvider from '../../mixins/auth';
const {
isEmpty,
computed,
set,
get
} = Ember;
export default Ember.Component.extend(AuthProvider, {
newUser: { firstname: "", lastname: "", email: "", active: true },
firstnameEmpty: computed.empty('newUser.firstname'),
lastnameEmpty: computed.empty('newUser.lastname'),
emailEmpty: computed.empty('newUser.email'),
hasFirstnameEmptyError: computed.and('firstnameEmpty', 'firstnameError'),
hasLastnameEmptyError: computed.and('lastnameEmpty', 'lastnameError'),
hasEmailEmptyError: computed.and('emailEmpty', 'emailError'),
actions: {
add() {
if (isEmpty(this.get('newUser.firstname'))) {
set(this, 'firstnameError', true);
return $("#newUserFirstname").focus();
}
if (isEmpty(this.get('newUser.lastname'))) {
set(this, 'lastnameError', true);
return $("#newUserLastname").focus();
}
if (isEmpty(this.get('newUser.email')) || is.not.email(this.get('newUser.email'))) {
set(this, 'emailError', true);
return $("#newUserEmail").focus();
}
let user = get(this, 'newUser');
get(this, 'add')(user).then(() => {
this.set('newUser', { firstname: "", lastname: "", email: "", active: true });
set(this, 'firstnameError', false);
set(this, 'lastnameError', false);
set(this, 'emailError', false);
$("#newUserFirstname").focus();
});
}
}
});

View file

@ -1,137 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, {
link: service(),
linkName: '',
keywords: '',
selection: null,
matches: {
documents: [],
pages: [],
attachments: []
},
tabs: [
{ label: 'Section', selected: true },
{ label: 'Attachment', selected: false },
{ label: 'Search', selected: false }
],
contentLinkerButtonId: Ember.computed('page', function () {
let page = this.get('page');
return `content-linker-button-${page.id}`;
}),
showSections: Ember.computed('tabs.@each.selected', function () {
return this.get('tabs').findBy('label', 'Section').selected;
}),
showAttachments: Ember.computed('tabs.@each.selected', function () {
return this.get('tabs').findBy('label', 'Attachment').selected;
}),
showSearch: Ember.computed('tabs.@each.selected', function () {
return this.get('tabs').findBy('label', 'Search').selected;
}),
hasMatches: Ember.computed('matches', function () {
let m = this.get('matches');
return m.documents.length || m.pages.length || m.attachments.length;
}),
init() {
this._super(...arguments);
let self = this;
let folderId = this.get('folder.id');
let documentId = this.get('document.id');
let pageId = this.get('page.id');
this.get('link').getCandidates(folderId, documentId, pageId).then(function (candidates) {
self.set('candidates', candidates);
self.set('hasSections', is.not.null(candidates.pages) && candidates.pages.length);
self.set('hasAttachments', is.not.null(candidates.attachments) && candidates.attachments.length);
});
},
didRender() {
this.addTooltip(document.getElementById("content-linker-button"));
this.addTooltip(document.getElementById("content-counter-button"));
},
willDestroyElement() {
this.destroyTooltips();
},
onKeywordChange: function () {
Ember.run.debounce(this, this.fetch, 750);
}.observes('keywords'),
fetch() {
let keywords = this.get('keywords');
let self = this;
if (_.isEmpty(keywords)) {
this.set('matches', { documents: [], pages: [], attachments: [] });
return;
}
this.get('link').searchCandidates(keywords).then(function (matches) {
self.set('matches', matches);
});
},
actions: {
setSelection(i) {
let candidates = this.get('candidates');
let matches = this.get('matches');
this.set('selection', i);
candidates.pages.forEach(c => {
Ember.set(c, 'selected', c.id === i.id);
});
candidates.attachments.forEach(c => {
Ember.set(c, 'selected', c.id === i.id);
});
matches.documents.forEach(c => {
Ember.set(c, 'selected', c.id === i.id);
});
matches.pages.forEach(c => {
Ember.set(c, 'selected', c.id === i.id);
});
matches.attachments.forEach(c => {
Ember.set(c, 'selected', c.id === i.id);
});
},
onInsertLink() {
let selection = this.get('selection');
if (is.null(selection)) {
return;
}
return this.get('onInsertLink')(selection);
},
onTabSelect(tabs) {
this.set('tabs', tabs);
}
}
});

View file

@ -1,66 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
const {
computed,
} = Ember;
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
documentService: Ember.inject.service('document'),
editMode: false,
docName: '',
docExcerpt: '',
hasNameError: computed.empty('docName'),
hasExcerptError: computed.empty('docExcerpt'),
keyUp(e) {
if (e.keyCode === 27) { // escape key
this.send('onCancel');
}
},
actions: {
toggleEdit() {
this.set('docName', this.get('document.name'));
this.set('docExcerpt', this.get('document.excerpt'));
this.set('editMode', true);
Ember.run.schedule('afterRender', () => {
$('#document-name').select();
});
},
onSave() {
if (this.get('hasNameError') || this.get('hasExcerptError')) {
return;
}
this.set('document.name', this.get('docName'));
this.set('document.excerpt', this.get('docExcerpt'));
this.showNotification('Saved');
this.get('browser').setTitle(this.get('document.name'));
this.get('browser').setMetaDescription(this.get('document.excerpt'));
this.get('documentService').save(this.get('document'));
this.set('editMode', false);
},
onCancel() {
this.set('editMode', false);
}
}
});

View file

@ -1,49 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
revision: null,
hasDiff: Ember.computed('diff', function () {
return this.get('diff').length > 0;
}),
didReceiveAttrs() {
let revisions = this.get('revisions');
revisions.forEach((r) => {
Ember.set(r, 'deleted', r.revisions === 0);
Ember.set(r, 'label', `${r.created} - ${r.firstname} ${r.lastname} - ${r.title}`);
});
if (revisions.length > 0 && is.null(this.get('revision'))) {
this.send('onSelectRevision', revisions[0]);
}
this.set('revisions', revisions);
},
actions: {
onSelectRevision(revision) {
this.set('revision', revision);
if (!revision.deleted) {
this.attrs.onFetchDiff(revision.pageId, revision.id);
}
},
onRollback() {
let revision = this.get('revision');
this.attrs.onRollback(revision.pageId, revision.id);
}
}
});

View file

@ -1,92 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
documentService: Ember.inject.service('document'),
sectionService: Ember.inject.service('section'),
editMode: false,
didReceiveAttrs() {
this._super(...arguments);
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
let page = this.get('page');
this.get('documentService').getPageMeta(page.get('documentId'), page.get('id')).then((meta) => {
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
this.set('meta', meta);
if (this.get('toEdit') === this.get('page.id') && this.get('isEditor')) {
this.send('onEdit');
}
});
},
actions: {
onSavePage(page, meta) {
this.set('page', page);
this.set('meta', meta);
this.set('editMode', false);
this.get('onSavePage')(page, meta);
},
onSavePageAsBlock(block) {
this.attrs.onSavePageAsBlock(block);
},
onCopyPage(documentId) {
this.attrs.onCopyPage(this.get('page.id'), documentId);
},
onMovePage(documentId) {
this.attrs.onMovePage(this.get('page.id'), documentId);
},
onDeletePage(deleteChildren) {
let page = this.get('page');
if (is.undefined(page)) {
return;
}
let params = {
id: page.get('id'),
title: page.get('title'),
children: deleteChildren
};
this.attrs.onDeletePage(params);
},
onEdit() {
if (this.get('editMode')) {
return;
}
this.get('toEdit', '');
// this.set('pageId', this.get('page.id'));
this.set('editMode', true);
},
onCancelEdit() {
this.set('editMode', false);
}
}
});

View file

@ -1,77 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
sectionService: Ember.inject.service('section'),
viewMode: true,
editMode: false,
didInsertElement() {
this.get('sectionService').refresh(this.get('document.id')).then((changes) => {
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
let oldPage = this.get('page');
if (is.undefined(changes) || is.undefined(oldPage)) {
return;
}
changes.forEach((newPage) => {
if (oldPage.get('id') === newPage.get('id')) {
oldPage.set('body', newPage.get('body'));
oldPage.set('revised', newPage.get('revised'));
this.showNotification(`Refreshed ${oldPage.get('title')}`);
}
});
});
},
actions: {
onExpand() {
this.set('pageId', this.get('page.id'));
this.set('expanded', !this.get('expanded'));
},
onSavePageAsBlock(block) {
this.attrs.onSavePageAsBlock(block);
},
onCopyPage(documentId) {
this.attrs.onCopyPage(this.get('page.id'), documentId);
},
onMovePage(documentId) {
this.attrs.onMovePage(this.get('page.id'), documentId);
},
onDeletePage(deleteChildren) {
let page = this.get('page');
if (is.undefined(page)) {
return;
}
let params = {
id: page.get('id'),
title: page.get('title'),
children: deleteChildren
};
this.attrs.onDeletePage(params);
}
}
});

View file

@ -1,316 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
const {
computed,
} = Ember;
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
documentService: Ember.inject.service('document'),
sectionService: Ember.inject.service('section'),
appMeta: Ember.inject.service(),
link: Ember.inject.service(),
hasPages: computed.notEmpty('pages'),
newSectionName: 'Section',
newSectionNameMissing: computed.empty('newSectionName'),
newSectionLocation: '',
beforePage: '',
toEdit: '',
didReceiveAttrs() {
this._super(...arguments);
this.loadBlocks();
Ember.run.schedule('afterRender', () => {
let jumpTo = "#page-" + this.get('pageId');
if (!$(jumpTo).inView()) {
$(jumpTo).velocity("scroll", { duration: 250, offset: -100 });
}
});
},
didRender() {
this._super(...arguments);
this.contentLinkHandler();
},
didInsertElement() {
this._super(...arguments);
this.setupAddWizard();
let self = this;
$(".tooltipped").each(function(i, el) {
self.addTooltip(el);
});
},
willDestroyElement() {
this._super(...arguments);
$('.start-section:not(.start-section-empty-state)').off('.hoverIntent');
this.destroyTooltips();
},
contentLinkHandler() {
let links = this.get('link');
let doc = this.get('document');
let self = this;
$("a[data-documize='true']").off('click').on('click', function (e) {
let link = links.getLinkObject(self.get('links'), this);
// local link? exists?
if ((link.linkType === "section" || link.linkType === "tab") && link.documentId === doc.get('id')) {
let exists = self.get('pages').findBy('id', link.targetId);
if (_.isUndefined(exists)) {
link.orphan = true;
} else {
if (link.linkType === "section") {
self.attrs.onGotoPage(link.targetId);
}
}
}
if (link.orphan) {
$(this).addClass('broken-link');
self.showNotification('Broken link!');
e.preventDefault();
e.stopPropagation();
return false;
}
links.linkClick(doc, link);
return false;
});
},
setupAddWizard() {
Ember.run.schedule('afterRender', () => {
$('.start-section:not(.start-section-empty-state)').off('.hoverIntent');
$('.start-section:not(.start-section-empty-state)').hoverIntent({interval: 100, over: function() {
// in
$(this).find('.start-button').velocity("transition.slideDownIn", {duration: 300});
}, out: function() {
// out
$(this).find('.start-button').velocity("transition.slideUpOut", {duration: 300});
} });
});
},
addSection(model) {
// calculate sequence of page (position in document)
let sequence = 0;
let level = 1;
let beforePage = this.get('beforePage');
if (is.not.null(beforePage)) {
level = beforePage.get('level');
// get any page before the beforePage so we can insert this new section between them
let index = _.findIndex(this.get('pages'), function(p) { return p.get('id') === beforePage.get('id'); });
if (index !== -1) {
let beforeBeforePage = this.get('pages')[index-1];
if (is.not.undefined(beforeBeforePage)) {
sequence = (beforePage.get('sequence') + beforeBeforePage.get('sequence')) / 2;
} else {
sequence = beforePage.get('sequence') / 2;
}
}
}
model.page.sequence = sequence;
model.page.level = level;
this.send('onHideSectionWizard');
return this.get('onInsertSection')(model);
},
loadBlocks() {
this.get('sectionService').getSpaceBlocks(this.get('folder.id')).then((blocks) => {
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
this.set('blocks', blocks);
this.set('hasBlocks', blocks.get('length') > 0);
blocks.forEach((b) => {
b.set('deleteId', `delete-block-button-${b.id}`);
});
});
},
actions: {
onSavePageAsBlock(block) {
const promise = this.attrs.onSavePageAsBlock(block);
promise.then(() => {
this.loadBlocks();
});
},
onCopyPage(pageId, documentId) {
this.attrs.onCopyPage(pageId, documentId);
},
onMovePage(pageId, documentId) {
this.attrs.onMovePage(pageId, documentId);
},
onDeletePage(params) {
this.attrs.onDeletePage(params);
},
onSavePage(page, meta) {
this.set('toEdit', '');
this.attrs.onSavePage(page, meta);
},
onShowSectionWizard(page) {
if (is.undefined(page)) {
page = { id: '0' };
}
this.set('pageId', '');
let beforePage = this.get('beforePage');
if (is.not.null(beforePage) && $("#new-section-wizard").is(':visible') && beforePage.get('id') === page.id) {
this.send('onHideSectionWizard');
return;
}
this.set('newSectionLocation', page.id);
if (page.id === '0') {
// this handles add section at the end of the document
// because we are not before another page
this.set('beforePage', null);
} else {
this.set('beforePage', page);
}
$("#new-section-wizard").insertAfter(`#add-section-button-${page.id}`);
$("#new-section-wizard").velocity("transition.slideDownIn", { duration: 300, complete:
function() {
$("#new-section-name").focus();
}});
},
onHideSectionWizard() {
this.set('newSectionLocation', '');
this.set('beforePage', null);
$("#new-section-wizard").insertAfter('#wizard-placeholder');
$("#new-section-wizard").velocity("transition.slideUpOut", { duration: 300 });
},
onInsertSection(section) {
let sectionName = this.get('newSectionName');
if (is.empty(sectionName)) {
$("#new-section-name").focus();
return;
}
let page = {
documentId: this.get('document.id'),
title: sectionName,
level: 1,
sequence: 0, // calculated elsewhere
body: "",
contentType: section.get('contentType'),
pageType: section.get('pageType')
};
let meta = {
documentId: this.get('document.id'),
rawBody: "",
config: ""
};
let model = {
page: page,
meta: meta
};
const promise = this.addSection(model);
promise.then((id) => {
this.set('pageId', id);
if (model.page.pageType === 'section') {
this.set('toEdit', id);
} else {
this.set('toEdit', '');
}
this.setupAddWizard();
});
},
onInsertBlock(block) {
let sectionName = this.get('newSectionName');
if (is.empty(sectionName)) {
$("#new-section-name").focus();
return;
}
let page = {
documentId: this.get('document.id'),
title: `${block.get('title')}`,
level: 1,
sequence: 0, // calculated elsewhere
body: block.get('body'),
contentType: block.get('contentType'),
pageType: block.get('pageType'),
blockId: block.get('id')
};
let meta = {
documentId: this.get('document.id'),
rawBody: block.get('rawBody'),
config: block.get('config'),
externalSource: block.get('externalSource')
};
let model = {
page: page,
meta: meta
};
const promise = this.addSection(model);
promise.then((id) => {
this.set('pageId', id);
this.setupAddWizard();
});
},
onDeleteBlock(id) {
const promise = this.attrs.onDeleteBlock(id);
promise.then(() => {
this.loadBlocks();
});
return true;
}
}
});

View file

@ -1,194 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
const {
computed,
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, {
documentService: service('document'),
deleteChildren: false,
menuOpen: false,
blockTitle: "",
blockExcerpt: "",
documentList: [], //includes the current document
documentListOthers: [], //excludes the current document
selectedDocument: null,
checkId: computed('page', function () {
let id = this.get('page.id');
return `delete-check-button-${id}`;
}),
menuTarget: computed('page', function () {
let id = this.get('page.id');
return `page-menu-${id}`;
}),
deleteButtonId: computed('page', function () {
let id = this.get('page.id');
return `delete-page-button-${id}`;
}),
publishButtonId: computed('page', function () {
let id = this.get('page.id');
return `publish-button-${id}`;
}),
publishDialogId: computed('page', function () {
let id = this.get('page.id');
return `publish-dialog-${id}`;
}),
blockTitleId: computed('page', function () {
let id = this.get('page.id');
return `block-title-${id}`;
}),
blockExcerptId: computed('page', function () {
let id = this.get('page.id');
return `block-excerpt-${id}`;
}),
copyButtonId: computed('page', function () {
let id = this.get('page.id');
return `copy-page-button-${id}`;
}),
copyDialogId: computed('page', function () {
let id = this.get('page.id');
return `copy-dialog-${id}`;
}),
moveButtonId: computed('page', function () {
let id = this.get('page.id');
return `move-page-button-${id}`;
}),
moveDialogId: computed('page', function () {
let id = this.get('page.id');
return `move-dialog-${id}`;
}),
didRender() {
$("#" + this.get('blockTitleId')).removeClass('error');
$("#" + this.get('blockExcerptId')).removeClass('error');
},
actions: {
onMenuOpen() {
if ($('#' + this.get('publishDialogId')).is( ":visible" )) {
return;
}
if ($('#' + this.get('copyDialogId')).is( ":visible" )) {
return;
}
if ($('#' + this.get('moveDialogId')).is( ":visible" )) {
return;
}
this.set('menuOpen', !this.get('menuOpen'));
},
onEdit() {
this.attrs.onEdit();
},
deletePage() {
this.attrs.onDeletePage(this.get('deleteChildren'));
},
onSavePageAsBlock() {
let page = this.get('page');
let titleElem = '#' + this.get('blockTitleId');
let blockTitle = this.get('blockTitle');
if (is.empty(blockTitle)) {
$(titleElem).addClass('error');
return;
}
let excerptElem = '#' + this.get('blockExcerptId');
let blockExcerpt = this.get('blockExcerpt');
blockExcerpt = blockExcerpt.replace(/\n/g, "");
if (is.empty(blockExcerpt)) {
$(excerptElem).addClass('error');
return;
}
this.get('documentService').getPageMeta(this.get('document.id'), page.get('id')).then((pm) => {
let block = {
folderId: this.get('folder.id'),
contentType: page.get('contentType'),
pageType: page.get('pageType'),
title: blockTitle,
body: page.get('body'),
excerpt: blockExcerpt,
rawBody: pm.get('rawBody'),
config: pm.get('config'),
externalSource: pm.get('externalSource')
};
this.attrs.onSavePageAsBlock(block);
this.set('menuOpen', false);
this.set('blockTitle', '');
this.set('blockExcerpt', '');
$(titleElem).removeClass('error');
$(excerptElem).removeClass('error');
return true;
});
},
// Copy/move actions
onCopyDialogOpen() {
// Fetch document targets once.
if (this.get('documentList').length > 0) {
return;
}
this.get('documentService').getPageMoveCopyTargets().then((d) => {
let me = this.get('document');
this.set('documentList', d);
this.set('documentListOthers', d.filter((item) => item.get('id') !== me.get('id')));
});
},
onTargetChange(d) {
this.set('selectedDocument', d);
},
onCopyPage() {
// can't proceed if no data
if (this.get('documentList.length') === 0) {
return;
}
let targetDocumentId = this.get('document.id');
if (is.not.null(this.get('selectedDocument'))) {
targetDocumentId = this.get('selectedDocument.id');
}
this.attrs.onCopyPage(targetDocumentId);
return true;
},
onMovePage() {
// can't proceed if no data
if (this.get('documentListOthers.length') === 0) {
return;
}
if (is.null(this.get('selectedDocument'))) {
this.set('selectedDocument', this.get('documentListOthers')[0]);
}
let targetDocumentId = this.get('selectedDocument.id');
this.attrs.onMovePage(targetDocumentId);
return true;
}
}
});

View file

@ -1,24 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
documentService: Ember.inject.service('document'),
didReceiveAttrs() {
this._super(...arguments);
this.get('documentService').getActivity(this.get('document.id')).then((activity) => {
this.set('activity', activity);
});
}
});

View file

@ -1,147 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
documentService: Ember.inject.service('document'),
appMeta: Ember.inject.service(),
drop: null,
emptyState: Ember.computed.empty('files'),
deleteAttachment: {
id: "",
name: "",
},
init() {
this._super(...arguments);
this.getAttachments();
},
didInsertElement() {
this._super(...arguments);
if (!this.get('isEditor')) {
return;
}
let self = this;
let documentId = this.get('document.id');
let url = this.get('appMeta.endpoint');
let uploadUrl = `${url}/documents/${documentId}/attachments`;
let dzone = new Dropzone("#upload-document-files", {
headers: {
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
},
url: uploadUrl,
method: "post",
paramName: 'attachment',
clickable: true,
maxFilesize: 10,
parallelUploads: 3,
uploadMultiple: false,
addRemoveLinks: false,
autoProcessQueue: true,
init: function () {
this.on("success", function (file /*, response*/ ) {
self.showNotification(`Attached ${file.name}`);
});
this.on("queuecomplete", function () {
self.getAttachments();
});
this.on("addedfile", function ( /*file*/ ) {
});
}
});
dzone.on("complete", function (file) {
dzone.removeFile(file);
});
this.set('drop', dzone);
},
willDestroyElement() {
this._super(...arguments);
let drop = this.get('drop');
if (is.not.null(drop)) {
drop.destroy();
}
},
getAttachments() {
this.get('documentService').getAttachments(this.get('document.id')).then((files) => {
this.set('files', files);
});
},
actions: {
onConfirmDelete(id, name) {
this.set('deleteAttachment', {
id: id,
name: name
});
$(".delete-attachment-dialog").css("display", "block");
let drop = new Drop({
target: $(".delete-attachment-" + id)[0],
content: $(".delete-attachment-dialog")[0],
classes: 'drop-theme-basic',
position: "bottom right",
openOn: "always",
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0"
},
remove: false
});
this.set('drop', drop);
},
onCancel() {
let drop = this.get('drop');
drop.close();
this.set('deleteAttachment', {
id: "",
name: ""
});
},
onDelete() {
let attachment = this.get('deleteAttachment');
let drop = this.get('drop');
drop.close();
this.showNotification(`Deleted ${name}`);
this.get('documentService').deleteAttachment(this.get('document.id'), attachment.id).then(() => {
this.getAttachments();
this.set('deleteAttachment', {
id: "",
name: ""
});
});
return true;
}
}
});

View file

@ -1,24 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
page: {},
tagName: "li",
classNames: ["item"],
actions: {
onClick(id) {
this.get('onClick')(id);
}
}
});

View file

@ -1,170 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
import tocUtil from '../../utils/toc';
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
document: {},
folder: {},
pages: [],
currentPageId: "",
state: {
actionablePage: false,
upDisabled: true,
downDisabled: true,
indentDisabled: true,
outdentDisabled: true
},
emptyState: Ember.computed('pages', function () {
return this.get('pages.length') === 0;
}),
didReceiveAttrs: function () {
this._super(...arguments);
this.set('showToc', is.not.undefined(this.get('pages')) && this.get('pages').get('length') > 0);
if (is.not.null(this.get('currentPageId'))) {
this.send('onEntryClick', this.get('currentPageId'));
}
},
didRender: function () {
this._super(...arguments);
if (this.session.authenticated) {
this.addTooltip(document.getElementById("toc-up-button"));
this.addTooltip(document.getElementById("toc-down-button"));
this.addTooltip(document.getElementById("toc-outdent-button"));
this.addTooltip(document.getElementById("toc-indent-button"));
}
},
didInsertElement() {
this._super(...arguments);
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
},
willDestroyElement() {
this._super(...arguments);
this.eventBus.unsubscribe('documentPageAdded');
this.destroyTooltips();
},
onDocumentPageAdded(pageId) {
this.send('onEntryClick', pageId);
},
// Controls what user can do with the toc (left sidebar).
// Identifies the target pages.
setState(pageId) {
this.set('currentPageId', pageId);
let toc = this.get('pages');
let page = _.findWhere(toc, { id: pageId });
let state = tocUtil.getState(toc, page);
if (!this.get('isEditor') || is.empty(pageId)) {
state.actionablePage = false;
state.upDisabled = state.downDisabled = state.indentDisabled = state.outdentDisabled = true;
}
this.set('state', state);
},
actions: {
// Page up - above pages shunt down.
pageUp() {
if (this.get('state.upDisabled')) {
return;
}
let state = this.get('state');
let pages = this.get('pages');
let page = _.findWhere(pages, { id: this.get('currentPageId') });
let pendingChanges = tocUtil.moveUp(state, pages, page);
if (pendingChanges.length > 0) {
this.attrs.onPageSequenceChange(pendingChanges);
this.send('onEntryClick', this.get('currentPageId'));
this.showNotification("Moved up");
}
},
// Move down -- pages below shift up.
pageDown() {
if (this.get('state.downDisabled')) {
return;
}
let state = this.get('state');
var pages = this.get('pages');
var page = _.findWhere(pages, { id: this.get('currentPageId') });
let pendingChanges = tocUtil.moveDown(state, pages, page);
if (pendingChanges.length > 0) {
this.attrs.onPageSequenceChange(pendingChanges);
this.send('onEntryClick', this.get('currentPageId'));
this.showNotification("Moved down");
}
},
// Indent - changes a page from H2 to H3, etc.
pageIndent() {
if (this.get('state.indentDisabled')) {
return;
}
let state = this.get('state');
var pages = this.get('pages');
var page = _.findWhere(pages, { id: this.get('currentPageId') });
let pendingChanges = tocUtil.indent(state, pages, page);
if (pendingChanges.length > 0) {
this.attrs.onPageLevelChange(pendingChanges);
this.showNotification("Indent");
this.send('onEntryClick', this.get('currentPageId'));
}
},
// Outdent - changes a page from H3 to H2, etc.
pageOutdent() {
if (this.get('state.outdentDisabled')) {
return;
}
let state = this.get('state');
var pages = this.get('pages');
var page = _.findWhere(pages, { id: this.get('currentPageId') });
let pendingChanges = tocUtil.outdent(state, pages, page);
if (pendingChanges.length > 0) {
this.attrs.onPageLevelChange(pendingChanges);
this.showNotification("Outdent");
this.send('onEntryClick', this.get('currentPageId'));
}
},
onEntryClick(id) {
this.setState(id);
this.attrs.onGotoPage(id);
}
}
});

View file

@ -1,148 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
import NotifierMixin from '../../mixins/notifier';
export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
documentService: Ember.inject.service('document'),
sectionService: Ember.inject.service('section'),
sessionService: Ember.inject.service('session'),
appMeta: Ember.inject.service(),
userService: Ember.inject.service('user'),
localStorage: Ember.inject.service(),
pinned: Ember.inject.service(),
menuOpen: false,
pinState : {
isPinned: false,
pinId: '',
newName: '',
},
saveTemplate: {
name: "",
description: ""
},
tab: '',
init() {
this._super(...arguments);
if (is.empty(this.get('tab')) || is.undefined(this.get('tab'))) {
this.set('tab', 'index');
}
},
didReceiveAttrs() {
this._super(...arguments);
this.set('saveTemplate.name', this.get('document.name'));
this.set('saveTemplate.description', this.get('document.excerpt'));
this.set('pinState.pinId', this.get('pinned').isDocumentPinned(this.get('document.id')));
this.set('pinState.isPinned', this.get('pinState.pinId') !== '');
this.set('pinState.newName', this.get('document.name').substring(0,3).toUpperCase());
},
actions: {
onChangeTab(tab) {
this.set('tab', tab);
},
onTagChange(tags) {
let doc = this.get('document');
doc.set('tags', tags);
this.get('documentService').save(doc);
},
onMenuOpen() {
this.set('menuOpen', !this.get('menuOpen'));
},
onDeleteDocument() {
this.attrs.onDocumentDelete();
},
onPrintDocument() {
$("#sidebar-zone-more-button").click();
window.print();
},
onPageSequenceChange(changes) {
this.get('onPageSequenceChange')(changes);
},
onPageLevelChange(changes) {
this.get('onPageLevelChange')(changes);
},
onGotoPage(id) {
this.get('onGotoPage')(id);
},
onUnpin() {
this.get('pinned').unpinItem(this.get('pinState.pinId')).then(() => {
this.set('pinState.isPinned', false);
this.set('pinState.pinId', '');
this.eventBus.publish('pinChange');
});
},
onPin() {
let pin = {
pin: this.get('pinState.newName'),
documentId: this.get('document.id'),
folderId: this.get('folder.id')
};
if (is.empty(pin.pin)) {
$("#pin-document-name").addClass("error").focus();
return false;
}
this.get('pinned').pinItem(pin).then((pin) => {
this.set('pinState.isPinned', true);
this.set('pinState.pinId', pin.get('id'));
this.eventBus.publish('pinChange');
});
return true;
},
onSaveTemplate() {
var name = this.get('saveTemplate.name');
var excerpt = this.get('saveTemplate.description');
if (is.empty(name)) {
$("#new-template-name").addClass("error").focus();
return false;
}
if (is.empty(excerpt)) {
$("#new-template-desc").addClass("error").focus();
return false;
}
this.showNotification('Template saved');
this.attrs.onSaveTemplate(name, excerpt);
return true;
},
onLayoutChange(layout) {
let doc = this.get('document');
doc.set('layout', layout);
this.get('documentService').save(doc);
return true;
}
}
});

View file

@ -1,200 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
const {
computed,
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, {
documentService: service('document'),
expanded: false,
deleteChildren: false,
menuOpen: false,
blockTitle: "",
blockExcerpt: "",
documentList: [], //includes the current document
documentListOthers: [], //excludes the current document
selectedDocument: null,
checkId: computed('page', function () {
let id = this.get('page.id');
return `delete-check-button-${id}`;
}),
menuTarget: computed('page', function () {
let id = this.get('page.id');
return `page-menu-${id}`;
}),
deleteButtonId: computed('page', function () {
let id = this.get('page.id');
return `delete-page-button-${id}`;
}),
publishButtonId: computed('page', function () {
let id = this.get('page.id');
return `publish-button-${id}`;
}),
publishDialogId: computed('page', function () {
let id = this.get('page.id');
return `publish-dialog-${id}`;
}),
blockTitleId: computed('page', function () {
let id = this.get('page.id');
return `block-title-${id}`;
}),
blockExcerptId: computed('page', function () {
let id = this.get('page.id');
return `block-excerpt-${id}`;
}),
copyButtonId: computed('page', function () {
let id = this.get('page.id');
return `copy-page-button-${id}`;
}),
copyDialogId: computed('page', function () {
let id = this.get('page.id');
return `copy-dialog-${id}`;
}),
moveButtonId: computed('page', function () {
let id = this.get('page.id');
return `move-page-button-${id}`;
}),
moveDialogId: computed('page', function () {
let id = this.get('page.id');
return `move-dialog-${id}`;
}),
didRender() {
$("#" + this.get('blockTitleId')).removeClass('error');
$("#" + this.get('blockExcerptId')).removeClass('error');
},
actions: {
toggleExpand() {
this.set('expanded', !this.get('expanded'));
this.get('onExpand')();
},
onMenuOpen() {
if ($('#' + this.get('publishDialogId')).is( ":visible" )) {
return;
}
if ($('#' + this.get('copyDialogId')).is( ":visible" )) {
return;
}
if ($('#' + this.get('moveDialogId')).is( ":visible" )) {
return;
}
this.set('menuOpen', !this.get('menuOpen'));
},
onEdit() {
this.attrs.onEdit();
},
deletePage() {
this.attrs.onDeletePage(this.get('deleteChildren'));
},
onSavePageAsBlock() {
let page = this.get('page');
let titleElem = '#' + this.get('blockTitleId');
let blockTitle = this.get('blockTitle');
if (is.empty(blockTitle)) {
$(titleElem).addClass('error');
return;
}
let excerptElem = '#' + this.get('blockExcerptId');
let blockExcerpt = this.get('blockExcerpt');
blockExcerpt = blockExcerpt.replace(/\n/g, "");
if (is.empty(blockExcerpt)) {
$(excerptElem).addClass('error');
return;
}
this.get('documentService').getPageMeta(this.get('document.id'), page.get('id')).then((pm) => {
let block = {
folderId: this.get('folder.id'),
contentType: page.get('contentType'),
pageType: page.get('pageType'),
title: blockTitle,
body: page.get('body'),
excerpt: blockExcerpt,
rawBody: pm.get('rawBody'),
config: pm.get('config'),
externalSource: pm.get('externalSource')
};
this.attrs.onSavePageAsBlock(block);
this.set('menuOpen', false);
this.set('blockTitle', '');
this.set('blockExcerpt', '');
$(titleElem).removeClass('error');
$(excerptElem).removeClass('error');
return true;
});
},
// Copy/move actions
onCopyDialogOpen() {
// Fetch document targets once.
if (this.get('documentList').length > 0) {
return;
}
this.get('documentService').getPageMoveCopyTargets().then((d) => {
let me = this.get('document');
this.set('documentList', d);
this.set('documentListOthers', d.filter((item) => item.get('id') !== me.get('id')));
});
},
onTargetChange(d) {
this.set('selectedDocument', d);
},
onCopyPage() {
// can't proceed if no data
if (this.get('documentList.length') === 0) {
return;
}
let targetDocumentId = this.get('document.id');
if (is.not.null(this.get('selectedDocument'))) {
targetDocumentId = this.get('selectedDocument.id');
}
this.attrs.onCopyPage(targetDocumentId);
return true;
},
onMovePage() {
// can't proceed if no data
if (this.get('documentListOthers.length') === 0) {
return;
}
if (is.null(this.get('selectedDocument'))) {
this.set('selectedDocument', this.get('documentListOthers')[0]);
}
let targetDocumentId = this.get('selectedDocument.id');
this.attrs.onMovePage(targetDocumentId);
return true;
}
}
});

View file

@ -1,109 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
documentTags: [],
tagz: [],
isEditor: false,
newTag: "",
maxTags: 3,
canAdd: false,
init() {
this._super(...arguments);
let tagz = [];
if (!_.isUndefined(this.get('documentTags')) && this.get('documentTags').length > 1) {
let tags = this.get('documentTags').split('#');
_.each(tags, function(tag) {
if (tag.length > 0) {
tagz.pushObject(tag);
}
});
}
this.set('tagz', tagz);
this.set('canAdd', this.get('isEditor') && this.get('tagz').get('length') < 3);
},
didUpdateAttrs() {
this.set('canAdd', this.get('isEditor') && this.get('tagz').get('length') < 3);
},
didInsertElement() {
},
willDestroyElement() {
$("#add-tag-field").off("keydown");
},
actions: {
onTagEditor() {
$("#add-tag-field").off("keydown").on("keydown", function(e) {
if (e.shiftKey) {
return false;
}
if (e.which === 13 || e.which === 45 || e.which === 189 || e.which === 8 || e.which === 127 || (e.which >= 65 && e.which <= 90) || (e.which >= 97 && e.which <= 122) || (e.which >= 48 && e.which <= 57)) {
return true;
}
return false;
});
},
addTag() {
let tags = this.get("tagz");
let tag = this.get('newTag');
tag = tag.toLowerCase().trim();
// empty or dupe?
if (tag.length === 0 || _.contains(tags, tag) || tags.length >= this.get('maxTags') || tag.startsWith('-')) {
return false;
}
tags.pushObject(tag);
this.set('tagz', tags);
this.set('newTag', '');
let save = "#";
_.each(tags, function(tag) {
save = save + tag + "#";
});
this.get('onChange')(save);
return true;
},
// removeTag removes specified tag from the list of tags associated with this document.
removeTag(tagToRemove) {
let tags = this.get("tagz");
let save = "";
tags = _.without(tags, tagToRemove);
_.each(tags, function(tag) {
save = save + tag + "#";
});
if (save.length) {
save = "#" + save;
}
this.set('tagz', tags);
this.get('onChange')(save);
},
}
});

View file

@ -1,71 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
isEmpty,
computed,
set
} = Ember;
export default Ember.Component.extend({
titleEmpty: computed.empty('model.title'),
firstnameEmpty: computed.empty('model.firstname'),
lastnameEmpty: computed.empty('model.lastname'),
emailEmpty: computed.empty('model.email'),
passwordEmpty: computed.empty('model.password'),
hasEmptyTitleError: computed.and('titleEmpty', 'titleError'),
hasEmptyFirstnameError: computed.and('firstnameEmpty', 'adminFirstnameError'),
hasEmptyLastnameError: computed.and('lastnameEmpty', 'adminLastnameError'),
hasEmptyEmailError: computed.and('emailEmpty', 'adminEmailError'),
hasEmptyPasswordError: computed.and('passwordEmpty', 'adminPasswordError'),
actions: {
save() {
if (isEmpty(this.get('model.title'))) {
set(this, 'titleError', true);
return $("#siteTitle").focus();
}
if (isEmpty(this.get('model.firstname'))) {
set(this, 'adminFirstnameError', true);
return $("#adminFirstname").focus();
}
if (isEmpty(this.get('model.lastname'))) {
set(this, 'adminLastnameError', true);
return $("#adminLastname").focus();
}
if (isEmpty(this.get('model.email')) || !is.email(this.get('model.email'))) {
set(this, 'adminEmailError', true);
return $("#adminEmail").focus();
}
if (isEmpty(this.get('model.password'))) {
set(this, 'adminPasswordError', true);
return $("#adminPassword").focus();
}
this.model.allowAnonymousAccess = Ember.$("#allowAnonymousAccess").prop('checked');
this.get('save')().then(() => {
set(this, 'titleError', false);
set(this, 'adminFirstnameError', false);
set(this, 'adminLastnameError', false);
set(this, 'adminEmailError', false);
set(this, 'adminPasswordError', false);
});
}
}
});

View file

@ -1,130 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import stringUtil from '../utils/string';
export default Ember.Component.extend({
drop: null,
target: null,
button: "Delete",
color: "flat-red",
button2: "",
color2: "2",
open: "click",
position: 'bottom right',
showCancel: true,
contentId: "",
focusOn: null, // is there an input field we need to focus?
selectOn: null, // is there an input field we need to select?
onOpenCallback: null, // callback when opened
onAction: null,
onAction2: null,
offset: "5px 0",
targetOffset: "10px 0",
constrainToWindow: true,
constrainToScrollParent: true,
tether: Ember.inject.service(),
hasSecondButton: Ember.computed('button2', 'color2', function () {
return is.not.empty(this.get('button2')) && is.not.empty(this.get('color2'));
}),
didReceiveAttrs() {
this.set("contentId", 'dropdown-dialog-' + stringUtil.makeId(10));
},
didInsertElement() {
this._super(...arguments);
// TODO: refactor to eliminate self
let self = this;
if (is.null(self.get('target'))) {
return;
}
let drop = this.get('tether').createDrop({
target: document.getElementById(self.get('target')),
content: self.$(".dropdown-dialog")[0],
classes: 'drop-theme-basic',
position: self.get('position'),
openOn: self.get('open'),
constrainToWindow: true,
constrainToScrollParent: false,
tetherOptions: {
offset: self.offset,
targetOffset: self.targetOffset,
targetModifier: 'scroll-handle'
},
remove: true
});
if (drop) {
drop.on('open', function () {
if (is.not.null(self.get("focusOn"))) {
document.getElementById(self.get("focusOn")).focus();
}
if (is.not.null(self.get("selectOn"))) {
document.getElementById(self.get("selectOn")).select();
}
if (is.not.null(self.get("onOpenCallback"))) {
self.attrs.onOpenCallback(drop);
}
});
self.set('drop', drop);
}
},
willDestroyElement() {
let drop = this.get('drop');
if (drop) {
drop.destroy();
}
},
actions: {
onCancel() {
let drop = this.get('drop');
if (drop) {
drop.close();
}
},
onAction() {
if (this.get('onAction') === null) {
return;
}
let close = this.attrs.onAction();
let drop = this.get('drop');
if (close && drop) {
drop.close();
}
},
onAction2() {
if (this.get('onAction2') === null) {
return;
}
let close = this.attrs.onAction2();
let drop = this.get('drop');
if (close && drop) {
drop.close();
}
}
}
});

View file

@ -1,71 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import stringUtil from '../utils/string';
export default Ember.Component.extend({
target: null,
open: "click",
position: 'bottom right',
contentId: "",
drop: null,
onOpenCallback: null, // callback when opened
onCloseCallback: null, // callback when closed
tether: Ember.inject.service(),
didReceiveAttrs() {
this.set("contentId", 'dropdown-menu-' + stringUtil.makeId(10));
},
didInsertElement() {
this._super(...arguments);
let self = this;
let drop = this.get('tether').createDrop({
target: document.getElementById(self.get('target')),
content: self.$(".dropdown-menu")[0],
classes: 'drop-theme-menu',
position: self.get('position'),
openOn: self.get('open'),
constrainToWindow: false,
constrainToScrollParent: false,
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0",
targetModifier: 'scroll-handle',
},
remove: true
});
if (drop) {
drop.on('open', function () {
if (is.not.null(self.get("onOpenCallback"))) {
self.attrs.onOpenCallback(drop);
}
});
drop.on('close', function () {
if (is.not.null(self.get("onCloseCallback"))) {
self.attrs.onCloseCallback();
}
});
self.set('drop', drop);
}
},
willDestroyElement() {
let drop = this.get('drop');
if (drop) {
drop.destroy();
}
}
});

View file

@ -1,18 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.TextField.extend({
becomeFocused: function() {
this.$().focus();
}.on('didInsertElement')
});

View file

@ -1,18 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.TextArea.extend({
becomeFocused: function() {
this.$().focus();
}.on('didInsertElement')
});

View file

@ -1,109 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
folderService: Ember.inject.service('folder'),
selectedDocuments: [],
moveTarget: null,
emptyState: Ember.computed('documents', function() {
return this.get('documents.length') === 0;
}),
didReceiveAttrs() {
this._super(...arguments);
this.set('selectedDocuments', []);
this.set('canCreate', this.get('folderService').get('canEditCurrentFolder'));
this.set('deleteTargets', this.get('folders').rejectBy('id', this.get('folder.id')));
},
didUpdateAttrs() {
this._super(...arguments);
this.setupAddWizard();
},
didInsertElement() {
this._super(...arguments);
this.setupAddWizard();
},
setupAddWizard() {
Ember.run.schedule('afterRender', () => {
$('.start-document:not(.start-document-empty-state)').off('.hoverIntent');
$('.start-document:not(.start-document-empty-state)').hoverIntent({interval: 100, over: function() {
// in
$(this).find('.start-button').velocity("transition.slideDownIn", {duration: 300});
}, out: function() {
// out
$(this).find('.start-button').velocity("transition.slideUpOut", {duration: 300});
} });
});
},
actions: {
selectDocument(documentId) {
let doc = this.get('documents').findBy('id', documentId);
let list = this.get('selectedDocuments');
doc.set('selected', !doc.get('selected'));
if (doc.get('selected')) {
list.push(documentId);
} else {
var index = list.indexOf(documentId);
if (index > -1) {
list.splice(index, 1);
}
}
this.set('selectedDocuments', list);
this.get('onDocumentsChecked')(list);
},
onDelete() {
this.get("onDeleteSpace")();
},
onImport() {
this.get('onImport')();
},
onShowDocumentWizard(docId) {
if ($("#new-document-wizard").is(':visible') && this.get('docId') === docId) {
this.send('onHideDocumentWizard');
return;
}
this.set('docId', docId);
if (docId === '') {
$("#new-document-wizard").insertAfter('#wizard-placeholder');
} else {
$("#new-document-wizard").insertAfter(`#document-${docId}`);
}
$("#new-document-wizard").velocity("transition.slideDownIn", { duration: 300, complete:
function() {
$("#new-document-name").focus();
}});
},
onHideDocumentWizard() {
$("#new-document-wizard").insertAfter('#wizard-placeholder');
$("#new-document-wizard").velocity("transition.slideUpOut", { duration: 300 });
}
}
});

View file

@ -1,60 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
const {
computed,
} = Ember;
export default Ember.Component.extend(NotifierMixin, TooltipMixin, {
folderService: Ember.inject.service('folder'),
folderName: '',
hasNameError: computed.empty('folderName'),
editMode: false,
isEditor: false,
keyUp(e) {
if (e.keyCode === 27) { // escape key
this.send('onCancel');
}
},
actions: {
toggleEdit() {
this.set('folderName', this.get('folder.name'));
this.set('editMode', true);
Ember.run.schedule('afterRender', () => {
$('#folder-name').select();
});
},
onSave() {
if (this.get('hasNameError')) {
return;
}
this.set('folder.name', this.get('folderName'));
this.get('folderService').save(this.get('folder'));
this.showNotification('Saved');
this.set('editMode', false);
},
onCancel() {
this.set('editMode', false);
}
}
});

View file

@ -1,91 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
import TooltipMixin from '../../mixins/tooltip';
import AuthMixin from '../../mixins/auth';
const {
computed
} = Ember;
export default Ember.Component.extend(NotifierMixin, TooltipMixin, AuthMixin, {
folderService: Ember.inject.service('folder'),
session: Ember.inject.service(),
appMeta: Ember.inject.service(),
showToolbar: false,
folder: {},
busy: false,
isFolderOwner: computed.equal('folder.userId', 'session.user.id'),
moveFolderId: "",
drop: null,
didReceiveAttrs() {
this.set('isFolderOwner', this.get('folder.userId') === this.get("session.user.id"));
let show = this.get('session.authenticated') || this.get('isFolderOwner') || this.get('hasSelectedDocuments') || this.get('folderService').get('canEditCurrentFolder');
this.set('showToolbar', show);
let targets = _.reject(this.get('folders'), {
id: this.get('folder').get('id')
});
this.set('movedFolderOptions', targets);
},
didRender() {
if (this.get('hasSelectedDocuments')) {
this.addTooltip(document.getElementById("move-documents-button"));
this.addTooltip(document.getElementById("delete-documents-button"));
} else {
if (this.get('isFolderOwner')) {
this.addTooltip(document.getElementById("folder-share-button"));
this.addTooltip(document.getElementById("folder-settings-button"));
}
}
},
willDestroyElement() {
if (is.not.null(this.get('drop'))) {
this.get('drop').destroy();
this.set('drop', null);
}
this.destroyTooltips();
},
actions: {
deleteDocuments() {
this.attrs.onDeleteDocument();
},
setMoveFolder(folderId) {
this.set('moveFolderId', folderId);
let folders = this.get('folders');
folders.forEach(folder => {
folder.set('selected', folder.id === folderId);
});
},
moveDocuments() {
if (this.get("moveFolderId") === "") {
return false;
}
this.attrs.onMoveDocument(this.get('moveFolderId'));
return true;
}
}
});

View file

@ -1,73 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import constants from '../../utils/constants';
import TooltipMixin from '../../mixins/tooltip';
import NotifierMixin from '../../mixins/notifier';
import AuthMixin from '../../mixins/auth';
export default Ember.Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
publicFolders: [],
protectedFolders: [],
privateFolders: [],
hasPublicFolders: false,
hasProtectedFolders: false,
hasPrivateFolders: false,
newFolder: '',
didReceiveAttrs() {
let folders = this.get('folders');
// clear out state
this.set('publicFolders', []);
this.set('protectedFolders', []);
this.set('privateFolders', []);
_.each(folders, folder => {
if (folder.get('folderType') === constants.FolderType.Public) {
let folders = this.get('publicFolders');
folders.pushObject(folder);
this.set('publicFolders', folders);
}
if (folder.get('folderType') === constants.FolderType.Private) {
let folders = this.get('privateFolders');
folders.pushObject(folder);
this.set('privateFolders', folders);
}
if (folder.get('folderType') === constants.FolderType.Protected) {
let folders = this.get('protectedFolders');
folders.pushObject(folder);
this.set('protectedFolders', folders);
}
});
this.set('hasPublicFolders', this.get('publicFolders.length') > 0);
this.set('hasPrivateFolders', this.get('privateFolders.length') > 0);
this.set('hasProtectedFolders', this.get('protectedFolders.length') > 0);
},
actions: {
addFolder() {
var folderName = this.get('newFolder');
if (is.empty(folderName)) {
$("#new-folder-name").addClass("error").focus();
return false;
}
this.attrs.onFolderAdd(folderName);
this.set('newFolder', '');
return true;
}
}
});

View file

@ -1,135 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
folderService: service('folder'),
userService: service('user'),
appMeta: service(),
store: service(),
didReceiveAttrs() {
this.get('userService').getAll().then((users) => {
this.set('users', users);
var folderPermissions = [];
users.forEach((user) => {
let isActive = user.get('active');
let u = {
userId: user.get('id'),
fullname: user.get('fullname'),
orgId: this.get('folder.orgId'),
folderId: this.get('folder.id'),
canEdit: false,
canView: false,
canViewPrevious: false
};
if (isActive) {
folderPermissions.pushObject(u);
}
});
var u = {
userId: "",
fullname: " Everyone",
orgId: this.get('folder.orgId'),
folderId: this.get('folder.id'),
canEdit: false,
canView: false
};
folderPermissions.pushObject(u);
this.get('folderService').getPermissions(this.get('folder.id')).then((permissions) => {
permissions.forEach((permission, index) => { // eslint-disable-line no-unused-vars
var folderPermission = folderPermissions.findBy('userId', permission.get('userId'));
if (is.not.undefined(folderPermission)) {
Ember.setProperties(folderPermission, {
orgId: permission.get('orgId'),
folderId: permission.get('folderId'),
canEdit: permission.get('canEdit'),
canView: permission.get('canView'),
canViewPrevious: permission.get('canView')
});
}
});
folderPermissions.map((permission) => {
let data = this.get('store').normalize('folder-permission', permission);
return this.get('store').push(data);
});
this.set('permissions', folderPermissions.sortBy('fullname'));
});
});
},
getDefaultInvitationMessage() {
return "Hey there, I am sharing the " + this.get('folder.name') + " (in " + this.get("appMeta.title") + ") with you so we can both access the same documents.";
},
actions: {
setPermissions() {
let message = this.getDefaultInvitationMessage();
let folder = this.get('folder');
let permissions = this.get('permissions');
this.get('permissions').forEach((permission, index) => { // eslint-disable-line no-unused-vars
Ember.set(permission, 'canView', $("#canView-" + permission.userId).prop('checked'));
Ember.set(permission, 'canEdit', $("#canEdit-" + permission.userId).prop('checked'));
});
var data = permissions.map((obj) => {
let permission = {
'orgId': obj.orgId,
'folderId': obj.folderId,
'userId': obj.userId,
'canEdit': obj.canEdit,
'canView': obj.canView
};
return permission;
});
var payload = { Message: message, Roles: data };
this.get('folderService').savePermissions(folder.get('id'), payload).then(() => {
});
var hasEveryone = _.find(data, function (permission) {
return permission.userId === "" && (permission.canView || permission.canEdit);
});
if (is.not.undefined(hasEveryone)) {
folder.markAsPublic();
} else {
if (data.length > 1) {
folder.markAsRestricted();
} else {
folder.markAsPrivate();
}
}
this.get('folderService').save(folder).then(function () {
// window.location.href = "/folder/" + folder.get('id') + "/" + folder.get('slug');
});
}
}
});

View file

@ -1,74 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
folderService: service('folder'),
appMeta: service(),
inviteEmail: '',
inviteMessage: '',
getDefaultInvitationMessage() {
return "Hey there, I am sharing the " + this.folder.get('name') + " (in " + this.get("appMeta.title") + ") with you so we can both access the same documents.";
},
willRender() {
if (this.get('inviteMessage').length === 0) {
this.set('inviteMessage', this.getDefaultInvitationMessage());
}
},
actions: {
onShare() {
var email = this.get('inviteEmail').trim().replace(/ /g, '');
var message = this.get('inviteMessage').trim();
if (message.length === 0) {
message = this.getDefaultInvitationMessage();
}
if (email.length === 0) {
$('#inviteEmail').addClass('error').focus();
return;
}
var result = {
Message: message,
Recipients: []
};
// Check for multiple email addresses
if (email.indexOf(",") > -1) {
result.Recipients = email.split(',');
}
if (email.indexOf(";") > -1 && result.Recipients.length === 0) {
result.Recipients = email.split(';');
}
// Handle just one email address
if (result.Recipients.length === 0 && email.length > 0) {
result.Recipients.push(email);
}
this.set('inviteEmail', '');
this.get('folderService').share(this.folder.get('id'), result).then(() => {
this.showNotification('Shared');
});
}
}
});

View file

@ -1,101 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
import NotifierMixin from '../../mixins/notifier';
import AuthMixin from '../../mixins/auth';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, NotifierMixin, AuthMixin, {
folderService: service('folder'),
templateService: service('template'),
appMeta: service(),
pinned: service(),
publicFolders: [],
protectedFolders: [],
privateFolders: [],
hasPublicFolders: false,
hasProtectedFolders: false,
hasPrivateFolders: false,
newFolder: "",
menuOpen: false,
pinState : {
isPinned: false,
pinId: '',
newName: '',
},
tab: '',
init() {
this._super(...arguments);
if (is.empty(this.get('tab')) || is.undefined(this.get('tab'))) {
this.set('tab', 'index');
}
},
didReceiveAttrs() {
if (!this.get('noFolder')) {
let folder = this.get('folder');
this.set('pinState.pinId', this.get('pinned').isSpacePinned(folder.get('id')));
this.set('pinState.isPinned', this.get('pinState.pinId') !== '');
this.set('pinState.newName', folder.get('name').substring(0,3).toUpperCase());
}
},
actions: {
onFolderAdd(folderName) {
this.attrs.onFolderAdd(folderName);
return true;
},
onChangeTab(tab) {
this.set('tab', tab);
},
onMenuOpen() {
this.set('menuOpen', !this.get('menuOpen'));
},
onUnpin() {
this.get('pinned').unpinItem(this.get('pinState.pinId')).then(() => {
this.set('pinState.isPinned', false);
this.set('pinState.pinId', '');
this.eventBus.publish('pinChange');
});
},
onPin() {
let pin = {
pin: this.get('pinState.newName'),
documentId: '',
folderId: this.get('folder.id')
};
if (is.empty(pin.pin)) {
$('#pin-space-name').addClass('error').focus();
return false;
}
this.get('pinned').pinItem(pin).then((pin) => {
this.set('pinState.isPinned', true);
this.set('pinState.pinId', pin.get('id'));
this.eventBus.publish('pinChange');
});
return true;
},
}
});

View file

@ -1,154 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
const {
computed,
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
localStorage: Ember.inject.service(),
appMeta: Ember.inject.service(),
templateService: Ember.inject.service('template'),
canEditTemplate: "",
importedDocuments: [],
savedTemplates: [],
drop: null,
newDocumentName: 'New Document',
newDocumentNameMissing: computed.empty('newDocumentName'),
init() {
this._super(...arguments);
this.get('templateService').getSavedTemplates().then((saved) => {
let emptyTemplate = {
id: "0",
title: "Empty",
description: "An empty canvas for your words",
layout: "doc",
locked: true
};
saved.unshiftObject(emptyTemplate);
this.set('savedTemplates', saved);
});
},
didInsertElement() {
this.setupImport();
},
willDestroyElement() {
if (is.not.null(this.get('drop'))) {
this.get('drop').destroy();
this.set('drop', null);
}
},
setupImport() {
// already done init?
if (is.not.null(this.get('drop'))) {
this.get('drop').destroy();
this.set('drop', null);
}
let self = this;
let folderId = this.get('folder.id');
let url = this.get('appMeta.endpoint');
let importUrl = `${url}/import/folder/${folderId}`;
let dzone = new Dropzone("#import-document-button", {
headers: {
'Authorization': 'Bearer ' + self.get('session.session.content.authenticated.token')
},
url: importUrl,
method: "post",
paramName: 'attachment',
acceptedFiles: ".doc,.docx,.txt,.md,.markdown",
clickable: true,
maxFilesize: 10,
parallelUploads: 3,
uploadMultiple: false,
addRemoveLinks: false,
autoProcessQueue: true,
init: function () {
this.on("success", function (document) {
self.send('onDocumentImported', document.name, document);
});
this.on("error", function (x) {
console.log("Conversion failed for ", x.name, " obj ", x); // eslint-disable-line no-console
});
this.on("queuecomplete", function () {});
this.on("addedfile", function (file) {
self.send('onDocumentImporting', file.name);
});
}
});
dzone.on("complete", function (file) {
dzone.removeFile(file);
});
this.set('drop', dzone);
},
actions: {
onHideDocumentWizard() {
this.get('onHideDocumentWizard')();
},
editTemplate(template) {
this.get('router').transitionTo('document', this.get('folder.id'), this.get('folder.slug'), template.get('id'), template.get('slug'));
return true;
},
startDocument(template) {
this.send("showNotification", "Creating");
this.get('templateService').importSavedTemplate(this.folder.get('id'), template.id, this.get('newDocumentName')).then((document) => {
this.get('router').transitionTo('document', this.get('folder.id'), this.get('folder.slug'), document.get('id'), document.get('slug'));
});
return true;
},
onDocumentImporting(filename) {
this.send("showNotification", `Importing ${filename}`);
this.get('onHideDocumentWizard')();
let documents = this.get('importedDocuments');
documents.push(filename);
this.set('importedDocuments', documents);
},
onDocumentImported(filename /*, document*/ ) {
this.send("showNotification", `${filename} ready`);
let documents = this.get('importedDocuments');
documents.pop(filename);
this.set('importedDocuments', documents);
this.get('onImport')();
if (documents.length === 0) {
// this.get('showDocument')(this.get('folder'), document);
}
},
}
});

View file

@ -1,41 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
computed,
isEmpty
} = Ember;
export default Ember.Component.extend({
email: "",
sayThanks: false,
emailEmpty: computed.empty('email'),
hasEmptyEmailError: computed.and('emailEmpty', 'emailIsEmpty'),
actions: {
forgot() {
let email = this.get('email');
if (isEmpty(email)) {
Ember.set(this, 'emailIsEmpty', true);
return $("#email").focus();
}
this.get('forgot')(email).then(() => {
Ember.set(this, 'sayThanks', true);
Ember.set(this, 'email', '');
Ember.set(this, 'emailIsEmpty', false);
});
}
}
});

View file

@ -1,15 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
});

View file

@ -1,27 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
appMeta :service(),
didRender() {
if (this.get('appMeta').invalidLicense()) {
this.showNotification(`!! Expired or invalid license !!`);
}
}
});

View file

@ -1,27 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../mixins/notifier';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(NotifierMixin, {
appMeta :service(),
didRender() {
if (this.get('appMeta').invalidLicense()) {
this.showNotification(`!! Expired or invalid license !!`);
}
}
});

View file

@ -1,163 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import netUtil from '../../utils/net';
import constants from '../../utils/constants';
import TooltipMixin from '../../mixins/tooltip';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, {
folderService: service('folder'),
appMeta: service(),
session: service(),
store: service(),
folder: null,
view: {
folder: false,
search: false,
settings: false,
profile: false
},
pinned: service(),
pins: [],
enableLogout: true,
init() {
this._super(...arguments);
if (this.get("session.authenticated") && this.get("session.user.id") !== '0') {
this.get("session.accounts").forEach((account) => {
// TODO: do not mutate account.active here
account.active = account.orgId === this.get("appMeta.orgId");
});
}
this.set('pins', this.get('pinned').get('pins'));
if (this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak) {
let config = this.get('appMeta.authConfig');
config = JSON.parse(config);
this.set('enableLogout', !config.disableLogout);
}
},
didReceiveAttrs() {
if (this.get('folder') === null) {
this.set("folder", this.get('folderService.currentFolder'));
}
let route = this.get('router.currentRouteName');
this.set('view.folder', (is.startWith(route, 'folder')) ? true : false);
this.set('view.settings', (is.startWith(route, 'customize')) ? true : false);
this.set('view.profile', (route === 'profile') ? true : false);
this.set('view.search', (route === 'search') ? true : false);
},
didInsertElement() {
this._super(...arguments);
// Size the pinned items zone
if (this.get("session.authenticated")) {
this.eventBus.subscribe('resized', this, 'sizePinnedZone');
this.eventBus.subscribe('pinChange', this, 'setupPins');
this.sizePinnedZone();
this.setupPins();
let self = this;
var sortable = Sortable.create(document.getElementById('pinned-zone'), {
animation: 150,
onEnd: function () {
self.get('pinned').updateSequence(this.toArray()).then((pins) => {
self.set('pins', pins);
});
}
});
this.set('sortable', sortable);
}
},
didRender() {
if (this.get('session.isAdmin')) {
this.addTooltip(document.getElementById("workspace-settings"));
}
if (this.get("session.authenticated") && this.get('enableLogout')) {
this.addTooltip(document.getElementById("workspace-logout"));
} else {
this.addTooltip(document.getElementById("workspace-login"));
}
},
setupPins() {
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
this.get('pinned').getUserPins().then((pins) => {
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
this.set('pins', pins);
pins.forEach((pin) => {
this.addTooltip(document.getElementById(`pin-${pin.id}`));
});
});
},
// set height for pinned zone so ti scrolls on spill
sizePinnedZone() {
let topofBottomZone = parseInt($('#bottom-zone').css("top").replace("px", ""));
let heightOfTopZone = parseInt($('#top-zone').css("height").replace("px", ""));
let size = topofBottomZone - heightOfTopZone - 40;
$('#pinned-zone').css('height', size + "px");
},
willDestroyElement() {
let sortable = this.get('sortable');
if (!_.isUndefined(sortable)) {
sortable.destroy();
}
this.eventBus.unsubscribe('resized');
this.eventBus.unsubscribe('pinChange');
this.destroyTooltips();
},
actions: {
switchAccount(domain) {
window.location.href = netUtil.getAppUrl(domain);
},
jumpToPin(pin) {
let folderId = pin.get('folderId');
let documentId = pin.get('documentId');
if (_.isEmpty(documentId)) {
// jump to space
let folder = this.get('store').peekRecord('folder', folderId);
this.get('router').transitionTo('folder', folderId, folder.get('slug'));
} else {
// jump to doc
let folder = this.get('store').peekRecord('folder', folderId);
this.get('router').transitionTo('document', folderId, folder.get('slug'), documentId, 'document');
}
}
}
});

View file

@ -1,15 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
});

View file

@ -1,127 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
folderService: Ember.inject.service('folder'),
serial: "",
folderId: "",
slug: "",
processing: false,
didRender() {
let self = this;
$("#stage-1-firstname").focus();
// Stage 1 - person name keypress handler
$("#stage-1-firstname, #stage-1-lastname").keyup(function() {
if (!$("#stage-1-firstname").val() || !$("#stage-1-lastname").val()) {
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
} else {
$(".name-status").attr("src", "/assets/img/onboard/person-green.png");
}
});
// Stage 1 - finish
$("#stage-1-next").off('click').on('click', function() {
if (!$("#stage-1-firstname").val()) {
$("#stage-1-firstname").focus();
$("#stage-1-firstname").addClass("error");
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
return;
}
if (!$("#stage-1-lastname").val()) {
$("#stage-1-lastname").focus();
$("#stage-1-lastname").addClass("error");
$(".name-status").attr("src", "/assets/img/onboard/person-red.png");
return;
}
self.set('processing', false);
$(".stage-1").fadeOut("slow", function() {
if (self.get('processing')) {
return;
}
self.set('processing', true);
$(".stage-2").fadeIn();
$("#stage-2-password").focus();
// Stage 2 - password keypress handler
$("#stage-2-password-confirm").keyup(function() {
if ($("#stage-2-password").val().length < 6 || $("#stage-2-password").val().length > 50 ||
($("#stage-2-password").val() !== $("#stage-2-password-confirm").val())) {
$(".password-status").attr("src", "/assets/img/onboard/lock-red.png");
} else {
$(".password-status").attr("src", "/assets/img/onboard/lock-green.png");
}
});
});
});
// Stage 2 - finish
$("#stage-2-next").off('click').on('click', function() {
if (!$("#stage-2-password").val() || $("#stage-2-password").val().length < 6 || $("#stage-2-password").val().length > 50) {
$("#stage-2-password").focus();
$("#stage-2-password").addClass("error");
return;
}
if (!$("#stage-2-password-confirm").val()) {
$("#stage-2-password-confirm").focus();
$("#stage-2-password-confirm").addClass("error");
return;
}
if ($("#stage-2-password-confirm").val() !== $("#stage-2-password").val()) {
$(".mismatch").show();
$(".password-status").attr("src", "/assets/img/onboard/lock-red.png");
return;
}
self.set('processing', false);
$(".stage-2").fadeOut("slow", function() {
if (self.get('processing')) {
return;
}
self.set('processing', true);
$(".stage-3").fadeIn();
$("#spinner-1").show();
var payload = '{ "Password": "' + $("#stage-2-password").val() + '", "Serial": "' + self.serial + '", "Firstname": "' + $("#stage-1-firstname").val() + '", "Lastname": "' + $("#stage-1-lastname").val() + '" }';
var password = $("#stage-2-password").val();
self.get('folderService').onboard(self.folderId, payload).then(function(user) {
let creds = { password: password, email: user.email };
self.get('session').authenticate('authenticator:documize', creds).then(() => {
window.location.href = 's/' + self.folderId + "/" + self.slug;
});
// var credentials = encodingUtil.Base64.encode(netUtil.getSubdomain() + ":" + user.email + ":" + password);
// self.session.sso(credentials).then(function() {
// window.location.href = 's/' + self.folderId + "/" + self.slug;
// });
}, function() {
window.location.href = "/";
});
});
});
},
});

View file

@ -1,59 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
isEmpty,
isEqual,
computed,
set
} = Ember;
export default Ember.Component.extend({
password: "",
passwordConfirm: "",
mustMatch: false,
passwordEmpty: computed.empty('password'),
confirmEmpty: computed.empty('passwordConfirm'),
hasPasswordError: computed.and('passwordEmpty', 'passwordIsEmpty'),
hasConfirmError: computed.and('confirmEmpty', 'passwordConfirmIsEmpty'),
actions: {
reset() {
let password = this.get('password');
let passwordConfirm = this.get('passwordConfirm');
if (isEmpty(password)) {
set(this, 'passwordIsEmpty', true);
return $("#newPassword").focus();
}
if (isEmpty(passwordConfirm)) {
set(this, 'passwordConfirmIsEmpty', true);
return $("#passwordConfirm").focus();
}
if (!isEqual(password, passwordConfirm)) {
set(this, 'hasPasswordError', true);
set(this, 'hasConfirmError', true);
set(this, 'mustMatch', true);
return;
}
this.get('reset')(password).then(() => {
set(this, 'passwordIsEmpty', false);
set(this, 'passwordConfirmIsEmpty', false);
});
}
}
});

View file

@ -1,54 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
results: [],
resultPhrase: "",
didReceiveAttrs() {
let results = this.get('results');
let temp = _.groupBy(results, 'documentId');
let documents = [];
_.each(temp, function (document) {
let refs = [];
if (document.length > 1) {
refs = document.slice(1);
}
_.each(refs, function (ref, index) {
ref.comma = index === refs.length - 1 ? "" : ", ";
});
let hasRefs = refs.length > 0;
documents.pushObject({
doc: document[0],
ref: refs,
hasReferences: hasRefs
});
});
let phrase = 'Nothing found';
if (results.length > 0) {
let references = results.length === 1 ? "reference" : "references";
let i = results.length;
phrase = `${i} ${references}`;
}
this.set('resultPhrase', phrase);
this.set('documents', documents);
}
});

View file

@ -1,34 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
documentTags: [],
tagz: [],
init() {
this._super(...arguments);
let tagz = [];
if (this.get('documentTags').length > 1) {
let tags = this.get('documentTags').split('#');
_.each(tags, function(tag) {
if (tag.length > 0) {
tagz.pushObject(tag);
}
});
}
this.set('tagz', tagz);
}
});

View file

@ -1,39 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
data: "",
didReceiveAttrs() {
this.set("data", this.get("meta.rawBody"));
},
actions: {
isDirty() {
return this.get('meta.rawBody') !== this.get('data');
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('rawBody', this.get("data"));
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,143 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
computed,
} = Ember;
export default Ember.Component.extend({
drop: null,
busy: false,
mousetrap: null,
hasNameError: computed.empty('page.title'),
containerId: Ember.computed('page', function () {
let page = this.get('page');
return `base-editor-inline-container-${page.id}`;
}),
pageId: Ember.computed('page', function () {
let page = this.get('page');
return `page-editor-${page.id}`;
}),
cancelId: Ember.computed('page', function () {
let page = this.get('page');
return `cancel-edits-button-${page.id}`;
}),
dialogId: Ember.computed('page', function () {
let page = this.get('page');
return `discard-edits-dialog-${page.id}`;
}),
contentLinkerButtonId: Ember.computed('page', function () {
let page = this.get('page');
return `content-linker-button-${page.id}`;
}),
previewButtonId: Ember.computed('page', function () {
let page = this.get('page');
return `content-preview-button-${page.id}`;
}),
didRender() {
let msContainer = document.getElementById(this.get('containerId'));
let mousetrap = this.get('mousetrap');
if (is.null(mousetrap)) {
mousetrap = new Mousetrap(msContainer);
}
mousetrap.bind('esc', () => {
this.send('onCancel');
return false;
});
mousetrap.bind(['ctrl+s', 'command+s'], () => {
this.send('onAction');
return false;
});
this.set('mousetrap', mousetrap);
$('#' + this.get('pageId')).focus(function() {
$(this).select();
});
},
willDestroyElement() {
let drop = this.get('drop');
if (is.not.null(drop)) {
drop.destroy();
}
let mousetrap = this.get('mousetrap');
if (is.not.null(mousetrap)) {
mousetrap.unbind('esc');
mousetrap.unbind(['ctrl+s', 'command+s']);
}
},
actions: {
onCancel() {
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
$('#' + this.get('dialogId')).css("display", "block");
let drop = new Drop({
target: $('#' + this.get('cancelId'))[0],
content: $('#' + this.get('dialogId'))[0],
classes: 'drop-theme-basic',
position: "bottom right",
openOn: "always",
constrainToWindow: true,
constrainToScrollParent: false,
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0"
},
remove: false
});
this.set('drop', drop);
return;
}
this.attrs.onCancel();
},
onAction() {
if (this.get('busy') || is.empty(this.get('page.title'))) {
return;
}
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
this.attrs.onAction(this.get('page.title'));
},
keepEditing() {
let drop = this.get('drop');
drop.close();
},
discardEdits() {
this.attrs.onCancel();
},
onInsertLink(selection) {
return this.get('onInsertLink')(selection);
},
onPreview() {
return this.get('onPreview')();
},
}
});

View file

@ -1,107 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
drop: null,
cancelLabel: "Close",
actionLabel: "Save",
tip: "Short and concise title",
busy: false,
hasExcerpt: Ember.computed('page', function () {
return is.not.undefined(this.get('page.excerpt'));
}),
didRender() {
let self = this;
Mousetrap.bind('esc', function () {
self.send('onCancel');
return false;
});
Mousetrap.bind(['ctrl+s', 'command+s'], function () {
self.send('onAction');
return false;
});
$("#page-title").removeClass("error");
$("#page-excerpt").removeClass("error");
$("#page-title").focus(function() {
$(this).select();
});
$("#page-excerpt").focus(function() {
$(this).select();
});
},
willDestroyElement() {
let drop = this.get('drop');
if (is.not.null(drop)) {
drop.destroy();
}
},
actions: {
onCancel() {
if (this.attrs.isDirty() !== null && this.attrs.isDirty()) {
$(".discard-edits-dialog").css("display", "block");
let drop = new Drop({
target: $("#editor-cancel")[0],
content: $(".cancel-edits-dialog")[0],
classes: 'drop-theme-basic',
position: "bottom right",
openOn: "always",
tetherOptions: {
offset: "5px 0",
targetOffset: "10px 0"
},
remove: false
});
this.set('drop', drop);
return;
}
this.attrs.onCancel();
},
onAction() {
if (this.get('busy')) {
return;
}
if (is.empty(this.get('page.title'))) {
$("#page-title").addClass("error").focus();
return;
}
if (this.get('hasExcerpt') && is.empty(this.get('page.excerpt'))) {
$("#page-excerpt").addClass("error").focus();
return;
}
this.attrs.onAction(this.get('page.title'));
},
keepEditing() {
let drop = this.get('drop');
drop.close();
},
discardEdits() {
this.attrs.onCancel();
}
}
});

View file

@ -1,143 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../../mixins/tooltip';
export default Ember.Component.extend(TooltipMixin, {
isDirty: false,
pageBody: "",
syntaxOptions: [],
codeSyntax: null,
codeEditor: null,
editorId: Ember.computed('page', function () {
let page = this.get('page');
return `code-editor-${page.id}`;
}),
syntaxId: Ember.computed('page', function () {
let page = this.get('page');
return `code-editor-syntax-${page.id}`;
}),
init() {
this._super(...arguments);
let self = this;
let rawBody = this.get('meta.rawBody');
let cleanBody = rawBody.replace("</pre>", "");
cleanBody = cleanBody.replace('<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="', "");
let startPos = cleanBody.indexOf('">');
let syntax = {
mode: "htmlmixed",
name: "HTML"
};
if (startPos !== -1) {
syntax = cleanBody.substring(0, startPos);
cleanBody = cleanBody.substring(startPos + 2);
}
this.set('pageBody', cleanBody);
let opts = [];
_.each(_.sortBy(CodeMirror.modeInfo, 'name'), function(item) {
let i = { mode: item.mode, name: item.name };
opts.pushObject(i);
if (item.mode === syntax) {
self.set('codeSyntax', i);
}
});
this.set('syntaxOptions', opts);
// default check
if (is.null(this.get("codeSyntax"))) {
this.set("codeSyntax", opts.findBy("mode", "htmlmixed"));
}
},
didInsertElement() {
var editor = CodeMirror.fromTextArea(document.getElementById(this.get('editorId')), {
theme: "material",
lineNumbers: true,
lineWrapping: true,
indentUnit: 4,
tabSize: 4,
value: "",
dragDrop: false
});
CodeMirror.commands.save = function(/*instance*/){
Mousetrap.trigger('ctrl+s');
};
this.set('codeEditor', editor);
let syntax = this.get("codeSyntax");
if (is.not.undefined(syntax)) {
CodeMirror.autoLoadMode(editor, syntax.mode);
editor.setOption("mode", syntax.mode);
}
},
willDestroyElement() {
let editor = this.get('codeEditor');
if (is.not.null(editor)) {
editor.toTextArea();
editor = null;
this.set('codeEditor', null);
}
this.destroyTooltips();
},
// Wrap code in PRE tag with language identifier for subsequent rendering.
getPRE() {
let codeSyntax = this.get("codeSyntax.mode");
let body = this.get('codeEditor').getDoc().getValue();
return `<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="${codeSyntax}">${body}</pre>`;
},
actions: {
onSyntaxChange(syntax) {
let editor = this.get('codeEditor');
CodeMirror.autoLoadMode(editor, syntax.mode);
editor.setOption("mode", syntax.mode);
this.set('isDirty', true);
this.set('codeSyntax', syntax);
},
isDirty() {
return this.get('isDirty') || (this.get('codeEditor').getDoc().isClean() === false);
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
meta.set('rawBody', this.getPRE());
page.set('title', title);
page.set('body', meta.get('rawBody'));
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,85 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
codeBody: "",
codeSyntax: "htmlmixed",
didReceiveAttrs() {
this._super(...arguments);
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
let page = this.get('page');
let rawBody = page.get('body');
let cleanBody = rawBody.replace("</pre>", "").replace('<pre class="code-mirror cm-s-solarized cm-s-dark" data-lang="', "");
let startPos = cleanBody.indexOf('">');
if (startPos !== -1) {
this.set('codeSyntax', cleanBody.substring(0, startPos));
this.set('codeBody', cleanBody.substring(startPos + 2));
}
_.each(_.sortBy(CodeMirror.modeInfo, 'name'), (item) => {
let i = { mode: item.mode, name: item.name };
if (item.mode === this.get('codeSyntax')) {
this.set('codeSyntax', i);
}
});
},
didInsertElement() {
this._super(...arguments);
if (this.get('isDestroyed') || this.get('isDestroying')) {
return;
}
let page = this.get('page');
let elem = `page-${page.id}-code`;
var editor = CodeMirror.fromTextArea(document.getElementById(elem), {
theme: "material",
lineNumbers: true,
lineWrapping: true,
indentUnit: 4,
tabSize: 4,
value: "",
dragDrop: false,
readOnly: true
});
this.set('codeEditor', editor);
let syntax = this.get("codeSyntax");
if (is.not.undefined(syntax)) {
CodeMirror.autoLoadMode(editor, syntax.mode);
editor.setOption("mode", syntax.mode);
}
},
willDestroyElement() {
this._super(...arguments);
let editor = this.get('codeEditor');
if (is.not.null(editor)) {
editor.toTextArea();
editor = null;
}
this.set('codeEditor', null);
}
});

View file

@ -1,228 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../../mixins/notifier';
import TooltipMixin from '../../../mixins/tooltip';
import SectionMixin from '../../../mixins/section';
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
sectionService: Ember.inject.service('section'),
isDirty: false,
waiting: false,
authenticated: false,
user: {},
workspaces: [],
config: {},
didReceiveAttrs() {
let config = {};
try {
config = JSON.parse(this.get('meta.config'));
} catch (e) {} // eslint-disable-line no-empty
if (is.empty(config)) {
config = {
APIKey: "",
filter: {},
itemCount: 0,
url: "",
userId: 0,
username: "",
workspaceId: 0,
workspaceName: "",
};
}
this.set('config', config);
let self = this;
self.set('waiting', true);
this.get('sectionService').fetch(this.get('page'), "secrets", this.get('config'))
.then(function (response) {
self.set('waiting', false);
self.set('config.APIKey', response.apikey);
self.set('config.url', response.url);
self.set('config.username', response.username);
if (response.apikey.length > 0 && response.url.length > 0 && response.username.length > 0) {
self.send('auth');
}
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('waiting', false);
if (self.get('config.userId') > 0) {
self.send('auth');
}
});
},
willDestroyElement() {
this.destroyTooltips();
},
getWorkspaces() {
let page = this.get('page');
let self = this;
this.set('waiting', true);
this.get('sectionService').fetch(page, "workspace", this.get('config'))
.then(function (response) {
// console.log(response);
let workspaceId = self.get('config.workspaceId');
if (response.length > 0 && workspaceId === 0) {
workspaceId = response[0].Id;
}
self.set("config.workspaceId", workspaceId);
self.set('workspaces', response);
self.selectWorkspace(workspaceId);
Ember.run.schedule('afterRender', function () {
window.scrollTo(0, document.body.scrollHeight);
response.forEach(function (workspace) {
self.addTooltip(document.getElementById("gemini-workspace-" + workspace.Id));
});
});
self.set('waiting', false);
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('workspaces', []);
self.set('waiting', false);
});
},
getItems() {
let page = this.get('page');
let self = this;
this.set('waiting', true);
this.get('sectionService').fetch(page, "items", this.get('config'))
.then(function (response) {
if (self.get('isDestroyed') || self.get('isDestroying')) {
return;
}
self.set('items', response);
self.set('config.itemCount', response.length);
self.set('waiting', false);
}, function (reason) { // eslint-disable-line no-unused-vars
if (self.get('isDestroyed') || self.get('isDestroying')) {
return;
}
self.set('items', []);
self.set('waiting', false);
});
},
selectWorkspace(id) {
let self = this;
let w = this.get('workspaces');
w.forEach(function (w) {
Ember.set(w, 'selected', w.Id === id);
if (w.Id === id) {
self.set("config.filter", w.Filter);
self.set("config.workspaceId", id);
self.set("config.workspaceName", w.Title);
// console.log(self.get('config'));
}
});
this.set('workspaces', w);
this.getItems();
},
actions: {
isDirty() {
return this.get('isDirty');
},
auth() {
// missing data?
if (is.empty(this.get('config.url'))) {
$("#gemini-url").addClass("error").focus();
return;
}
if (is.empty(this.get('config.username'))) {
$("#gemini-username").addClass("error").focus();
return;
}
if (is.empty(this.get('config.APIKey'))) {
$("#gemini-apikey").addClass("error").focus();
return;
}
// knock out spaces
this.set('config.url', this.get('config.url').trim());
this.set('config.username', this.get('config.username').trim());
this.set('config.APIKey', this.get('config.APIKey').trim());
// remove trailing slash in URL
let url = this.get('config.url');
if (url.indexOf("/", url.length - 1) !== -1) {
this.set('config.url', url.substring(0, url.length - 1));
}
let page = this.get('page');
let self = this;
this.set('waiting', true);
this.get('sectionService').fetch(page, "auth", this.get('config'))
.then(function (response) {
self.set('authenticated', true);
self.set('user', response);
self.set('config.userId', response.BaseEntity.id);
self.set('waiting', false);
self.getWorkspaces();
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('authenticated', false);
self.set('user', null);
self.set('config.userId', 0);
self.set('waiting', false);
switch (reason.status) {
case 400:
self.showNotification(`Unable to connect to Gemini URL`);
break;
case 403:
self.showNotification(`Unable to authenticate`);
break;
default:
self.showNotification(`Something went wrong, try again!`);
}
});
},
onWorkspaceChange(id) {
this.set('isDirty', true);
this.selectWorkspace(id);
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('rawBody', JSON.stringify(this.get("items")));
meta.set('config', JSON.stringify(this.get('config')));
meta.set('externalSource', true);
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,263 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../../mixins/notifier';
import TooltipMixin from '../../../mixins/tooltip';
import SectionMixin from '../../../mixins/section';
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
sectionService: Ember.inject.service('section'),
isDirty: false,
busy: false,
authenticated: false,
config: {},
owners: null,
didReceiveAttrs() {
let self = this;
let page = this.get('page');
if (is.undefined(this.get('config.clientId')) || is.undefined(this.get('config.callbackUrl'))) {
self.get('sectionService').fetch(page, "config", {})
.then(function (cfg) {
let config = {};
config = {
clientId: cfg.clientID,
callbackUrl: cfg.authorizationCallbackURL,
owner: null,
owner_name: "",
lists: [],
branchSince: "",
branchLines: "100",
userId: "",
pageId: page.get('id'),
showMilestones: false,
showIssues: false,
showCommits: true,
};
try {
let metaConfig = JSON.parse(self.get('meta.config'));
config.owner = metaConfig.owner;
config.lists = metaConfig.lists;
config.branchSince = metaConfig.branchSince;
config.userId = metaConfig.userId;
config.pageId = metaConfig.pageId;
config.showMilestones = metaConfig.showMilestones;
config.showIssues = metaConfig.showIssues;
config.showCommits = metaConfig.showCommits;
} catch (e) { // eslint-disable-line no-empty
}
if (_.isUndefined(config.showCommits)) {
config.showCommits = true;
}
self.set('config', config);
self.set('config.pageId', page.get('id'));
// On auth callback capture code
let code = window.location.search;
code = code.replace("?mode=edit", "");
if (is.not.undefined(code) && is.not.null(code) && is.not.empty(code) && code !== "") {
let tok = code.replace("&code=", "");
self.get('sectionService').fetch(page, "saveSecret", { "token": tok })
.then(function () {
self.send('authStage2');
}, function (error) { //jshint ignore: line
console.log(error); // eslint-disable-line no-console
self.send('auth');
});
} else {
if (config.userId !== self.get("session.session.authenticated.user.id")) {
console.log("github auth wrong user ID, switching"); // eslint-disable-line no-console
self.set('config.userId', self.get("session.session.authenticated.user.id"));
}
self.get('sectionService').fetch(page, "checkAuth", self.get('config'))
.then(function () {
self.send('authStage2');
}, function (error) {
console.log(error); // eslint-disable-line no-console
self.send('auth'); // require auth if the db token is invalid
});
}
}, function (error) {
console.log(error); // eslint-disable-line no-console
});
}
},
willDestroyElement() {
this.destroyTooltips();
},
getOwnerLists() {
this.set('busy', true);
let owners = this.get('owners');
let thisOwner = this.get('config.owner');
if (is.null(thisOwner) || is.undefined(thisOwner)) {
if (owners.length) {
thisOwner = owners[0];
this.set('config.owner', thisOwner);
}
} else {
this.set('config.owner', owners.findBy('id', thisOwner.id));
}
this.set('owner', thisOwner);
this.getOrgReposLists();
if (is.undefined(this.get('initDateTimePicker'))) {
$.datetimepicker.setLocale('en');
$('#branch-since').datetimepicker();
this.set('initDateTimePicker', "Done");
}
},
getOrgReposLists() {
this.set('busy', true);
let self = this;
let page = this.get('page');
this.get('sectionService').fetch(page, "orgrepos", self.get('config'))
.then(function (lists) {
let savedLists = self.get('config.lists');
if (savedLists === null) {
savedLists = [];
}
if (lists.length > 0) {
let noIncluded = true;
lists.forEach(function (list) {
let included = false;
var saved;
if (is.not.undefined(savedLists)) {
saved = savedLists.findBy("id", list.id);
}
if (is.not.undefined(saved)) {
included = saved.included;
noIncluded = false;
}
list.included = included;
});
if (noIncluded) {
lists[0].included = true; // make the first entry the default
}
}
self.set('config.lists', lists);
self.set('busy', false);
}, function (error) {
self.set('busy', false);
self.set('authenticated', false);
self.showNotification("Unable to fetch repositories");
console.log(error); // eslint-disable-line no-console
});
},
actions: {
isDirty() {
return this.get('isDirty');
},
onListCheckbox(id) { // select one repository only
let lists = this.get('config.lists');
let list = lists.findBy('id', id);
lists.forEach(function (entry) {
Ember.set(entry, 'included', false);
});
if (list !== null) {
Ember.set(list, 'included', true);
}
},
authStage2() {
let self = this;
self.set('config.userId', self.get("session.session.authenticated.user.id"));
self.set('authenticated', true);
self.set('busy', true);
let page = this.get('page');
self.get('sectionService').fetch(page, "owners", self.get('config'))
.then(function (owners) {
self.set('busy', false);
self.set('owners', owners);
self.getOwnerLists();
}, function (error) {
self.set('busy', false);
self.set('authenticated', false);
self.showNotification("Unable to fetch owners");
console.log(error); // eslint-disable-line no-console
});
},
auth() {
let self = this;
self.set('busy', true);
self.set('authenticated', false);
let target = "https://github.com/login/oauth/authorize?client_id=" + self.get('config.clientId') +
"&scope=repo&redirect_uri=" + encodeURIComponent(self.get('config.callbackUrl')) +
"&state=" + encodeURIComponent(window.location.href);
window.location.href = target;
},
onOwnerChange(thisOwner) {
this.set('isDirty', true);
this.set('config.owner', thisOwner);
this.set('config.lists', []);
this.getOwnerLists();
},
onStateChange(thisState) {
this.set('config.state', thisState);
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
this.set('busy', true);
let self = this;
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('rawBody', '');
meta.set('config', JSON.stringify(this.get('config')));
meta.set('externalSource', true);
this.get('sectionService').fetch(page, 'content', this.get('config'))
.then(function (response) {
meta.set('rawBody', JSON.stringify(response));
self.set('busy', false);
self.attrs.onAction(page, meta);
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('busy', false);
self.attrs.onAction(page, meta);
});
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,129 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../../mixins/tooltip';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend(TooltipMixin, {
link: service(),
pageBody: "",
pagePreview: "",
editMode: true,
codeSyntax: null,
codeEditor: null,
editorId: Ember.computed('page', function () {
let page = this.get('page');
return `markdown-editor-${page.id}`;
}),
previewId: Ember.computed('page', function () {
let page = this.get('page');
return `markdown-preview-${page.id}`;
}),
init() {
this._super(...arguments);
this.set('pageBody', this.get('meta.rawBody').trim());
},
didInsertElement() {
this.attachEditor();
this.addTooltip(document.getElementById(this.get('tooltipId')));
},
willDestroyElement() {
let editor = this.get('codeEditor');
if (this.get('editMode')) {
editor.toTextArea();
editor = null;
}
this.set('codeEditor', null);
this.destroyTooltips();
},
getBody() {
return this.get('codeEditor').getDoc().getValue().trim();
},
attachEditor() {
var editor = CodeMirror.fromTextArea(document.getElementById(this.get('editorId')), {
theme: "default",
mode: "markdown",
lineNumbers: false,
lineWrapping: true,
indentUnit: 4,
tabSize: 4,
value: "",
dragDrop: false,
extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"}
});
CodeMirror.commands.save = function(/*instance*/){
Mousetrap.trigger('ctrl+s');
};
this.set('codeEditor', editor);
let syntax = this.get("codeSyntax");
if (is.not.undefined(syntax)) {
CodeMirror.autoLoadMode(editor, "markdown");
editor.setOption("mode", "markdown");
}
},
actions: {
onPreview() {
this.set('editMode', !this.get('editMode'));
Ember.run.schedule('afterRender', () => {
if (this.get('editMode')) {
this.attachEditor();
} else {
this.set('pageBody',this.getBody());
let md = window.markdownit({ linkify: true });
let result = md.render(this.getBody());
this.set('pagePreview', result);
}
});
},
onInsertLink(link) {
let linkMarkdown = this.get('link').buildLink(link);
this.get('codeEditor').getDoc().replaceSelection(linkMarkdown);
return true;
},
isDirty() {
return this.get('codeEditor').getDoc().isClean() === false;
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('rawBody', this.getBody());
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,186 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import NotifierMixin from '../../../mixins/notifier';
import TooltipMixin from '../../../mixins/tooltip';
import SectionMixin from '../../../mixins/section';
import netUtil from '../../../utils/net';
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
sectionService: Ember.inject.service('section'),
isDirty: false,
waiting: false,
authenticated: false,
config: {},
items: {},
didReceiveAttrs() {
let config = {};
try {
config = JSON.parse(this.get('meta.config'));
} catch (e) {} // eslint-disable-line no-empty
if (is.empty(config)) {
config = {
APIToken: "",
query: "",
max: 10,
group: null,
system: null
};
}
this.set('config', config);
this.send('auth');
},
willDestroyElement() {
this.destroyTooltips();
},
displayError(reason) {
if (netUtil.isAjaxAccessError(reason)) {
this.showNotification(`Unable to authenticate`);
} else {
this.showNotification(`Something went wrong, try again!`);
}
},
actions: {
isDirty() {
return this.get('isDirty');
},
auth() {
let page = this.get('page');
let config = this.get('config');
let self = this;
this.set('waiting', true);
this.get('sectionService').fetch(page, "auth", config)
.then(function (response) {
self.set('authenticated', true);
self.set('items', response);
self.set('config.APIToken', '********'); // reset the api token once it has been sent to the host
self.get('sectionService').fetch(page, "options", config)
.then(function (response) {
self.set('options', response);
self.set('waiting', false);
let options = self.get('options');
let group = {};
if (is.not.null(config.group)) {
group = _.findWhere(options.groups, { id: config.group.id });
} else {
group = options.groups[0];
}
if (is.not.undefined(group)) {
Ember.set(config, 'group', group);
}
}, function (reason) {
self.set('authenticated', false);
self.set('waiting', false);
self.set('config.APIToken', ''); // clear the api token
self.displayError(reason);
console.log("get options call failed"); // eslint-disable-line no-console
});
}, function (reason) {
self.set('authenticated', false);
self.set('waiting', false);
self.set('config.APIToken', ''); // clear the api token
self.displayError(reason);
console.log("auth token invalid"); // eslint-disable-line no-console
});
},
onGroupsChange(group) {
let config = this.get('config');
let page = this.get('page');
let self = this;
this.set('isDirty', true);
this.set('config.group', group);
this.set('waiting', true);
this.get('sectionService').fetch(page, "auth", config)
.then(function (response) {
self.set('waiting', false);
self.set('items', response);
}, function (reason) { //jshint ignore: line
self.set('waiting', false);
self.displayError(reason);
});
},
onSystemsChange(system) {
let config = this.get('config');
let page = this.get('page');
let self = this;
this.set('isDirty', true);
this.set('config.system', system);
this.set('waiting', true);
this.get('sectionService').fetch(page, "auth", config)
.then(function (response) {
self.set('waiting', false);
self.set('items', response);
}, function (reason) { //jshint ignore: line
self.set('waiting', false);
self.displayError(reason);
});
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let self = this;
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('externalSource', true);
let config = this.get('config');
let max = 10;
if (is.number(parseInt(config.max))) {
max = parseInt(config.max);
}
Ember.set(config, 'max', max);
this.set('waiting', true);
this.get('sectionService').fetch(page, "auth", this.get('config'))
.then(function (response) {
self.set('items', response);
let items = self.get('items');
if (items.events.length > max) {
items.events = items.events.slice(0, max);
}
meta.set('config', JSON.stringify(config));
meta.set('rawBody', JSON.stringify(items));
self.set('waiting', false);
self.attrs.onAction(page, meta);
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('authenticated', false);
self.set('waiting', false);
self.showNotification(`Something went wrong, try again!`);
});
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,73 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
isDirty: false,
pageBody: "",
editorId: Ember.computed('page', function () {
let page = this.get('page');
return `table-editor-${page.id}`;
}),
defaultTable: '<table class="wysiwyg-table" style="width: 100%;"><thead><tr><th><br></th><th><br></th><th><br></th><th><br></th></tr></thead><tbody><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr><tr><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td><td style="width: 25.0000%;"><br></td></tr></tbody></table>',
didReceiveAttrs() {
this.set('pageBody', this.get('meta.rawBody'));
if (is.empty(this.get('pageBody'))) {
this.set('pageBody', this.get('defaultTable'));
}
},
didInsertElement() {
let id = '#' + this.get('editorId');
$(id).froalaEditor({
toolbarButtons: [],
toolbarInline: true,
tableResizerOffset: 10
});
$(id).on('froalaEditor.contentChanged', () => {
this.set('isDirty', true);
});
},
willDestroyElement() {
$('#' + this.get('editorId')).off('froalaEditor.contentChanged');
},
actions: {
isDirty() {
return this.get('isDirty');
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
let body = $('#' + this.get('editorId')).froalaEditor('html.get', true);
page.set('title', title);
if (is.empty(body)) {
body = this.get('defaultTable');
}
meta.set('rawBody', body);
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,242 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
/*global Trello*/
import Ember from 'ember';
import NotifierMixin from '../../../mixins/notifier';
import TooltipMixin from '../../../mixins/tooltip';
import SectionMixin from '../../../mixins/section';
export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
sectionService: Ember.inject.service('section'),
isDirty: false,
busy: false,
authenticated: false,
config: {},
boards: null,
noBoards: false,
appKey: "",
boardStyle: Ember.computed('config.board', function () {
let board = this.get('config.board');
if (is.null(board) || is.undefined(board)) {
return "#4c4c4c";
}
let color = board.prefs.backgroundColor;
return Ember.String.htmlSafe("background-color: " + color);
}),
didReceiveAttrs() {
let page = this.get('page');
let config = {};
let self = this;
try {
config = JSON.parse(this.get('meta.config'));
} catch (e) {} // eslint-disable-line no-empty
if (is.empty(config)) {
config = {
token: "",
user: null,
board: null,
lists: []
};
}
this.set('config', config);
this.get('sectionService').fetch(page, "config", {})
.then(function (s) {
self.set('appKey', s.appKey);
self.set('config.token', s.token); // the user's own token has been stored in the DB
// On auth callback capture user token
let hashToken = window.location.hash;
if (is.not.undefined(hashToken) && is.not.null(hashToken)) {
let token = hashToken.replace("#token=", "");
if (is.not.empty(token)) {
self.set('config.token', token);
}
}
if (self.get('appKey') !== "" && self.get('config.token') !== "") {
self.send('auth');
} else {
Ember.$.getScript("https://api.trello.com/1/client.js?key=" + self.get('appKey'), function () {
Trello.deauthorize();
});
}
}, function (error) {
console.log(error); // eslint-disable-line no-console
});
},
willDestroyElement() {
this.destroyTooltips();
},
getBoardLists() {
this.set('busy', true);
let self = this;
let boards = this.get('boards');
let board = this.get('config.board');
let page = this.get('page');
if (is.null(boards) || is.undefined(boards) || boards.length === 0) {
this.set('noBoards', true);
return;
}
this.set('noBoards', false);
if (is.null(board) || is.undefined(board)) {
if (boards.length) {
board = boards[0];
this.set('config.board', board);
}
} else {
this.set('config.board', boards.findBy('id', board.id));
}
this.get('sectionService').fetch(page, "lists", self.get('config'))
.then(function (lists) {
let savedLists = self.get('config.lists');
if (savedLists === null) {
savedLists = [];
}
lists.forEach(function (list) {
let saved = savedLists.findBy("id", list.id);
let included = true;
if (is.not.undefined(saved)) {
included = saved.included;
}
list.included = included;
});
self.set('config.lists', lists);
self.set('busy', false);
}, function (error) { //jshint ignore: line
self.set('busy', false);
self.set('authenticated', false);
self.showNotification("Unable to fetch board lists");
console.log(error); // eslint-disable-line no-console
});
},
actions: {
isDirty() {
return this.get('isDirty');
},
onListCheckbox(id) {
let lists = this.get('config.lists');
let list = lists.findBy('id', id);
if (list !== null) {
Ember.set(list, 'included', !list.included);
}
},
auth() {
if (this.get('appKey') === "") {
$("#trello-appkey").addClass('error').focus();
this.set('authenticated', false);
return;
}
let self = this;
let page = this.get('page');
self.set('busy', true);
Ember.$.getScript("https://api.trello.com/1/client.js?key=" + this.get('appKey'), function () {
Trello.authorize({
type: "redirect",
interactive: true,
name: "Documize",
scope: {
read: true,
write: false
},
expiration: "never",
persist: true,
success: function () {
self.set('authenticated', true);
self.set('config.token', Trello.token());
self.set('busy', true);
Trello.members.get("me", function (user) {
self.set('config.user', user);
}, function (error) {
console.log(error); // eslint-disable-line no-console
});
self.get('sectionService').fetch(page, "boards", self.get('config'))
.then(function (boards) {
self.set('busy', false);
self.set('boards', boards);
self.getBoardLists();
}, function (error) { //jshint ignore: line
self.set('busy', false);
self.set('authenticated', false);
self.showNotification("Unable to fetch boards");
console.log(error); // eslint-disable-line no-console
});
},
error: function (error) {
self.set('busy', false);
self.set('authenticated', false);
self.showNotification("Unable to authenticate");
console.log(error); // eslint-disable-line no-console
}
});
});
},
onBoardChange(board) {
this.set('isDirty', true);
this.set('config.board', board);
this.set('config.lists', []);
this.getBoardLists();
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
this.set('busy', true);
let self = this;
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
meta.set('rawBody', '');
meta.set('config', JSON.stringify(this.get('config')));
meta.set('externalSource', true);
this.get('sectionService').fetch(page, "cards", this.get('config'))
.then(function (response) {
meta.set('rawBody', JSON.stringify(response));
self.set('busy', false);
self.attrs.onAction(page, meta);
}, function (reason) { // eslint-disable-line no-unused-vars
self.set('busy', false);
self.attrs.onAction(page, meta);
});
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,134 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
const {
inject: { service }
} = Ember;
export default Ember.Component.extend({
appMeta: service(),
link: service(),
pageBody: "",
editorId: Ember.computed('page', function () {
let page = this.get('page');
return `wysiwyg-editor-${page.id}`;
}),
didReceiveAttrs() {
this.set('pageBody', this.get('meta.rawBody'));
},
didInsertElement() {
let options = {
selector: "#" + this.get('editorId'),
relative_urls: false,
cache_suffix: "?v=443",
browser_spellcheck: false,
gecko_spellcheck: false,
theme: "modern",
skin: 'documize',
statusbar: false,
inline: true,
entity_encoding: "raw",
paste_data_images: true,
image_advtab: true,
image_caption: true,
media_live_embeds: true,
fontsize_formats: "8px 10px 12px 14px 17px 18px 24px 36px 40px 50px 60px",
formats: {
bold: {
inline: 'b'
},
italic: {
inline: 'i'
}
},
codesample_languages: [
{text: 'HTML/XML', value: 'markup'},
{text: 'JavaScript', value: 'javascript'},
{text: 'CSS', value: 'css'},
{text: 'PHP', value: 'php'},
{text: 'Ruby', value: 'ruby'},
{text: 'Python', value: 'python'},
{text: 'Java', value: 'java'},
{text: 'C', value: 'c'},
{text: 'C#', value: 'csharp'},
{text: 'C++', value: 'cpp'}],
extended_valid_elements: "b,i,b/strong,i/em",
plugins: [
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code codesample fullscreen',
'insertdatetime media nonbreaking save table directionality',
'template paste textcolor colorpicker textpattern imagetools'
],
menu: {},
menubar: false,
toolbar1: "formatselect fontsizeselect | bold italic underline strikethrough superscript subscript | forecolor backcolor link unlink",
toolbar2: "outdent indent bullist numlist | alignleft aligncenter alignright alignjustify | table image media codesample",
save_onsavecallback: function () {
Mousetrap.trigger('ctrl+s');
}
};
if (typeof tinymce === 'undefined') {
$.getScript("/tinymce/tinymce.min.js?v=443", function () {
window.tinymce.dom.Event.domLoaded = true;
tinymce.baseURL = "//" + window.location.host + "/tinymce";
tinymce.suffix = ".min";
tinymce.init(options);
});
} else {
tinymce.init(options);
}
},
willDestroyElement() {
tinymce.EditorManager.execCommand('mceRemoveEditor', true, this.get('editorId'));
},
actions: {
onInsertLink(link) {
let editor = tinymce.EditorManager.get(this.get('editorId'));
let userSelection = editor.selection.getContent();
if (is.not.empty(userSelection)) {
Ember.set(link, 'title', userSelection);
}
let linkHTML = this.get('link').buildLink(link);
editor.insertContent(linkHTML);
return true;
},
isDirty() {
let editor = tinymce.EditorManager.get(this.get('editorId'));
return is.not.undefined(tinymce) && is.not.undefined(editor) && editor.isDirty();
},
onCancel() {
this.attrs.onCancel();
},
onAction(title) {
let page = this.get('page');
let meta = this.get('meta');
let editor = tinymce.EditorManager.get(this.get('editorId'));
page.set('title', title);
meta.set('rawBody', editor.getContent());
this.attrs.onAction(page, meta);
}
}
});

View file

@ -1,14 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({});

View file

@ -1,20 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import TooltipMixin from '../../mixins/tooltip';
export default Ember.Component.extend(TooltipMixin, {
didRender() {
let refId = this.get('refId');
this.addTooltip(document.getElementById(`avatar-${refId}`));
},
});

View file

@ -1,28 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
value: '',
onClick: null,
actions: {
onCheck() {
if (this.get('onClick') !== null) {
this.attrs.onClick(this.get('value'));
} else {
this.set('selected', !this.get('selected'));
}
}
}
});

View file

@ -1,15 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
});

View file

@ -1,32 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Component.extend({
myWidth: Ember.computed('tabs', function() {
let count = this.get('tabs.length');
let width = 95 / count;
return Ember.String.htmlSafe("width: " + `${width}%;`);
}),
actions: {
onTabSelect(tab) {
this.get('tabs').forEach(t => {
Ember.set(t, 'selected', false);
});
Ember.set(tab, 'selected', true);
this.attrs.onTabSelect(this.get('tabs'));
}
}
});

View file

@ -1,52 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import miscUtil from '../utils/misc';
export default Ember.Component.extend({
notifications: [],
didInsertElement() {
this.eventBus.subscribe('notifyUser', this, 'showNotification');
},
willDestroyElement() {
this.eventBus.unsubscribe('notifyUser');
},
showNotification(msg) {
let self = this;
let notifications = this.get('notifications');
notifications.pushObject(msg);
this.set('notifications', notifications);
let elem = this.$(".user-notification")[0];
Ember.run(() => {
self.$(elem).show();
// FIXME: need a more robust solution
miscUtil.interval(function() {
let notifications = self.get('notifications');
if (notifications.length > 0) {
notifications.removeAt(0);
self.set('notifications', notifications);
}
if (notifications.length === 0) {
self.$(elem).hide();
}
}, 2500, self.get('notifications').length);
});
},
});

View file

@ -1,84 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import AuthProvider from '../mixins/auth';
const {
computed,
isEmpty,
isEqual,
isPresent
} = Ember;
export default Ember.Component.extend(AuthProvider, {
password: { password: "", confirmation: "" },
hasFirstnameError: computed.empty('model.firstname'),
hasLastnameError: computed.empty('model.lastname'),
hasEmailError: computed.empty('model.email'),
hasPasswordError: computed('passwordError', 'password.password', {
get() {
if (isPresent(this.get('passwordError'))) {
return `error`;
}
if (isEmpty(this.get('password.password'))) {
return null;
}
}
}),
hasConfirmPasswordError: computed('confirmPasswordError', {
get() {
if (isPresent(this.get("confirmPasswordError"))) {
return `error`;
}
return;
}
}),
actions: {
save() {
let password = this.get('password.password');
let confirmation = this.get('password.confirmation');
if (isEmpty(this.get('model.firstname'))) {
return $("#firstname").focus();
}
if (isEmpty(this.get('model.lastname'))) {
return $("#lastname").focus();
}
if (isEmpty(this.get('model.email'))) {
return $("#email").focus();
}
if (isPresent(password) && isEmpty(confirmation)) {
Ember.set(this, 'confirmPasswordError', 'error');
return $("#confirmPassword").focus();
}
if (isEmpty(password) && isPresent(confirmation)) {
Ember.set(this, 'passwordError', 'error');
return $("#password").focus();
}
if (!isEqual(password, confirmation)) {
Ember.set(this, 'passwordError', 'error');
return $("#password").focus();
}
let passwords = this.get('password');
this.get('save')(passwords).finally(() => {
Ember.set(this, 'password.password', '');
Ember.set(this, 'password.confirmation', '');
});
}
}
});

View file

@ -1,54 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
// Copyright (c) 2015 Documize Inc.
import Ember from 'ember';
import NotifierMixin from '../mixins/notifier';
export default Ember.Component.extend(NotifierMixin, {
drop1: null,
didInsertElement() {
this._super(...arguments);
new Tooltip({
target: document.getElementById("sample-1")
});
new Tooltip({
target: document.getElementById("sample-2")
});
new Tooltip({
target: document.getElementById("sample-3")
});
new Tooltip({
target: document.getElementById("sample-4")
});
let drop1 = new Drop({
target: document.getElementById('sample-dropdown-1'),
content: document.getElementById('sample-dropdown-content-1'),
classes: 'drop-theme-basic',
position: 'bottom middle',
openOn: 'click'
});
this.set('drop1', drop1);
},
actions: {
dropClose() {
this.get('drop1').close();
},
addFolder() {
return true;
}
}
});

View file

@ -1,19 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import dateUtil from '../utils/date';
export function formattedDate(params) {
return dateUtil.toIsoDate(params[0], params[1]);
}
export default Ember.Helper.helper(formattedDate);

View file

@ -1,16 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Helper.helper(function([object, path]) {
return Ember.get(object, path);
});

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
{{content-for 'head'}}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Documize</title>
<meta property="dbname" content="{{.DBname}}" />
<meta property="dbhash" content="{{.DBhash}}" />
<meta name="author" content="Documize" />
<meta name="description" content="Documize">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="shortcut icon" href="/favicon.ico?v=1.1" />
<link rel="icon" type="image/png" href="/favicon-32x32.png?v=1.1" sizes="32x32" />
<link rel="stylesheet" href="/assets/vendor.css">
<link rel="stylesheet" href="/assets/documize.css">
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
<script src="/assets/vendor.js"></script>
<script src="/assets/documize.js"></script>
<script src="/codemirror/lib/codemirror.js"></script>
<script src="/codemirror/mode/meta.js"></script>
<script src="/codemirror/addon/mode/loadmode.js"></script>
<script src="/codemirror/addon/mode/overlay.js"></script>
<script src="/codemirror/addon/runmode/runmode.js"></script>
<script src="/codemirror/addon/runmode/colorize.js"></script>
{{content-for 'body-footer'}}
</body>
</html>

View file

@ -1,29 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
export function initialize( /*application*/ ) {
// address insecure jquery defaults (kudos: @nathanhammond)
$.globalEval = function() {};
$.ajaxSetup({
crossDomain: true,
converters: {
'text script': text => text
}
});
Dropzone.autoDiscover = false;
CodeMirror.modeURL = "/codemirror/mode/%N/%N.js";
}
export default {
name: 'application',
initialize: initialize
};

View file

@ -1,25 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
import constants from '../utils/constants';
export default Ember.Mixin.create({
appMeta: Ember.inject.service(),
isAuthProviderDocumize: true,
IsAuthProviderKeycloak: false,
init() {
this._super(...arguments);
this.set('isAuthProviderDocumize', this.get('appMeta.authProvider') === constants.AuthProvider.Documize);
this.set('isAuthProviderKeycloak', this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak);
}
});

View file

@ -1,24 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Mixin.create({
showNotification(msg) {
this.eventBus.publish('notifyUser', msg);
},
actions: {
showNotification(msg) {
this.eventBus.publish('notifyUser', msg);
}
}
});

View file

@ -1,26 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Mixin.create({
isReadonly: function () {
if (this.get('page.userId') === this.get('session.session.authenticated.user.id')) {
return undefined;
} else {
return "readonly";
}
}.property('page'),
isMine: function () {
return this.get('page.userId') === this.get('session.session.authenticated.user.id');
}.property('page')
});

View file

@ -1,42 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Ember from 'ember';
export default Ember.Mixin.create({
tooltips: [],
addTooltip(elem) {
if(elem == null) {
return;
}
let t = new Tooltip({
target: elem
});
let tt = this.get('tooltips');
tt.push(t);
},
destroyTooltips() {
let tt = this.get('tooltips');
tt.forEach(t => {
t.destroy();
});
tt.length = 0;
this.set('tooltips', tt);
}
});

View file

@ -1,103 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import Ember from 'ember';
import constants from '../utils/constants';
export default Model.extend({
orgId: attr('string'),
folderId: attr('string'),
documentId: attr('string'),
userId: attr('string'),
firstname: attr('string'),
lastname: attr('string'),
activityType: attr('number'),
created: attr(),
activityLabel: Ember.computed('activityType', function() {
let label = '';
switch (this.get('activityType')) {
case constants.UserActivityType.Created:
label = 'Added';
break;
case constants.UserActivityType.Read:
label = 'Viewed';
break;
case constants.UserActivityType.Edited:
label = 'Edited';
break;
case constants.UserActivityType.Deleted:
label = 'Deleted';
break;
case constants.UserActivityType.Archived:
label = 'Archived';
break;
case constants.UserActivityType.Approved:
label = 'Approved';
break;
case constants.UserActivityType.Reverted:
label = 'Reverted';
break;
case constants.UserActivityType.PublishedTemplate:
label = 'Published Template';
break;
case constants.UserActivityType.PublishedBlock:
label = 'Published Block';
break;
default:
break;
}
return label;
}),
activityColor: Ember.computed('activityType', function() {
let color = '';
switch (this.get('activityType')) {
case constants.UserActivityType.Created:
color = 'color-blue';
break;
case constants.UserActivityType.Read:
color = 'color-black';
break;
case constants.UserActivityType.Edited:
color = 'color-green';
break;
case constants.UserActivityType.Deleted:
color = 'color-red';
break;
case constants.UserActivityType.Archived:
color = 'color-gray';
break;
case constants.UserActivityType.Approved:
color = 'color-green';
break;
case constants.UserActivityType.Reverted:
color = 'color-red';
break;
case constants.UserActivityType.PublishedTemplate:
color = 'color-blue';
break;
case constants.UserActivityType.PublishedBlock:
color = 'color-blue';
break;
default:
break;
}
return color;
})
});

View file

@ -1,37 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import Ember from 'ember';
import stringUtil from '../utils/string';
// import { belongsTo, hasMany } from 'ember-data/relationships';
export default Model.extend({
name: attr('string'),
excerpt: attr('string'),
job: attr('string'),
location: attr('string'),
orgId: attr('string'),
folderId: attr('string'),
userId: attr('string'),
tags: attr('string'),
template: attr('boolean'),
layout: attr('string'),
// client-side property
selected: attr('boolean', { defaultValue: false }),
slug: Ember.computed('name', function () {
return stringUtil.makeSlug(this.get('name'));
}),
created: attr(),
revised: attr()
});

View file

@ -1,23 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
// import { belongsTo, hasMany } from 'ember-data/relationships';
export default Model.extend({
orgId: attr('string'),
folderId: attr('string'),
userId: attr('string'),
fullname: attr('string'),
canView: attr('boolean', { defaultValue: false }),
canEdit: attr('boolean', { defaultValue: false })
});

View file

@ -1,45 +0,0 @@
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
//
// This software (Documize Community Edition) is licensed under
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
//
// You can operate outside the AGPL restrictions by purchasing
// Documize Enterprise Edition and obtaining a commercial license
// by contacting <sales@documize.com>.
//
// https://documize.com
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import constants from '../utils/constants';
import stringUtil from '../utils/string';
import Ember from 'ember';
// import { belongsTo, hasMany } from 'ember-data/relationships';
export default Model.extend({
name: attr('string'),
orgId: attr('string'),
userId: attr('string'),
folderType: attr('number', { defaultValue: 2 }),
slug: Ember.computed('name', function () {
return stringUtil.makeSlug(this.get('name'));
}),
markAsRestricted() {
this.set('folderType', constants.FolderType.Protected);
},
markAsPrivate() {
this.set('folderType', constants.FolderType.Private);
},
markAsPublic() {
this.set('folderType', constants.FolderType.Public);
},
// client-side prop that holds who can see this folder
sharedWith: attr(),
created: attr(),
revised: attr()
});

Some files were not shown because too many files have changed in this diff Show more