439 Commits

Author SHA1 Message Date
Paulo Gustavo Veiga
aff87ed808 Update version 2020-11-22 13:14:05 -08:00
Paulo Gustavo Veiga
e80fa2e49e Fix log level on hibernate.
Fix footer.
2020-11-22 13:12:03 -08:00
Paulo Gustavo Veiga
6ae148b69a Update favicon 2020-11-22 13:01:26 -08:00
Paulo Gustavo Veiga
91d24dc668 Fix error on mindmap publish & details 2020-11-22 12:53:35 -08:00
Paulo Gustavo Veiga
6b175d9885 Fix wrong query. 2020-11-08 15:42:51 -08:00
Paulo Gustavo Veiga
2576ad325c Copy Sha1 implementationo 2020-11-08 15:29:42 -08:00
Paulo Gustavo Veiga
11c6ce1004 Fix password encription 2020-11-08 13:43:38 -08:00
Paulo Gustavo Veiga
145986fb61 Merge branch 'feature/migration-spring5' of bitbucket.org:wisemapping/wisemapping-open-source into feature/migration-spring5 2020-11-08 13:36:09 -08:00
Paulo Gustavo Veiga
6789fa60b5 Fix password encoder for compatibility 2020-11-08 12:08:13 -08:00
Paulo Gustavo Veiga
9111b6988f Update JDBC drivers for mysql & others... 2020-11-07 18:44:53 -08:00
Paulo Gustavo Veiga
391ed63b39 Update to tiles 3 version 2020-11-07 14:46:20 -08:00
Paulo Gustavo Veiga
55711b4f7b Fix ClassNotFound starting Hibernate 2020-11-07 14:42:00 -08:00
Paulo Gustavo Veiga
08c2548aec Initial commit 2020-11-07 11:56:38 -08:00
Paulo Gustavo Veiga
9b738eaaf7 Support for Java 11 2020-11-06 21:35:54 -08:00
Paulo Gustavo Veiga
6872cda952 Disable timestamp control. Issue seems to be related to changes in the JDBC driver. 2020-07-29 12:32:20 -07:00
Paulo Gustavo Veiga
a0f5794618 Disable timestamp control. Issue seems to be related to changes in the JDBC driver. 2020-07-29 12:30:44 -07:00
Paulo Gustavo Veiga
6507d6566e Disable brower support check. This was required because the validation is failing with some new version of Chrome. 2020-04-30 21:15:52 -07:00
Paulo Veiga
7f81ea7830 Bump up version 2018-09-16 18:37:13 -07:00
Paulo Veiga
9a364dd702 Merge branch 'develop' 2018-09-16 18:29:02 -07:00
Paulo Veiga
a52f83d179 Fix test 2018-09-16 18:27:42 -07:00
Paulo Veiga
4c66002339 Hack for workaround batik OOM 2018-09-16 18:06:47 -07:00
Paulo Veiga
4aaa00fc45 Update batik 2018-09-16 13:05:11 -07:00
Paulo Veiga
2c9faca7e7 Fix several minor issues. 2018-09-16 12:29:19 -07:00
Paulo Veiga
1da36f2595 Fix bug on based URL generation 2018-09-15 01:25:14 -07:00
Paulo Veiga
abfb6b1157 Bump up version 2018-09-14 23:16:35 -07:00
Paulo Veiga
edf31e86b6 Bump up version 2018-09-14 23:15:47 -07:00
Paulo Veiga
45ccacad39 Merge branch 'develop' 2018-09-14 23:08:50 -07:00
Paulo Veiga
71e99673e4 Upgrade Spring version.
Fix failing export tests
2018-09-14 23:08:34 -07:00
Paulo Veiga
e610ef60d5 Update batik library.
Fix sample SVG tests.
2018-09-14 17:33:36 -07:00
Paulo Veiga
d5cc311f9d Revert "Try push"
This reverts commit f9acc51888.
2018-09-14 13:45:03 -07:00
Paulo Veiga
f9acc51888 Try push 2018-09-14 13:44:24 -07:00
Paulo Gustavo Veiga
8ce979299a Return to java 1.7. Why ?. Spring does not like it. 2015-11-02 08:57:21 -03:00
Paulo Gustavo Veiga
f7318161b6 Return to java 1.7 2015-11-02 08:57:12 -03:00
Paulo Gustavo Veiga
f85585b3b0 Fix typo... 2015-11-01 21:53:38 -03:00
Paulo Gustavo Veiga
33c3da51c8 Merge branch 'develop' of bitbucket.org:wisemapping/wisemapping-open-source into develop 2015-11-01 21:48:58 -03:00
Ezequiel Bergamaschi
8db908912c Merge remote-tracking branch 'origin/develop'
Conflicts:
	core-js/pom.xml
	mindplot/pom.xml
	pom.xml
	web2d/pom.xml
	wise-editor/pom.xml
	wise-webapp/pom.xml
2015-10-29 23:06:57 -03:00
Ezequiel Bergamaschi
a51846e536 zoom factor decreased, fixing some js errors due to legacy code 2015-10-29 22:31:40 -03:00
Ezequiel Bergamaschi
f20b4d63d1 rest user has not password set for rest api 2015-08-29 02:14:49 -03:00
Ezequiel Bergamaschi
070815c95c fix api rest for get user by email, email was trimmed 2015-08-26 23:38:41 -03:00
Ezequiel Bergamaschi
7e440fb9de firefox 40+ support 2015-08-26 23:37:49 -03:00
Paulo Gustavo Veiga
12f2048fa2 Minor java 8 refactors. 2015-07-25 13:17:53 -03:00
Paulo Gustavo Veiga
0cc08b34cf Move to Java 1.8. 2015-07-04 11:02:48 -03:00
Mariela Michalek
0633bb589e fix focus link editor 2015-05-31 11:12:27 -03:00
Ezequiel Bergamaschi
c6c825fedc fix error stack not reporting to autolog 2015-05-09 17:30:00 -03:00
Paulo Gustavo Veiga
1320bb737c Update lattest version. 2015-05-09 12:10:39 -03:00
Paulo Gustavo Veiga
2a9fa3f978 Finish Docker implementation. 2015-05-09 12:08:53 -03:00
Paulo Gustavo Veiga
6e76288093 Initial version of Dockerfile generation. 2015-05-09 11:02:09 -03:00
Ezequiel Bergamaschi
c0b61a2a5d adding error stack information to error reporter 2015-05-09 04:55:40 -03:00
Ezequiel Bergamaschi
cec637afbe fix underscorejs.min.map not found 2015-05-09 02:44:28 -03:00
Ezequiel Bergamaschi
d2a6312b7c fix bug WA-794: submitDialogForm not defined issue WA #resolve 2015-05-09 02:43:46 -03:00
Paulo Gustavo Veiga
64f371e2da Update to new version. 2015-04-29 12:10:53 -07:00
Paulo Gustavo Veiga
17be6f8443 Change to 4.0.2 2015-04-29 11:33:32 -07:00
Ezequiel Bergamaschi
6c4d105a14 fix escape key not working in firefox 2015-04-27 23:15:14 -03:00
Ezequiel Bergamaschi
e00bf7fffe fix swagger configuration 2015-04-27 01:19:15 -03:00
Ezequiel Bergamaschi
e22de46812 WISE-383 #resolve 2015-04-25 01:06:06 -03:00
Ezequiel Bergamaschi
b653e0e48f alignment between submitDialogForm functions implementation 2015-04-24 23:51:54 -03:00
Ezequiel Bergamaschi
928afcd1e7 testing bamboo repository polling 2015-04-19 15:07:59 -03:00
Ezequiel Bergamaschi
4d54497429 jasmine specs running in mindplot 2015-04-19 14:57:42 -03:00
Ezequiel Bergamaschi
fcf1f9b4de fix bug when clicking cancel button for modal windows 2015-04-19 14:57:12 -03:00
Mariela Michalek
0d6403e81e fix duplicate insert 2015-04-12 21:14:37 -03:00
Paulo Gustavo Veiga
96af3564f7 Merged WISE-436-fixErrorChangingRoleInSharing into develop 2015-04-12 16:11:36 -03:00
Paulo Gustavo Veiga
3d36a4d9d4 Format some .js. 2015-04-12 11:08:30 -03:00
Paulo Gustavo Veiga
04e1f71faa Update copyright headers. 2015-04-12 00:15:12 -03:00
Paulo Gustavo Veiga
cbaaed7810 Bug WA-57 fixed. #resolve 2015-04-11 19:41:45 -03:00
Claudio Barril
13b3c307c7 sort collabs by id 2015-04-11 16:09:55 -03:00
Claudio Barril
3ad7a345cc take away collaboration from collabsToRemove before role edition 2015-04-11 16:09:29 -03:00
Paulo Gustavo Veiga
928ef3d813 Serialize paramters to json to post. 2015-04-10 00:28:45 -03:00
Paulo Gustavo Veiga
d73c104543 Minor fix to unify paths. 2015-04-10 00:07:40 -03:00
Paulo Gustavo Veiga
c8ceec18bf Enable JS error reporting. 2015-04-09 23:37:39 -03:00
Ezequiel Bergamaschi
4f075ca689 Merged in christinaKorger/wisemapping-open-source (pull request #3)
clean-up
2015-04-04 17:09:06 -03:00
Christina Korger
f374e50ede Merged wisemapping/wisemapping-open-source into develop 2015-04-04 22:07:07 +02:00
Christina Korger
b0302dfda4 revert commit b4b1c6d
Backed out changeset: f1dbc1a70afc
(probable future relevance to image dragging support)

--HG--
branch : clean-up
2015-04-04 20:45:36 +02:00
Ezequiel Bergamaschi
2e0d470ecf Bug WISE-421 #resolve 2015-04-03 01:23:50 -03:00
Ezequiel Bergamaschi
c7c8a5ef50 fixing freemind tests 2015-04-03 00:53:53 -03:00
Ezequiel Bergamaschi
98670c32a6 Bug WISE-435 #resolve 2015-04-02 17:50:46 -03:00
Christina Korger
47e7fd4fd3 Bug/Task WISE-429 fixed: mark publicly used Designer functions as public by
removing '_' for function definition and calls:

_nodeModelToNodeGraph -> nodeModelToNodeGraph
_addRelationship -> addRelationship
_deleteRelationship -> deleteRelationship
_removeTopic -> removeTopic

--HG--
branch : clean-up
2015-03-30 14:10:26 +02:00
Christina Korger
b4b1c6d67f Bug/Task WISE-430 fixed: clean-up Designer - remove unused function
addDraggedNode

--HG--
branch : clean-up
2015-03-30 11:41:08 +02:00
Christina Korger
09d3741dae Bug/Task WISE-428 fixed: clean-up Designer - remove unused functions
de-/activateKeyboard with calls to non-existing methods

--HG--
branch : clean-up
2015-03-30 11:29:58 +02:00
Christina Korger
984eb5b078 Merged wisemapping/wisemapping-open-source into develop 2015-03-25 09:07:43 +01:00
Ezequiel Bergamaschi
abbeab2f8f Bug WISE-393 #resolve 2015-03-25 01:36:47 -03:00
Ezequiel Bergamaschi
3ea1d69ac6 Bug WISE-393 fixed: empty commit, see the previous one 2015-03-25 01:34:04 -03:00
Ezequiel Bergamaschi
46d56528de Fix some browser issues 2015-03-25 01:29:30 -03:00
Paulo Gustavo Veiga
1d0d907284 Improve detection of version in freemind. 2015-03-24 22:30:51 -03:00
Paulo Gustavo Veiga
4c3483006e Bug WISE-423 fixed: Solve map name export. 2015-03-24 21:55:52 -03:00
Paulo Gustavo Veiga
110c9a634e Bug WISE-422 fixed: Fix tests record files. 2015-03-24 21:38:26 -03:00
Paulo Gustavo Veiga
65c48562af Bug WISE-422 fixed: Minor improvement. 2015-03-24 21:36:47 -03:00
Paulo Gustavo Veiga
f23d708385 Bug WISE-422 fixed: Add Safari hack for importing images. 2015-03-24 21:33:13 -03:00
Mariela Michalek
b9c5fcc9f5 fix F2 keypress bug 2015-03-24 20:15:01 -03:00
Paulo Gustavo Veiga
376e85bfef Merged in christinaKorger/wisemapping-open-source (pull request #2)
add jsdoc to mindplot module
2015-03-24 16:22:11 -03:00
Christina Korger
47c4566435 add jsdoc to mindplot module
--HG--
branch : mindplot_jsdoc
2015-03-23 09:25:54 +01:00
Claudio Barril
53e210456e allow null value to rgbToHex method 2015-03-08 00:54:34 -03:00
Claudio Barril
36f2143f46 map rgb to hex color in export freemind 2015-03-07 17:34:05 -03:00
Paulo Gustavo Veiga
9de82efbc2 Increase release version ... 2015-02-21 13:19:19 -03:00
Paulo Gustavo Veiga
59f0ed5793 Merge branch 'develop'
Conflicts:
	core-js/pom.xml
	mindplot/pom.xml
	pom.xml
	web2d/pom.xml
	wise-editor/pom.xml
	wise-webapp/pom.xml
2015-02-21 13:10:07 -03:00
Ezequiel Bergamaschi
9e2e8a56d0 fixing note edition 2015-02-12 22:58:28 -03:00
Ezequiel Bergamaschi
65165f935e fix keyboard throubles with ie11 2015-02-12 22:57:13 -03:00
Paulo Gustavo Veiga
1e4d88fa55 Replace version to the next SNAPSHOT 2015-02-06 23:07:44 -03:00
Paulo Gustavo Veiga
d955e44167 Merge branch 'develop'
Conflicts:
	core-js/pom.xml
	mindplot/pom.xml
	pom.xml
	web2d/pom.xml
	wise-editor/pom.xml
	wise-webapp/pom.xml
2015-02-06 22:48:58 -03:00
Ezequiel Bergamaschi
088bba7985 bugfixing for keypress events when user wrinting in a topic 2015-02-01 23:44:34 -03:00
Ezequiel Bergamaschi
48ca102d0a jasmine specs not running for mindplot through maven 2015-02-01 21:37:41 -03:00
Paulo Gustavo Veiga
34e147e5ac Add undercorejs.js as dependency. 2015-01-31 23:38:17 -03:00
Paulo Gustavo Veiga
1f01b67297 Fix main version. 2015-01-31 23:22:48 -03:00
Paulo Gustavo Veiga
d3dd58fdc5 Merge branch 'feature/remove_mootols' into develop 2015-01-31 21:35:52 -03:00
Paulo Gustavo Veiga
1993040520 Move from 3.0.5-SNAPSHOT to 4.0.0-SNAPSHOT 2015-01-31 21:30:12 -03:00
Ezequiel Bergamaschi
6950f7f715 fix rows unclickeables when searching maps that are not in the first page 2015-01-31 16:55:16 -03:00
Ezequiel Bergamaschi
9f79d8f40a fixing samples 2015-01-31 15:32:09 -03:00
Ezequiel Bergamaschi
2d3493b648 fixing missing symb links && samples 2015-01-31 14:40:10 -03:00
Claudio Barril
72b5685fce undo jasmine plugin removed from poms 2015-01-11 12:16:47 -03:00
Ezequiel Bergamaschi
bd3f1b39b2 fixing all popover, some hacks 2014-12-27 00:46:19 -03:00
Ezequiel Bergamaschi
15c13a8f4f fix popover not updated when updating notes 2014-12-27 00:09:01 -03:00
Ezequiel Bergamaschi
91f85139ca fix error in pom and add data for accept click events in bootstrap dialogs 2014-12-26 23:13:12 -03:00
Ezequiel Bergamaschi
513781272e Merge remote-tracking branch 'origin/develop' into feature/remove_mootols
Conflicts:
	mindplot/src/main/javascript/widget/LinkIconTooltip.js
	pom.xml
2014-12-26 20:13:10 -03:00
Ezequiel Bergamaschi
d0dd1bb288 change api for url thumbnails 2014-12-26 20:12:07 -03:00
Ezequiel Bergamaschi
4107e8e61c change api for url thumbnails 2014-12-26 20:11:41 -03:00
Ezequiel Bergamaschi
5ca5a93eb3 fixing bugs in shortcuts and modal dialog with errors 2014-12-26 20:01:15 -03:00
Ezequiel Bergamaschi
8c807398a4 remove mootools components 2014-12-26 18:09:30 -03:00
Ezequiel Bergamaschi
3ee4bdd019 reformat moootools js for develop 2014-12-26 18:08:55 -03:00
Ezequiel Bergamaschi
0d20938506 still removing .bind(this) usages 2014-12-26 18:07:31 -03:00
Claudio Barril
ff6ff266c5 test broken because overlapping (is failing in master) 2014-12-21 14:33:11 -03:00
Claudio Barril
9e08a50c2d fix test name 2014-12-21 14:30:07 -03:00
Claudio Barril
75b89e1c7f fix code style 2014-12-21 14:29:51 -03:00
Paulo Gustavo Veiga
350fb5d2ab Fix typo... 2014-12-16 21:03:19 -03:00
Paulo Gustavo Veiga
2baf8c92fe Fix Swagger console base URL location issue. 2014-12-16 00:43:40 -03:00
Claudio Barril
645be7afb3 symmetric test suite 2014-12-14 19:17:48 -03:00
Claudio Barril
65cc84e062 test suite with node constants 2014-12-14 17:36:00 -03:00
Claudio Barril
4ea1bf6f71 free test migrated to jasmine (only which really works) 2014-12-14 17:35:08 -03:00
Claudio Barril
3770c0cac6 balanced test migrated to jasmine 2014-12-14 17:33:22 -03:00
Paulo Gustavo Veiga
fc213d5745 Test new release plugin. 2014-12-12 23:28:35 -03:00
Ezequiel Bergamaschi
00ab6fd61a adding tests to suite 2014-10-26 18:43:30 -03:00
Ezequiel Bergamaschi
8202248bad move bootstrap dir from wise-editor to mindplot 2014-10-26 18:13:02 -03:00
Ezequiel Bergamaschi
6e5ec59137 change js for symlink in tests 2014-10-26 18:11:56 -03:00
Ezequiel Bergamaschi
429f335001 jasmine framework configured for mindplot 2014-10-26 17:53:57 -03:00
Ezequiel Bergamaschi
60fed4ef8a adding resource test 2014-10-26 17:53:22 -03:00
Ezequiel Bergamaschi
728e8d7f38 comment tests setup in order to fix the continous build 2014-10-07 01:25:35 -03:00
Ezequiel Bergamaschi
e5b1e17e1f mindplot integrated with jasmine, dummy test uploaded 2014-10-07 01:17:23 -03:00
Ezequiel Bergamaschi
a814366058 some additional assertion 2014-10-07 01:16:56 -03:00
Ezequiel Bergamaschi
6de0b2d183 symb links for tests 2014-10-07 01:16:41 -03:00
Ezequiel Bergamaschi
fdd3b484fc remove unless dependency 2014-09-28 16:33:21 -03:00
Ezequiel Bergamaschi
10c596e95c use old jquery version since htmlunit does not support jquery 2.1.0 yet 2014-09-27 15:58:15 -03:00
Ezequiel Bergamaschi
b83e45e406 adding development jquery source 2014-09-27 15:57:46 -03:00
Ezequiel Bergamaschi
5412e1aaaa change webDriver since htmlunit throws error with jquery 2014-09-27 15:15:35 -03:00
Ezequiel Bergamaschi
98d9d877a2 unit testing for events 2014-09-27 14:35:49 -03:00
Ezequiel Bergamaschi
27149b0870 reducing functionality of Events class 2014-09-27 14:35:40 -03:00
Ezequiel Bergamaschi
8b0bd46f4d try change browser version for continuous build 2014-09-26 23:33:18 -03:00
Ezequiel Bergamaschi
e65eb3131b Merge branch 'feature/WISE-214-JasmineTests' into feature/remove_mootols 2014-09-26 23:24:47 -03:00
Ezequiel Bergamaschi
5a863734a0 Merge remote-tracking branch 'origin/develop' into feature/remove_mootols
Conflicts:
	mindplot/src/main/javascript/widget/LinkIconTooltip.js
	wise-webapp/src/main/webapp/jsp/mindmapExport.jsp
2014-09-26 23:24:41 -03:00
Ezequiel Bergamaschi
4987f1030d adding jasmine configuration and suite to core-js module 2014-09-26 23:22:37 -03:00
Ezequiel Bergamaschi
3026504110 Merge remote-tracking branch 'origin/develop' into feature/WISE-214-JasmineTests 2014-09-25 03:10:05 -03:00
Ezequiel Bergamaschi
81468c2e04 fix thumbnail service is down 2014-09-25 00:18:03 -03:00
Ezequiel Bergamaschi
ac27edae21 css bug fixing 2014-09-22 03:37:18 -03:00
Ezequiel Bergamaschi
412518f264 include js in final war 2014-09-22 03:28:34 -03:00
Ezequiel Bergamaschi
4642352fc1 rename js symb link 2014-09-22 03:14:28 -03:00
Paulo Gustavo Veiga
2b3fdf1196 Fix release version on master. 2014-09-21 22:20:48 -03:00
Paulo Gustavo Veiga
6a0605b6ac Update release version to 3.0.4 snapshot 2014-09-21 22:19:21 -03:00
Ezequiel Bergamaschi
4c94f44f3c replace old event.control and event.meta by event.ctrlKey and event.metaKey 2014-09-21 18:34:45 -03:00
Mariela Michalek
b7e5500e96 update remove button for editors 2014-09-14 18:32:18 -03:00
Ezequiel Bergamaschi
0dc7ead2a9 BootstrapDialog improvements and design 2014-09-14 17:45:11 -03:00
Ezequiel Bergamaschi
e23ef8d9d0 remove old References to MooDialog 2014-09-14 17:44:50 -03:00
Ezequiel Bergamaschi
23f5603460 change statix input size by percentage value 2014-09-12 17:09:17 -03:00
Ezequiel Bergamaschi
00e0959855 Revert "Revert "Revert "new header"""
This reverts commit 9844fb156e.

Conflicts:

	wise-webapp/src/main/webapp/jsp/header.jsp
2014-09-12 17:07:22 -03:00
Ezequiel Bergamaschi
144a5061a3 change thumbnails service due to service is down 2014-09-12 02:01:19 -03:00
Ezequiel Bergamaschi
ae1e8a2625 temporary hack for same scrollbar of mindmapList 2014-09-11 16:59:55 -03:00
Ezequiel Bergamaschi
4a0f39fb07 finishing css bug fixing of custom toolbar items 2014-09-11 16:59:22 -03:00
Ezequiel Bergamaschi
400f3963f5 mindmapExport css bug fixing 2014-09-11 15:12:27 -03:00
Mariela Michalek
687657bab3 when dialog is closed, remove divs from dom 2014-09-11 14:42:15 -03:00
Ezequiel Bergamaschi
7c31954b19 trigger event when dialog is shown to perform custom dialog actions 2014-09-11 14:38:49 -03:00
Ezequiel Bergamaschi
71b9357a9f fix esc key not working if not focus in modal 2014-09-11 14:38:22 -03:00
Ezequiel Bergamaschi
0f8b7ca662 mindmapShare css improvements 2014-09-11 13:04:50 -03:00
Ezequiel Bergamaschi
4f1f111432 fixing style stuffs 2014-09-11 11:35:31 -03:00
Paulo Gustavo Veiga
08d2403133 Merge branch 'develop' 2014-09-09 22:41:53 -03:00
Claudio Barril
28660e3400 really fix share editor (prod bug) 2014-09-09 18:48:51 -03:00
Claudio Barril
fb3a82222b fix some issues in share dialog 2014-09-09 17:43:22 -03:00
Claudio Barril
7abd37a138 remove duplicates files uploads 2014-09-09 17:42:17 -03:00
Claudio Barril
5c9b6f735d add translation for History in spanish 2014-09-09 17:41:25 -03:00
Claudio Barril
b9b3eb43f7 fix view history of maps 2014-09-09 13:50:17 -03:00
Claudio Barril
5b7bbf2e72 fix first save (wrong timestamp was being taken) 2014-09-09 11:54:48 -03:00
Claudio Barril
ded8dae982 fix publish panel 2014-09-09 11:19:56 -03:00
Claudio Barril
f1c6c845b8 fix regular expresion in export window 2014-09-09 11:19:20 -03:00
Claudio Barril
dcb4de0e0e fix content type 2014-09-08 15:51:20 -03:00
Ezequiel Bergamaschi
943a1ddbd7 dialogs migration from moodialog to bootstrap 2014-09-08 14:55:34 -03:00
Claudio Barril
802c9d3375 fix exporter to freemind issues (shape, font styles and font sizes) 2014-09-08 14:36:49 -03:00
Claudio Barril
81b138cf62 Merge remote-tracking branch 'origin/WISE-253-support-freemind-101' into develop 2014-09-07 23:31:57 -03:00
Claudio Barril
25ee14b7aa add default to import error manager 2014-09-07 23:16:00 -03:00
Claudio Barril
014d9334b3 fix nomenclature test name 2014-09-07 23:15:48 -03:00
Claudio Barril
7ee42468bd freemind constant 2014-09-07 23:15:27 -03:00
Claudio Barril
c83f4bd213 add test for version comparison 2014-09-07 21:02:04 -03:00
Claudio Barril
b0a6e7fac5 fixing files to test export 2014-09-07 20:20:03 -03:00
Ezequiel Bergamaschi
0c9d11c731 mindmap export bug fixing 2014-09-07 20:17:59 -03:00
Ezequiel Bergamaschi
4a27a7479a BootstrapDialog.Request implementation using modal body 2014-09-07 20:17:47 -03:00
Claudio Barril
7d973c7a87 setting default version for freemind export 2014-09-07 20:16:23 -03:00
Claudio Barril
d8e255cac8 considering possibility of null positions 2014-09-07 20:16:09 -03:00
Claudio Barril
b45f874ce4 remove console printing for debugging 2014-09-07 18:51:19 -03:00
Claudio Barril
8b6764af17 hack fix for relationships when import/export for freemind 2014-09-07 16:58:14 -03:00
Claudio Barril
a6a79e9f94 fix vertical order when export to freemind versions. 2014-09-07 16:10:06 -03:00
Claudio Barril
94e76fad9c support both export versions for freemind (old and new 1.0.1) 2014-09-07 16:06:58 -03:00
Ezequiel Bergamaschi
020dd0a876 BootstrapDialog.Request implementation 2014-09-01 02:45:15 -03:00
Claudio Barril
3c9573c93e fix drawn and freemind test 2014-08-30 22:42:28 -03:00
Claudio Barril
663310b388 copy parent background color when a sibling or a child is created 2014-08-25 23:58:13 -03:00
Claudio Barril
4641c3cc5a fix side as first level nodes are drawn 2014-08-25 23:32:17 -03:00
Mariela Michalek
be044840a1 Merge branch 'feature/remove_mootols' of bitbucket.org:wisemapping/wisemapping-open-source into feature/remove_mootols
Conflicts:
	mindplot/src/main/javascript/LinkIcon.js
2014-08-24 16:46:43 -03:00
Claudio Barril
1ff3cf2127 fixing import dialog, parameters modification and redirect 2014-08-20 23:31:14 -03:00
Claudio Barril
7b512ea2f6 removing comparasion hack and fixing order to compare versions 2014-08-20 23:30:24 -03:00
Ezequiel Bergamaschi
9844fb156e Revert "Revert "new header""
This reverts commit 3d6df8a143.
2014-08-18 21:54:41 -03:00
Ezequiel Bergamaschi
72a47b76bb Merge remote-tracking branch 'origin/develop' into feature/remove_mootols
Conflicts:
	wise-editor/src/main/webapp/js/less.js
	wise-webapp/pom.xml
	wise-webapp/src/main/webapp/js/less.js
2014-08-18 21:35:45 -03:00
Ezequiel Bergamaschi
8318e897fe fix less update and restoring symblinks 2014-08-18 21:23:42 -03:00
Ezequiel Bergamaschi
99c909c69b Revert "fix alias checking for jetty 9.x"
This reverts commit fff27e1bb7.
2014-08-18 21:10:25 -03:00
Ezequiel Bergamaschi
704fb02d1a old jetty pom 2014-08-18 21:09:56 -03:00
Ezequiel Bergamaschi
8686eb0ad4 Revert "removing unnecesary build"
This reverts commit 52cac830ae.
2014-08-18 20:19:59 -03:00
Ezequiel Bergamaschi
4aa0d22ebe fix save not working for mindmap (bad request) 2014-08-17 19:15:00 -03:00
Ezequiel Bergamaschi
f6464b6e37 fix link icon tooltip bug 2014-08-17 17:56:08 -03:00
Mariela Michalek
c925bd757b hide tooltip when editor is shown 2014-08-03 20:34:30 -03:00
Mariela Michalek
5d6ace0852 remove bind from LinkIcon 2014-08-03 20:10:14 -03:00
Mariela Michalek
ba638f06a1 remove bind from ImageIcon 2014-08-03 19:55:34 -03:00
Mariela Michalek
f24dcc4a5e remove .bind method from IconGroup 2014-08-03 19:34:25 -03:00
Mariela Michalek
1ec921efde update toolbar margin 2014-08-03 19:34:25 -03:00
Ezequiel Bergamaschi
75739389cc replace last Request by $.ajax 2014-08-03 17:07:48 -03:00
Ezequiel Bergamaschi
4ac182f0d9 RestPersisnteceManager reimplemented with ajax 2014-08-03 16:50:06 -03:00
Ezequiel Bergamaschi
df9f865e04 add missed css boostrap property 2014-08-03 15:24:58 -03:00
Ezequiel Bergamaschi
f9a5ac64b6 adding symlink for bootstrap in wise-webapp 2014-07-29 02:30:51 -03:00
Ezequiel Bergamaschi
ac8d2a179b remove wise-webapp bootstrap 2014-07-29 02:30:08 -03:00
Ezequiel Bergamaschi
9230c186e1 copying bootstrap from wise-webapp to wise-editor 2014-07-29 02:25:45 -03:00
Ezequiel Bergamaschi
c8cbd42fe3 link icon tooltip as black tooltip 2014-07-28 00:21:06 -03:00
Ezequiel Bergamaschi
19e949010f link icon tooltip hide on mouse leave 2014-07-28 00:20:32 -03:00
Ezequiel Bergamaschi
92e47fb98b reduce popover padding and size 2014-07-27 20:28:15 -03:00
Ezequiel Bergamaschi
f51480731a trying to load pom.xml 2014-07-27 18:25:52 -03:00
Ezequiel Bergamaschi
b9b4c380b2 adding js resources to jsp 2014-07-14 02:45:39 -03:00
Ezequiel Bergamaschi
954f242a63 updating some pom versions 2014-07-14 02:43:24 -03:00
Ezequiel Bergamaschi
e80f4f6518 loading dialog added 2014-07-14 00:12:23 -03:00
Ezequiel Bergamaschi
9fbe471585 change old addEvent method call by .on() 2014-07-14 00:11:56 -03:00
Ezequiel Bergamaschi
80ba57e5d3 restore symlink for less.js 2014-07-14 00:11:17 -03:00
Ezequiel Bergamaschi
3a83430771 Merge remote-tracking branch 'origin/develop' into feature/remove_mootols 2014-07-13 02:39:19 -03:00
Ezequiel Bergamaschi
039da8e73d adding hover to icon panel 2014-07-06 01:29:00 -03:00
Ezequiel Bergamaschi
c1b678c1aa ignore winkey on edit topics 2014-07-06 01:16:23 -03:00
Ezequiel Bergamaschi
5081311f7d adding option to ajax request for debugging 2014-07-06 01:16:08 -03:00
Ezequiel Bergamaschi
f2b0eb74ea removing .bind mootools call (phase 1/2) 2014-07-06 01:15:34 -03:00
Ezequiel Bergamaschi
3655df6cb8 adding stop propagation for keydown event in bootstrap dialog 2014-07-06 01:06:23 -03:00
Ezequiel Bergamaschi
d4f72f3633 fix multiline text editor enter not working and begin edit on tiping 2014-06-30 02:42:02 -03:00
Ezequiel Bergamaschi
9afb13b02f parsing text response manually from ajax request 2014-06-30 00:35:02 -03:00
Paulo Gustavo Veiga
5de02c8d51 Bug WISE-242 fixed
Add support for Firefox 3
2014-06-25 21:26:58 -03:00
Ezequiel Bergamaschi
8263b1abeb fix local storage manager 2014-06-22 23:46:36 -03:00
Ezequiel Bergamaschi
b5d1bbaa5b Merge remote-tracking branch 'origin/develop' into feature/remove_mootols 2014-06-19 00:49:34 -03:00
Ezequiel Bergamaschi
fff27e1bb7 fix alias checking for jetty 9.x 2014-06-19 00:43:10 -03:00
Ezequiel Bergamaschi
beaac8196d remove unless Json.encode method call 2014-06-16 01:36:33 -03:00
Ezequiel Bergamaschi
332ef31597 fix XMLSerializer_Pela appendChild error 2014-06-16 01:36:13 -03:00
Ezequiel Bergamaschi
a862a8ec3d fix some errors and old mootools syntax 2014-06-16 01:35:57 -03:00
Ezequiel Bergamaschi
8f3b55b650 ToolbarNotifier reimplemented 2014-06-16 01:35:34 -03:00
Ezequiel Bergamaschi
a5344c8400 change invalid preserveAspectRatio value 2014-06-06 00:10:07 -03:00
Ezequiel Bergamaschi
9d1ca21b67 designer keyboard shortcuts refactor 2014-06-06 00:09:48 -03:00
Ezequiel Bergamaschi
49da037936 fix NaN problem in group peer 2014-06-04 00:37:20 -03:00
Ezequiel Bergamaschi
c0abb0a71c adding wisemapping service script 2014-05-26 00:19:10 -03:00
Ezequiel Bergamaschi
3476c1cc95 removing periodical function from mootools 2014-05-22 00:17:34 -03:00
Ezequiel Bergamaschi
7406aa8e5b removing console logs 2014-05-21 23:53:56 -03:00
Ezequiel Bergamaschi
1b682bc3c2 remove positionRelativeTo method 2014-05-21 23:52:22 -03:00
Ezequiel Bergamaschi
f817167a7b text editor with position done 2014-05-21 23:51:51 -03:00
Ezequiel Bergamaschi
001f62b539 fixing Options problem 2014-05-16 00:27:57 -03:00
Ezequiel Bergamaschi
f1a63fbd09 clean mootools unless classes and methods 2014-05-13 02:23:32 -03:00
Ezequiel Bergamaschi
64f8c87577 extract Options mootools class 2014-05-13 02:23:32 -03:00
Ezequiel Bergamaschi
5923d01791 fix scrollbar zoom in / zoom out 2014-05-13 02:23:32 -03:00
Ezequiel Bergamaschi
2302116214 mousewheel jquery oficial plugin 2014-05-13 02:23:32 -03:00
Ezequiel Bergamaschi
58f3061b66 FadeEffect not working but hide and show correctly 2014-05-13 02:23:32 -03:00
Mariela Michalek
e6daae3ee8 remove url attr from input 2014-05-10 18:00:07 -03:00
Mariela Michalek
9cb881faaa update submit functionality on link editor 2014-05-10 17:58:29 -03:00
Mariela Michalek
4f74576ae7 add "URL_ERROR" in en properties 2014-05-10 17:54:52 -03:00
Mariela Michalek
9d0ba4b30d add url error BootstrapDialog and LinkEditor 2014-05-04 15:59:12 -03:00
Ezequiel Bergamaschi
faf34707d1 note tooltip reimplemented 2014-05-02 18:07:55 -03:00
Ezequiel Bergamaschi
25b1199160 LinkIconTooltip reimplemented 2014-05-02 17:55:35 -03:00
Ezequiel Bergamaschi
b692355b04 WISE-225 fixed 2014-05-02 15:26:27 -03:00
Ezequiel Bergamaschi
ef9b0ed227 fixme removed 2014-05-02 15:26:01 -03:00
Ezequiel Bergamaschi
d0304ff210 fix font type tooltip 2014-05-02 01:15:12 -03:00
Ezequiel Bergamaschi
9b9ab78839 color palette tooltip reimplemented 2014-05-02 01:00:32 -03:00
Michael Magill
e273c52f59 I was getting a 404 because it was looking for en_us, not just en. The en template may need to be copied for other English locales like en_GB, en_CA, etc. The 404 only showed up in Firefox's developer console did not appear to affect functionality, so this is just cleanup. 2014-04-29 15:42:31 +00:00
Paulo Gustavo Veiga
d23bff3f09 Merge branch 'develop' 2014-04-29 11:30:12 -03:00
Michael Magill
d609f6f3d7 Syntax error, CHARACTER SET utf8; should have been at the end of the create r_label_mindmap enty, not the bottom of the file. Probably copy and paste error. 2014-04-29 14:23:29 +00:00
Paulo Gustavo Veiga
1d6adf177f Merge branch 'develop' 2014-04-29 11:19:18 -03:00
Paulo Gustavo Veiga
06004f73a8 Rename migration script ... 2014-04-29 11:17:20 -03:00
Ezequiel Bergamaschi
4414e0943d some css changes.. 2014-04-27 23:59:45 -03:00
Ezequiel Bergamaschi
0e4d01475d toolbarItem reimplemented 2014-04-27 23:59:35 -03:00
Ezequiel Bergamaschi
bb39a9a9d7 removing unless parameters on fire event in floating tip 2014-04-27 23:59:01 -03:00
Paulo Gustavo Veiga
8542ef8b13 Merge branch 'develop' 2014-04-27 12:07:24 -03:00
Paulo Gustavo Veiga
72034aad1e Remove all used users for setup. Pending to define data set. 2014-04-27 12:05:49 -03:00
Paulo Gustavo Veiga
9efa963ec8 Fix SQL names. 2014-04-27 11:13:38 -03:00
Paulo Gustavo Veiga
55ab0f280f Merge branch 'develop' 2014-04-26 21:16:57 -03:00
Paulo Gustavo Veiga
a42811630d Merge branch 'develop' into feature/WISE-211-iconSupportOnLabels 2014-04-26 21:15:57 -03:00
Paulo Gustavo Veiga
5dd2440a73 Merge branch 'develop' 2014-04-26 21:11:35 -03:00
Paulo Gustavo Veiga
d7ca087182 Mir fix on label. 2014-04-26 21:08:13 -03:00
Claudio Barril
d2a99998b5 add update for label icon support with tag as default 2014-04-26 18:27:01 -03:00
Paulo Gustavo Veiga
d6a60636ed Merged feature/WISE-211-iconSupportOnLabels into develop 2014-04-26 15:44:36 -03:00
Paulo Gustavo Veiga
9ca2f6bb1e Merged in ldap-changes (pull request #1)
move 'ou=' from being hardcoded to part of security.ldap.subDn
2014-04-26 15:39:29 -03:00
Michael Magill
b886a5888a removed "ou=" from LDAP user search since it is now integrated with security.ldap.subDn 2014-04-25 20:41:50 +00:00
Michael Magill
cec140b1fd changed default security.ldap.subDn parameter to include "ou=" 2014-04-25 20:36:48 +00:00
Michael Magill
84cffac713 removed extra / from site.baseurl 2014-04-25 20:30:18 +00:00
Ezequiel Bergamaschi
52968d435c FloatingTip in ToolbarItem deleted 2014-04-21 00:34:23 -03:00
Ezequiel Bergamaschi
efd8c6e867 fixing some old refs 2014-04-21 00:34:01 -03:00
Ezequiel Bergamaschi
3d2c251b03 FloatingTip as bootstrap popover 2014-04-20 23:57:39 -03:00
Ezequiel Bergamaschi
6a786a46e0 KeyboardShortcutTooltip reimplemented 2014-04-19 16:47:11 -03:00
Mariela Michalek
12a90cc820 add open link functionality 2014-04-19 16:38:04 -03:00
Mariela Michalek
64ec947157 refactor note and link editors 2014-04-19 16:28:28 -03:00
Mariela Michalek
47241c38f3 update remove button 2014-04-19 16:25:28 -03:00
Ezequiel Bergamaschi
754d4b3dcf fixing wrong reference variable 2014-04-19 14:18:35 -03:00
Paulo Gustavo Veiga
7ee577c400 Update ads codes. 2014-04-18 19:48:09 -03:00
Paulo Gustavo Veiga
c854c1b377 Update analitics tracking code. 2014-04-18 19:13:55 -03:00
Mariela Michalek
02b6ea66dd set styles 2014-04-18 17:54:24 -03:00
Mariela Michalek
2f82ce6d54 update editors with remove button 2014-04-18 17:13:44 -03:00
Mariela Michalek
65286f0443 fade in remove button 2014-04-18 17:12:36 -03:00
Ezequiel Bergamaschi
bfe24b7dfb popovers for icons in label icon chooser 2014-04-17 01:29:44 -03:00
Claudio Barril
85c7e3ce5c fixing tests broken because refactor of label attribute icon 2014-04-16 10:29:36 -03:00
Claudio Barril
27304ea385 label icon list reduced 2014-04-16 03:00:00 -03:00
Claudio Barril
8a994ee6f5 jsp include for label icon list 2014-04-16 02:59:33 -03:00
Claudio Barril
5ec3b6cce1 label attribute icon to iconName refactor (because of eze code review) 2014-04-16 02:38:33 -03:00
Claudio Barril
8cd05ec37e adding icon to tags list (when tagging) and some style 2014-04-16 02:25:07 -03:00
Ezequiel Bergamaschi
5a00229390 adding css for color chooser 2014-04-16 01:57:42 -03:00
Ezequiel Bergamaschi
4b01f7c8ee removing fixme from dialogForm function 2014-04-16 01:48:09 -03:00
Claudio Barril
edb91b92bd fix tests 2014-04-16 00:25:32 -03:00
Claudio Barril
c6ae7be255 import label list from another jsp prototype 2014-04-14 18:14:56 -03:00
Claudio Barril
86ba19c120 sending icon data to api rest 2014-04-14 18:14:32 -03:00
Claudio Barril
183ab33729 add styles 2014-04-14 18:10:16 -03:00
Claudio Barril
9e992a8f61 add label icons back-end (model and database) 2014-04-14 18:09:34 -03:00
Claudio Barril
5d18283285 icon ui selection 2014-04-12 19:04:28 -03:00
Claudio Barril
d66666010d icon dropdown creation dialog 2014-04-12 19:04:19 -03:00
Claudio Barril
bddf867b63 icon message 2014-04-12 19:03:31 -03:00
Mariela Michalek
ff9cd9466e update accept button 2014-04-12 15:11:39 -03:00
Mariela Michalek
1416ff2d11 update editor's events 2014-04-12 15:00:51 -03:00
Mariela Michalek
356ccfe115 conflict linkEditor 2014-04-10 19:35:39 -03:00
Mariela Michalek
cb6d691ee2 update bootstrapDialog 2014-04-10 19:33:48 -03:00
Mariela Michalek
66bf71fbc7 update editors 2014-04-10 19:33:20 -03:00
Ezequiel Bergamaschi
cd5ed0414e adding configuration for mindplot module 2014-04-10 01:06:50 -03:00
Ezequiel Bergamaschi
7e36425aad jasmine maven plugin dependency declared in parent pom 2014-04-10 00:53:48 -03:00
Claudio Barril
d0d161e8ab fix padding and label in two lines 2014-04-09 00:13:38 -03:00
Ezequiel Bergamaschi
0c80f8f544 removing css class 2014-04-06 18:31:28 -03:00
Ezequiel Bergamaschi
a47232d6df removing custom class .btn-primary, keep bootstrap 2014-04-06 18:24:16 -03:00
Ezequiel Bergamaschi
776f2e968d fixing bug 2014-04-03 22:56:11 -03:00
Ezequiel Bergamaschi
5803d46fa6 Merge remote-tracking branch 'origin/feature/remove_mootols' into feature/remove_mootols
Conflicts:
	mindplot/src/main/javascript/widget/LinkEditor.js
2014-04-03 22:42:21 -03:00
Ezequiel Bergamaschi
c385603454 BootstrapDialog and fixing LinkEditor 2014-04-03 22:39:23 -03:00
Mariela Michalek
0348662bf6 update link and note editor 2014-04-02 15:57:32 -03:00
Mariela Michalek
52fa7679b9 revert "update bootstrap modal dialog"
This reverts commit 690b653092.
2014-04-02 15:28:59 -03:00
Mariela Michalek
31671d1c5e update bootstrapDialog 2014-04-02 15:19:54 -03:00
Mariela Michalek
7ecee63edd update bootstrap dialog 2014-04-01 07:25:22 -03:00
Mariela Michalek
4dd9d89a5e update note editor 2014-04-01 07:24:58 -03:00
Mariela Michalek
b911e4d916 update link editor 2014-04-01 07:24:36 -03:00
Mariela Michalek
690b653092 update bootstrap modal dialog 2014-04-01 07:24:00 -03:00
Mariela Michalek
d4b8754c05 change compatibility file 2014-04-01 07:15:12 -03:00
Mariela Michalek
cf085f1af9 update linkEditor 2014-03-29 17:13:31 -03:00
Mariela Michalek
9c2f303acd update pom - bootstrapDialog 2014-03-29 17:12:51 -03:00
Mariela Michalek
eb861b56fd add BootstrapDialog 2014-03-29 17:10:52 -03:00
Claudio Barril
64c7198d50 update mysql schemas population 2014-03-19 23:29:00 -03:00
Claudio Barril
2fae012fd9 update hsql schemas population 2014-03-19 23:28:46 -03:00
Ezequiel Bergamaschi
bc880497b4 fixing more bugs 2014-03-19 01:51:55 -03:00
Ezequiel Bergamaschi
454354f9cd MultilineTextEditor partially fixed 2014-03-17 03:08:08 -03:00
Ezequiel Bergamaschi
dccc1c8c88 fix click outside modal is closing it on wait dialog 2014-03-17 02:15:03 -03:00
Ezequiel Bergamaschi
3ea4d56604 fix wrong jquery call method, replace toggle by trigger for handling events 2014-03-17 02:14:41 -03:00
Ezequiel Bergamaschi
2ab488bfa6 replacing old .each mootools' method by _.each 2014-03-17 00:36:29 -03:00
Ezequiel Bergamaschi
a0e3c74921 adding underscorejs library 2014-03-17 00:35:54 -03:00
Ezequiel Bergamaschi
a438eca3da ColorPalettePanel reimplemented 2014-03-16 22:15:16 -03:00
Ezequiel Bergamaschi
48c7fe2a96 replace old Events class 2014-03-16 22:00:04 -03:00
Ezequiel Bergamaschi
bd70f3b609 IconPanel reimplemented 2014-03-16 21:33:56 -03:00
Ezequiel Bergamaschi
43898f6878 browser global variable workaround 2014-03-16 18:12:21 -03:00
Ezequiel Bergamaschi
51d4510241 reimplementing persistence managers 2014-03-16 17:05:40 -03:00
Paulo Gustavo Veiga
5be0a547b6 Remove old test drive configuration. 2014-03-16 12:54:53 -03:00
Paulo Gustavo Veiga
e8ee76c5f8 Merged feature/WISE-220-mindmapListImprovements into develop 2014-03-16 11:34:38 -03:00
Paulo Gustavo Veiga
e1a357c8c9 Remove Events class from moootools library. 2014-03-16 11:30:37 -03:00
Ezequiel Bergamaschi
4bcea1363e removing fixme 2014-03-15 03:56:10 -03:00
Ezequiel Bergamaschi
7b5835f2e9 removing todo 2014-03-15 03:55:57 -03:00
Ezequiel Bergamaschi
8115b50556 adding Events mootool class 2014-03-15 03:55:42 -03:00
Ezequiel Bergamaschi
3e0d84392b ModalDialogNotifier reimplemented 2014-03-15 02:48:28 -03:00
Ezequiel Bergamaschi
3d6df8a143 Revert "new header"
This reverts commit 251f0eca46.

Conflicts:

	wise-webapp/src/main/webapp/jsp/header.jsp
2014-03-14 23:59:16 -03:00
Ezequiel Bergamaschi
dec0fb7aef bootstrap 13px 2014-03-14 23:57:23 -03:00
Ezequiel Bergamaschi
980a984499 bootstrap 12px and 13px 2014-03-14 23:48:05 -03:00
Ezequiel Bergamaschi
1f8e251009 orange buttons new header 2014-03-13 00:41:45 -03:00
Ezequiel Bergamaschi
4729022d6a updating webdefault.xml 2014-03-12 23:42:30 -03:00
Ezequiel Bergamaschi
eb9a28603c updating jetty version and removing old config 2014-03-12 23:42:20 -03:00
Ezequiel Bergamaschi
d191aa9075 reducing delete dialog size 2014-03-12 01:53:47 -03:00
Ezequiel Bergamaschi
e585686bd2 bootstrap recompiled with base font size 12px 2014-03-12 01:41:36 -03:00
Ezequiel Bergamaschi
44b3707005 avoid override bootstrap nav-pills class 2014-03-11 23:43:45 -03:00
Ezequiel Bergamaschi
251f0eca46 new header 2014-03-10 01:22:30 -03:00
Ezequiel Bergamaschi
1bdf75e295 rows clickeables 2014-03-10 00:12:49 -03:00
Ezequiel Bergamaschi
ccdab5257b css and animation fadeIn 2014-03-09 23:41:39 -03:00
Ezequiel Bergamaschi
797a4adfd4 small searcher 2014-03-09 23:41:17 -03:00
Ezequiel Bergamaschi
3b64577d15 small buttons 2014-03-09 23:41:00 -03:00
Ezequiel Bergamaschi
06fc95c454 Revert "rename parameter"
This reverts commit 29894a276e.
2014-03-09 22:08:46 -03:00
Ezequiel Bergamaschi
18584e8c9f using bootstrap for modal loading dialog 2014-03-09 20:50:41 -03:00
Ezequiel Bergamaschi
3969097d21 working on loading dialog 2014-03-09 05:50:52 -03:00
Claudio Barril
0c15789c4b force linkLabel to use view security in mindmap service 2014-03-09 02:34:20 -03:00
Claudio Barril
ae31613fdd renaming method addLabel to linkLabel 2014-03-09 02:34:20 -03:00
Ezequiel Bergamaschi
1edb15cfe1 hotkeys enter issue fixed 2014-03-09 02:00:16 -03:00
Ezequiel Bergamaschi
f4773c4ce7 reimplementing shortcuts 2014-03-09 01:46:05 -03:00
Ezequiel Bergamaschi
c89a27e62e Dummy Keyboard class 2014-03-09 01:45:53 -03:00
Ezequiel Bergamaschi
d2176a49a7 hotkeys plugin 2014-03-09 01:45:36 -03:00
Paulo Gustavo Veiga
6432fefa67 Merged WISE-217-fixMindmapsAreShowingOtherUserLabels into develop 2014-03-08 23:58:20 -03:00
Claudio Barril
29037e60d8 select only my labels from all mindmap labels 2014-03-08 16:29:43 -03:00
Claudio Barril
29894a276e rename parameter 2014-03-08 16:29:42 -03:00
Claudio Barril
db0595ac7e remove unused exception and class 2014-03-08 16:29:42 -03:00
Paulo Gustavo Veiga
fde613e24a Start working on editor.html. 2014-03-05 00:55:22 -03:00
Paulo Gustavo Veiga
1706c25cfd Rename web2d fire event. 2014-03-05 00:45:08 -03:00
Paulo Gustavo Veiga
dca67ecd79 Fix event fore. 2014-03-05 00:38:03 -03:00
Paulo Gustavo Veiga
e5186688ab Finally viewmode.html render. 2014-03-05 00:14:28 -03:00
Paulo Gustavo Veiga
255f50eda8 More fixes ... 2014-03-04 23:09:39 -03:00
Paulo Gustavo Veiga
3cf3b857a3 Keep fixing issues. 2014-03-04 22:59:39 -03:00
Paulo Gustavo Veiga
b46ad170fb Keep migration to jQuery ... 2014-03-04 22:48:31 -03:00
Paulo Gustavo Veiga
0d0db68038 Fix workspace. 2014-03-04 21:33:47 -03:00
Paulo Gustavo Veiga
1580d20e31 Fix font tests. 2014-03-04 21:24:03 -03:00
Paulo Gustavo Veiga
d9cd33c487 Fix text children... 2014-03-04 21:09:59 -03:00
Paulo Gustavo Veiga
88369dfb53 Replace document.id by Jquery $ 2014-03-04 21:07:52 -03:00
Paulo Gustavo Veiga
4c83b27e6f Reduce Mootools components. 2014-03-04 20:47:23 -03:00
Paulo Gustavo Veiga
4c6484ff00 Remove Overlay.js ... 2014-03-04 18:27:52 -03:00
Paulo Gustavo Veiga
6048b6ae14 Merge branch 'develop' into feature/remove_mootols 2014-03-04 18:21:54 -03:00
Paulo Gustavo Veiga
bf8345908b Merge branch 'feature/WISE-15-mindmapListFolderSupport' into develop 2014-03-04 16:11:52 -03:00
Mariela Michalek
d111c54f15 add new label test 2014-02-25 22:19:52 -03:00
Paulo Gustavo Veiga
0e0e3ec29e Remove moodialog
Re-implementing message dialog.
Fix several imports.
2014-02-19 03:34:12 -03:00
Paulo Gustavo Veiga
4efd64fac1 Remove mootools more dependency. 2014-02-19 03:11:13 -03:00
Paulo Gustavo Veiga
f8f8892dbb Remove Hash dependency. 2014-02-19 03:09:24 -03:00
Paulo Gustavo Veiga
f3f03be007 Add just restricted mootools libraries. 2014-02-19 03:01:32 -03:00
Paulo Gustavo Veiga
e386a571d3 Fix arrow tests. 2014-02-17 10:43:25 -03:00
Paulo Gustavo Veiga
f14fe84a85 Fix several tests. 2014-02-17 10:20:55 -03:00
Paulo Gustavo Veiga
ef164cc831 Replace $ by document.id for avoid colitions. 2014-02-17 10:16:43 -03:00
Paulo Gustavo Veiga
ac50c6633c Replace $dolar sign. 2014-02-17 10:11:58 -03:00
Paulo Gustavo Veiga
6a5eb910b5 Fix display lock message. 2014-02-17 09:05:54 -03:00
Ezequiel Bergamaschi
8462e54293 Merge remote-tracking branch 'origin/develop' into feature/WISE-15-mindmapListFolderSupport
Conflicts:
	wise-webapp/src/main/webapp/jsp/mindmapList.jsp
2014-02-14 03:54:36 -03:00
Paulo Gustavo Veiga
7b45b4b633 Remove console.log messsage. 2014-02-12 14:37:04 -03:00
Paulo Gustavo Veiga
b7051d56c0 Fix modal dialogs loading ... 2014-02-12 14:37:04 -03:00
Paulo Gustavo Veiga
8be0f19792 Move adsense location 2014-02-12 01:00:12 -03:00
Paulo Gustavo Veiga
44dbce0801 Fix login color h1. 2014-02-12 00:55:04 -03:00
Paulo Gustavo Veiga
878fe464ea Reference bootstrap min.
Fin export dialog.
2014-02-12 00:20:06 -03:00
Paulo Gustavo Veiga
68fd71d300 Fix no closed div element on account settings. 2014-02-11 23:27:46 -03:00
Paulo Gustavo Veiga
73e955afac Fix table hover issue. 2014-02-11 21:45:29 -03:00
Ezequiel Bergamaschi
ea4684d9c8 get label by id with user and validate label exists on link to mindmap 2014-02-11 02:04:09 -03:00
Ezequiel Bergamaschi
0b021c7602 style change.. 2014-02-11 01:36:19 -03:00
Ezequiel Bergamaschi
1de1a9f55f warning in yellow 2014-02-11 01:05:31 -03:00
Ezequiel Bergamaschi
60d75b6f2d code indendt 2014-02-11 00:48:48 -03:00
Ezequiel Bergamaschi
ae71b1331f fix focus on modal 2014-02-11 00:43:20 -03:00
Ezequiel Bergamaschi
c56698d085 fix color picker on background 2014-02-11 00:43:04 -03:00
Ezequiel Bergamaschi
7299c7d506 fixing ui 2014-02-11 00:18:46 -03:00
Ezequiel Bergamaschi
9e8f73df99 Merge remote-tracking branch 'origin/develop' into feature/WISE-15-mindmapListFolderSupport
Conflicts:
	wise-webapp/src/main/webapp/jsp/mindmapList.jsp
2014-02-10 22:16:48 -03:00
Paulo Gustavo Veiga
08a066271b Merged WISE-209-new-map-is-not-working-on-ie-10 into develop 2014-02-09 23:11:38 -03:00
Paulo Gustavo Veiga
8996df4cbb More minor fixes. 2014-02-09 22:44:58 -03:00
Paulo Gustavo Veiga
c5932dc0f8 Fix mindmap list navigator toolbar. 2014-02-09 22:14:53 -03:00
Paulo Gustavo Veiga
832fb6ce52 Enable MYSQL display message. 2014-02-09 22:04:01 -03:00
Paulo Gustavo Veiga
bbc380366f Fix login page. 2014-02-09 21:58:23 -03:00
Paulo Gustavo Veiga
95d9414ae3 Change sd to md styles. 2014-02-09 20:12:24 -03:00
Paulo Gustavo Veiga
f339ed777e Merge branch 'release/v3.0.2' of https://bitbucket.org/wisemapping/wisemapping-open-source 2014-01-15 11:03:41 -03:00
647 changed files with 40518 additions and 25129 deletions

View File

@@ -8,7 +8,7 @@ The goal of this project is to provide a high quality product that can be deploy
The following products must be installed:
* Java Development Kit 7 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])
* Java Development Kit 8 or higher ([http://www.oracle.com/technetwork/java/javase/downloads/index.html])
* Maven 3.x or higher ([http://maven.apache.org/])
### Compiling
@@ -32,7 +32,7 @@ The previously generated war can be deployed locally executing within the direct
`cd wise-webapp;mvn jetty:run-war`
This will start the application on the URL: [http://localhost:8080/wise-webapp/]. Additionally, a file based database is automatically populated with a test user.
This will start the application on the URL: [http://localhost:8080/] using file based database..
User: test@wisemapping.org
Password: test
@@ -49,6 +49,10 @@ To test the javascript frontend you then do:
Now open a browser using the URL http://localhost:8000/wise-editor/src/main/webapp/
## Maintenance
## Members
### Founders
@@ -70,3 +74,4 @@ Now open a browser using the URL http://localhost:8000/wise-editor/src/main/weba
The source code is Licensed under the WiseMapping Open License, Version 1.0 (the “License”);
You may obtain a copy of the License at: [https://wisemapping.atlassian.net/wiki/display/WS/License]

View File

@@ -6,22 +6,5 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemappin
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (2, 'Admin', 'User', 'admin', 1237, CURDATE(), 1,'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (3, 'homer@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (3, 'Homer', 'Simpson', 'homer', 1237, CURDATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (4, 'marge@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (4, 'Marge', 'Bouvier', 'marge', 1237, CURDATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (5, 'bart@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (5, 'Bart', 'Simpson', 'bart', 1237, CURDATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (6, 'lisa@wisemapping.org', CURDATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (6, 'Lisa', 'Simpson', 'lisa', 1237, CURDATE(), 1, 'D');
COMMIT;
SHUTDOWN;
SHUTDOWN;

View File

@@ -37,7 +37,8 @@ CREATE TABLE LABEL (
title VARCHAR(30),
creator_id INTEGER NOT NULL,
parent_label_id INTEGER,
color VARCHAR(7) NOT NULL
color VARCHAR(7) NOT NULL,
iconName VARCHAR(50) NOT NULL
--FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id)
);

View File

@@ -10,20 +10,4 @@ INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemappin
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (2, 'Admin', 'User', 'admin', 1237, CURRENT_DATE(), 1,'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (3, 'homer@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (3, 'Homer', 'Simpson', 'homer', 1237, CURRENT_DATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (4, 'marge@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (4, 'Marge', 'Bouvier', 'marge', 1237, CURRENT_DATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (5, 'bart@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (5, 'Bart', 'Simpson', 'bart', 1237, CURRENT_DATE(), 1, 'D');
INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (6, 'lisa@wisemapping.org', CURRENT_DATE());
INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type)
VALUES (6, 'Lisa', 'Simpson', 'lisa', 1237, CURRENT_DATE(), 1, 'D');
COMMIT;

View File

@@ -58,6 +58,7 @@ CREATE TABLE LABEL (
creator_id INTEGER NOT NULL,
parent_label_id INTEGER,
color VARCHAR(7) NOT NULL,
iconName VARCHAR(50) NOT NULL,
FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id),
FOREIGN KEY (parent_label_id) REFERENCES LABEL (id)
ON DELETE CASCADE

View File

@@ -31,4 +31,7 @@ CREATE TABLE R_LABEL_MINDMAP (
)
CHARACTER SET utf8;
ALTER TABLE `LABEL`
ADD COLUMN iconName VARCHAR(50) NOT NULL;
UPDATE LABEL SET iconName = 'glyphicon glyphicon-tag';

View File

@@ -9,8 +9,11 @@
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath>
<version>3.1-SNAPSHOT</version>
<version>5.0.0</version>
</parent>
<scm>
<developerConnection>scm:git:git@bitbucket.org:wisemapping/wisemapping-open-source.git</developerConnection>
</scm>
<build>
<plugins>
@@ -32,6 +35,28 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.3.1.5</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceIncludes>
<include>Functions.js</include>
</sourceIncludes>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
@@ -51,19 +76,9 @@
<include>${basedir}/target/tmp/header-min.js</include>
<include>${basedir}/target/tmp/Functions-min.js</include>
<include>${basedir}/target/tmp/Utils-min.js</include>
<!-- @Todo:Review this -->
<include>
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/Overlay.js
</include>
<include>
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.js
</include>
<include>
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.Request.js
</include>
<include>
${basedir}/../mindplot/src/main/javascript/libraries/moodialog/MooDialog.Fx.js
</include>
<include>${basedir}/../mindplot/src/main/javascript/Options.js</include>
<include>${basedir}/../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.js</include>
<include>${basedir}/../mindplot/src/main/javascript/libraries/bootstrap/BootstrapDialog.Request.js</include>
</includes>
</aggregation>
</aggregations>

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the

View File

@@ -0,0 +1,10 @@
describe("Functions suite test", function() {
it("$defined() test spec", function() {
var testVariable = undefined;
expect($defined(testVariable)).toBe(false);
testVariable = 1;
expect($defined(testVariable)).toBe(true);
testVariable = null;
expect($defined(testVariable)).toBe(false);
});
});

47
distribution/Dockerfile Normal file
View File

@@ -0,0 +1,47 @@
# Dockerizing WiseMapping: Dockerfile for building WiseMapping images
# Based on ubuntu:latest, installs WiseMapping (http://ww.wisemapping.org)
FROM ubuntu:latest
MAINTAINER Paulo Gustavo Veiga <pveiga@wisemapping.com>
ENV DEBIAN_FRONTEND noninteractive
ENV MYSQL_ROOT_PASSWORD password
ENV WISE_VERSION 4.0.2
# Install utilities
RUN apt-get install -y zip
# Prepare distribution
COPY target/wisemapping-v${WISE_VERSION}.zip .
RUN unzip wisemapping-v${WISE_VERSION}.zip
# Install MySQL
RUN echo mysql-server mysql-server/root_password password ${MYSQL_ROOT_PASSWORD} | debconf-set-selections;\
echo mysql-server mysql-server/root_password_again password ${MYSQL_ROOT_PASSWORD} | debconf-set-selections;\
apt-get install -y mysql-server
RUN service mysql start && \
mysql -uroot -p${MYSQL_ROOT_PASSWORD} < /wisemapping-v${WISE_VERSION}/config/database/mysql/create-database.sql && \
mysql -uwisemapping -Dwisemapping -ppassword < /wisemapping-v${WISE_VERSION}/config/database/mysql/create-schemas.sql && \
mysql -uwisemapping -Dwisemapping -ppassword < /wisemapping-v${WISE_VERSION}/config/database/mysql/apopulate-schemas.sql
# Install Java 8
RUN apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java && \
apt-get update
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections;\
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections;\
sudo apt-get install -y oracle-java8-installer
# Configure instance
COPY docker-conf/app.properties wisemapping-v4.0.1/webapps/wisemapping/WEB-INF/app.properties
# Clean up
RUN apt-get clean
RUN rm wisemapping-v${WISE_VERSION}.zip
EXPOSE 8080
CMD "sh" "-c" "service mysql start;cd wisemapping-v${WISE_VERSION};./start.sh"

View File

@@ -0,0 +1,160 @@
##################################################################################
# Database Configuration
##################################################################################
# MariaDB configuration properties
database.url=jdbc:mariadb://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
database.driver=org.mariadb.jdbc.Driver
database.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
database.username=wisemapping
database.password=mappingwise
database.validation.enabled=true
database.validation.query=SELECT 1
# MySQL 5.X configuration properties
#database.url=jdbc:mysql://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
#database.driver=com.mysql.jdbc.Driver
#database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
#database.username=wisemapping
#database.password=password
#database.validation.enabled=true
#database.validation.query=SELECT 1
## PostgreSQL configuration properties
#database.url=jdbc:mariadb://localhost:3306/wisemapping
#database.driver=org.mariadb.jdbc.Driver
#database.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
#database.username=wisemapping
#database.password=password
#database.validation.query=
#database.validation.enabled=false
# HSQL Configuration properties
#database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
#database.driver=org.hsqldb.jdbc.JDBCDriver
#database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
#database.username=sa
#database.password=
#database.validation.enabled=false
#database.validation.query=
##################################################################################
# Mail configuration. Must be configured to enable user registration confirmation.
##################################################################################
#------------------------
# Plain SMTP Server Configuration
#------------------------
mail.smtp.port=25
mail.smtp.host=localhost
mail.username=root
mail.password=
mail.smtp.auth=false
mail.smtp.starttls.enable=false
mail.smtp.quitwait=false
#------------------------
# GMAIL SMTP Configuration
#------------------------
#mail.smtp.port=587
#mail.smtp.host=smtp.gmail.com
#mail.username=<gmail-user-account>
#mail.password=<gmail-password>
#mail.smtp.auth=true
#mail.smtp.starttls.enable=true
#mail.smtp.quitwait=false
#------------------------
# Emails configuration
#------------------------
# Required: "from" email account that will appear in the emails sent from the sender.
mail.serverSendEmail=root@localhost
# Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site.
mail.supportEmail=root@localhost
# Optional: Unexpected errors will be reported to this address.
mail.errorReporterEmail=
##################################################################################
# Users Registration Configuration
##################################################################################
# Enable captcha confirmation
google.recaptcha2.enabled = true
# ReCaptcha is the default captcha. Public and private keys are required.
# More Info: http://www.google.com/recaptcha .
google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
##################################################################################
# Site configuration
##################################################################################
# Site administration user. This user will have special permissions for operations such as removing users, set password
# etc.
admin.user = admin@wisemapping.org
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
# If you are planning to put wisemapping behind an Apache using an Apache Proxy setup, you must enable this property.
#site.baseurl = http://example.com:8080/wisemapping
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/home
##################################################################################
# Google Analytics Settings
##################################################################################
google.analytics.enabled=false
google.analytics.account=UA-XXXX
##################################################################################
# Google Ads enable
##################################################################################
google.ads.enabled=false
#######################################################################################
# Authentication Configuration Section
#######################################################################################
# Two type of security are supported:
# - db: User are stored in the database. Registration is required in advance.
# - ldap: Authentication takes place using a LDAP. In this case, security.ldap.* must be configured.
security.type=db
# LDAP Configuration properties.
security.ldap.server=ldap://localhost:389
# If anonymous password is required, change the wisemapping-security-ldap.xml removing the
security.ldap.server.user=cn=pveiga,dc=wisemapping,dc=com
security.ldap.server.password=password
security.ldap.basedn=dc=wisemapping,dc=com
# This will be concatenated as part of the DN. In this case, I will be "ou=people".
# In case this need to be changed, modify the wisemapping-security-ldap.xml.
security.ldap.subDn=ou=people
# Attribute used as authentication login (Eg: in this case, the user email will be used)
security.ldap.auth.attribute=mail
security.ldap.lastName.attribute=sn
security.ldap.firstName.attribute=givenName
# Enable OpenId Authentication.
security.openid.enabled=false
# REST Documentation
#
# This properties are used for REST API Documentation( http://localhost:8080/wisemapping/doc/rest/index.html)
# Change the URL for proper documentation console setup.
documentation.services.basePath=http://localhost:8080/service
documentation.services.version=3.0.1

View File

@@ -8,7 +8,7 @@ BASE_DIR=`pwd`
TARGET_DIR=$BASE_DIR/target
JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION
WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping
JETTY_VERSION=8.1.14.v20131031
JETTY_VERSION=8.1.16.v20140903
JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION}
JETTY_ZIP=${JETTY_DIST_DIR}.zip
@@ -53,6 +53,7 @@ cp $BASE_DIR/wisemapping.xml $JETTY_DIR/contexts/
# Distribute scripts
cp -r $BASE_DIR/../config/ $TARGET_DIR/wisemapping-$WISE_VERSION/config
cp ./start.sh ${JETTY_DIR}/
cp -r $BASE_DIR/service $TARGET_DIR/wisemapping-$WISE_VERSION/service
# Store version
echo $1 > $WISE_WEBAPP_DIR/version

View File

@@ -0,0 +1,72 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: wisemapping
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: wisemapping
# Description: www.wisemapping.com
### END INIT INFO
set -e
set -u
#environmental variables
JAVA_HOME="/usr/lib/jvm/java7"
JDK_HOME=$JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
WISE_HOME="/opt/wisemapping"
PID_FILE="$WISE_HOME/.pid"
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
preInitChecks() {
MYSQL_STATUS=`pgrep mysql`
if [ -z $MYSQL_STATUS ]; then
service mysql start >/dev/null 2>&1
fi
}
wiseStatus() {
echo `pgrep -f "$WISE_HOME/start.jar"`
}
case "${1:-''}" in
'start')
#preInitChecks
cd $WISE_HOME
echo "Starting Wisemapping..."
java -Xmx256m -Dorg.apache.jasper.compiler.disablejsr199=true -jar $WISE_HOME/start.jar > $WISE_HOME/logs/start.log 2>&1 &
PID=$!
cd - >/dev/null 2>&1
echo "proccess id: $PID"
echo "$PID" > $PID_FILE
;;
'stop')
if [ ! -f $PID_FILE ]; then
PID=$(wiseStatus)
else
PID=`cat $PID_FILE`
rm $PID_FILE >/dev/null 2>&1
fi
kill $PID
echo "Wisemapping stopped"
;;
'restart')
set +e; $SELF stop; set -e
$SELF start
;;
'status')
STATUS=$(wiseStatus)
if [ -n "$STATUS" ]; then
echo "Wisemapping server is running, pid: $STATUS"
else
echo "Wisemapping is stopped"
fi
;;
*)
echo "Usage: $SELF start|stop|restart|status"
exit 1
;;
esac

View File

@@ -9,7 +9,7 @@
<groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath>
<version>3.1-SNAPSHOT</version>
<version>5.0.0</version>
</parent>
<dependencies>
@@ -50,28 +50,27 @@
<configuration>
<source>
def outdir = new File(project.basedir, 'src/main/javascript');
if (project.packaging != 'pom')
{
def dir = new File(project.basedir, 'src/main/resources/');
if (project.packaging != 'pom') {
def dir = new File(project.basedir, 'src/main/resources/');
dir.eachFile { file ->
def matcher = file.name =~ /messages_(.+)\.properties/;
def lang = matcher[0][1];
def outfile = new File(outdir, "MessageBundle_${lang}.js");
println "Converting ${file.name} to ${outfile.name}";
dir.eachFile { file ->
def matcher = file.name =~ /messages_(.+)\.properties/;
def lang = matcher[0][1];
def outfile = new File(outdir, "MessageBundle_${lang}.js");
println "Converting ${file.name} to ${outfile.name}";
outfile.withWriter('UTF-8') { out ->
out.writeLine "mindplot.Messages.BUNDLES['${lang.toLowerCase()}'] = { ";
file.eachLine('UTF-8') { line ->
if( line.trim()!="" &amp;&amp; line[0]!='#' ) {
matcher = line =~ /(.+)=(.+)/;
out.writeLine("'${matcher[0][1]}' : \"${matcher[0][2]}\",");
}
}
out.writeLine("'DUMMY' : '' ");
out.writeLine "};"
}
}
outfile.withWriter('UTF-8') { out ->
out.writeLine "mindplot.Messages.BUNDLES['${lang.toLowerCase()}'] = { ";
file.eachLine('UTF-8') { line ->
if (line.trim() != "" &amp;&amp; line[0] != '#') {
matcher = line =~ /(.+)=(.+)/;
out.writeLine("'${matcher[0][1]}' : \"${matcher[0][2]}\",");
}
}
out.writeLine("'DUMMY' : '' ");
out.writeLine "};"
}
}
}
</source>
</configuration>
@@ -124,6 +123,8 @@
<inputDir>${basedir}/target/compress</inputDir>
<includes>
<include>header.js</include>
<include>Events.js</include>
<include>Options.js</include>
<include>${basedir}/../web2d/target/classes/web2d.svg-min.js</include>
<include>Messages.js</include>
<include>TopicEventDispatcher.js</include>
@@ -139,7 +140,9 @@
<include>ScreenManager.js</include>
<include>Workspace.js</include>
<include>ShrinkConnector.js</include>
<include>Keyboard.js</include>
<include>DesignerKeyboard.js</include>
<include>Keyboard.js</include>
<include>TopicStyle.js</include>
<include>NodeGraph.js</include>
<include>Topic.js</include>
@@ -250,6 +253,175 @@
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.3.1.5</version>
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>test</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<dependencies>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.15</version>
</dependency>
</dependencies>
<configuration>
<webDriverClassName>org.openqa.selenium.phantomjs.PhantomJSDriver</webDriverClassName>
<webDriverCapabilities>
<capability>
<name>phantomjs.binary.path</name>
<value>${phantomjs.binary}</value>
</capability>
</webDriverCapabilities>
<preloadSources>
<source>libraries/mootools/mootools-core-1.4.5-full-nocompat-yc.js</source>
<source>lib/jquery.js</source>
<source>lib/core.js/</source>
<source>lib/web2d.svg-min.js</source>
<source>libraries/hotkeys/jquery.hotkeys.js</source>
<source>libraries/underscorejs/underscore-min.js</source>
<source>libraries/bootstrap/js/bootstrap.js</source>
</preloadSources>
<sourceIncludes>
<include>header.js</include>
<include>Events.js</include>
<include>Messages.js</include>
<include>TopicEventDispatcher.js</include>
<include>model/IMindmap.js</include>
<include>model/Mindmap.js</include>
<include>model/INodeModel.js</include>
<include>model/NodeModel.js</include>
<include>model/RelationshipModel.js</include>
<include>ActionDispatcher.js</include>
<include>StandaloneActionDispatcher.js</include>
<include>DesignerModel.js</include>
<include>Designer.js</include>
<include>ScreenManager.js</include>
<include>Workspace.js</include>
<include>ShrinkConnector.js</include>
<include>Keyboard.js</include>
<include>DesignerKeyboard.js</include>
<include>Keyboard.js</include>
<include>TopicStyle.js</include>
<include>NodeGraph.js</include>
<include>Topic.js</include>
<include>CentralTopic.js</include>
<include>MainTopic.js</include>
<include>DragTopic.js</include>
<include>DragManager.js</include>
<include>DragPivot.js</include>
<include>ConnectionLine.js</include>
<include>Relationship.js</include>
<include>DragConnector.js</include>
<include>TextEditor.js</include>
<include>MultilineTextEditor.js</include>
<include>TextEditorFactory.js</include>
<include>util/Shape.js</include>
<include>util/FadeEffect.js</include>
<include>persistence/ModelCodeName.js</include>
<include>persistence/XMLSerializer_Pela.js</include>
<include>persistence/XMLSerializer_Tango.js</include>
<include>persistence/Pela2TangoMigrator.js</include>
<include>persistence/XMLSerializer_Beta.js</include>
<include>persistence/Beta2PelaMigrator.js</include>
<include>persistence/XMLSerializerFactory.js</include>
<include>PersistenceManager.js</include>
<include>RestPersistenceManager.js</include>
<include>LocalStorageManager.js</include>
<include>EditorProperties.js</include>
<include>IconGroup.js</include>
<include>Icon.js</include>
<include>LinkIcon.js</include>
<include>NoteIcon.js</include>
<include>ActionIcon.js</include>
<include>ImageIcon.js</include>
<include>model/FeatureModel.js</include>
<include>model/IconModel.js</include>
<include>model/LinkModel.js</include>
<include>model/NoteModel.js</include>
<include>Command.js</include>
<include>DesignerActionRunner.js</include>
<include>DesignerUndoManager.js</include>
<include>ControlPoint.js</include>
<include>EditorOptions.js</include>
<include>RelationshipPivot.js</include>
<include>TopicFeature.js</include>
<include>commands/GenericFunctionCommand.js</include>
<include>commands/DeleteCommand.js</include>
<include>commands/DragTopicCommand.js</include>
<include>commands/AddTopicCommand.js</include>
<include>commands/ChangeFeatureToTopicCommand.js</include>
<include>commands/RemoveFeatureFromTopicCommand.js</include>
<include>commands/AddFeatureToTopicCommand.js</include>
<include>commands/AddRelationshipCommand.js</include>
<include>commands/MoveControlPointCommand.js</include>
<include>widget/ModalDialogNotifier.js</include>
<include>widget/ToolbarNotifier.js</include>
<include>widget/ToolbarItem.js</include>
<include>widget/ToolbarPaneItem.js</include>
<include>widget/NoteEditor.js</include>
<include>widget/LinkEditor.js</include>
<include>widget/FloatingTip.js</include>
<include>widget/LinkIconTooltip.js</include>
<include>widget/KeyboardShortcutTooltip.js</include>
<include>widget/ColorPalettePanel.js</include>
<include>widget/ListToolbarPanel.js</include>
<include>widget/FontFamilyPanel.js</include>
<include>widget/FontSizePanel.js</include>
<include>widget/TopicShapePanel.js</include>
<include>widget/IconPanel.js</include>
<include>widget/IMenu.js</include>
<include>widget/Menu.js</include>
<include>TopicFeature.js</include>
<include>layout/EventBusDispatcher.js</include>
<include>layout/ChangeEvent.js</include>
<include>layout/LayoutManager.js</include>
<include>layout/Node.js</include>
<include>layout/RootedTreeSet.js</include>
<include>layout/ChildrenSorterStrategy.js</include>
<include>layout/AbstractBasicSorter.js</include>
<include>layout/BalancedSorter.js</include>
<include>layout/SymmetricSorter.js</include>
<include>layout/GridSorter.js</include>
<include>layout/OriginalLayout.js</include>
<include>layout/EventBus.js</include>
<include>MessageBundle_en.js</include>
<include>MessageBundle_es.js</include>
<include>MessageBundle_de.js</include>
<include>MessageBundle_fr.js</include>
<include>MessageBundle_pt_BR.js</include>
<include>MessageBundle_zh_CN.js</include>
<include>MessageBundle_zh_TW.js</include>
<include>MessageBundle_ca.js</include>
<include>footer.js</include>
</sourceIncludes>
<specExcludes>
<exclude>static/test/*.js</exclude>
<exclude>simpleTest.js</exclude>
</specExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs-maven-plugin</artifactId>
<version>0.5</version>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<version>1.9.2</version>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -18,7 +18,7 @@
//noinspection JSUnusedLocalSymbols
mindplot.ActionDispatcher = new Class({
Implements:[Events],
Implements:[mindplot.Events],
initialize: function(commandContext) {
$assert(commandContext, "commandContext can not be null");
},

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -36,7 +36,7 @@ mindplot.ActionIcon = new Class({
},
addToGroup:function(group) {
group.appendChild(this.getImage());
group.append(this.getImage());
},
setVisibility:function(visible) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,9 +16,15 @@
* limitations under the License.
*/
mindplot.CentralTopic = new Class({
mindplot.CentralTopic = new Class(/** @lends CentralTopic*/{
Extends:mindplot.Topic,
/**
* @extends mindplot.Topic
* @constructs
* @param model
* @param options
*/
initialize:function (model, options) {
this.parent(model, options);
},
@@ -32,15 +38,18 @@ mindplot.CentralTopic = new Class({
});
},
/** */
workoutIncomingConnectionPoint:function () {
return this.getPosition();
},
/** */
setCursor:function (type) {
type = (type == 'move') ? 'default' : type;
this.parent(type);
},
/** */
updateTopicShape:function () {
},
@@ -52,15 +61,17 @@ mindplot.CentralTopic = new Class({
this.setPosition(zeroPoint);
},
/** */
getShrinkConnector:function () {
return null;
},
/** */
workoutOutgoingConnectionPoint:function (targetPosition) {
$assert(targetPosition, 'targetPoint can not be null');
var pos = this.getPosition();
var isAtRight = mindplot.util.Shape.isAtRight(targetPosition, pos);
var size = this.getSize();
return mindplot.util.Shape.calculateRectConnectionPoint(pos, size, !isAtRight);
return mindplot.util.Shape.calculateRectConnectionPoint(pos, size, !isAtRight);
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,23 +16,37 @@
* limitations under the License.
*/
mindplot.Command = new Class(
{
mindplot.Command = new Class(/** @lends mindplot.Command */{
/**
* @classdesc The command base class for handling do/undo mindmap operations
* @constructs
*/
initialize: function()
{
this._id = mindplot.Command._nextUUID();
},
/**
* @abstract
*/
execute: function(commandContext)
{
throw "execute must be implemented.";
},
/**
* Triggered by the undo button - reverses the executed command
* @abstract
*/
undoExecute: function(commandContext)
{
throw "undo must be implemented.";
},
/**
* Returns the unique id of this command
* @returns {Number} command id
*/
getId:function()
{
return this._id;

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -145,7 +145,7 @@ mindplot.ConnectionLine = new Class({
},
addToWorkspace:function (workspace) {
workspace.appendChild(this._line2d);
workspace.append(this._line2d);
this._line2d.moveToBack();
},

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,45 +17,53 @@
*/
mindplot.ControlPoint = new Class({
initialize:function() {
var control1 = new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false});
initialize: function () {
var control1 = new web2d.Elipse({
width: 6,
height: 6,
stroke: '1 solid #6589de',
fillColor: 'gray',
visibility: false
});
control1.setCursor('pointer');
var control2 = new web2d.Elipse({width:6, height:6, stroke:'1 solid #6589de',fillColor:'gray', visibility:false});
var control2 = new web2d.Elipse({
width: 6,
height: 6,
stroke: '1 solid #6589de',
fillColor: 'gray',
visibility: false
});
control2.setCursor('pointer');
this._controlPointsController = [control1,control2];
this._controlLines = [new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3}),
new web2d.Line({strokeColor:"#6589de", strokeWidth:1, opacity:0.3})];
this._controlPointsController = [control1, control2];
this._controlLines = [new web2d.Line({strokeColor: "#6589de", strokeWidth: 1, opacity: 0.3}),
new web2d.Line({strokeColor: "#6589de", strokeWidth: 1, opacity: 0.3})];
this._isBinded = false;
this._controlPointsController[0].addEvent('mousedown', function(event) {
(this._mouseDown.bind(this))(event, mindplot.ControlPoint.FROM);
}.bind(this));
this._controlPointsController[0].addEvent('click', function(event) {
(this._mouseClick.bind(this))(event);
}.bind(this));
this._controlPointsController[0].addEvent('dblclick', function(event) {
(this._mouseClick.bind(this))(event);
}.bind(this));
var me = this;
this._controlPointsController[0].addEvent('mousedown', function (event) {
(me._mouseDown)(event, mindplot.ControlPoint.FROM, me);
});
this._controlPointsController[0].addEvent('click', function (event) {
(me._mouseClick)(event);
});
this._controlPointsController[0].addEvent('dblclick', function (event) {
(me._mouseClick)(event);
});
this._controlPointsController[1].addEvent('mousedown', function(event) {
(this._mouseDown.bind(this))(event, mindplot.ControlPoint.TO);
}.bind(this));
this._controlPointsController[1].addEvent('click', function(event) {
(this._mouseClick.bind(this))(event);
}.bind(this));
this._controlPointsController[1].addEvent('dblclick', function(event) {
(this._mouseClick.bind(this))(event);
}.bind(this));
this._controlPointsController[1].addEvent('mousedown', function (event) {
(me._mouseDown)(event, mindplot.ControlPoint.TO, me);
});
this._controlPointsController[1].addEvent('click', function (event) {
(me._mouseClick)(event);
});
this._controlPointsController[1].addEvent('dblclick', function (event) {
(me._mouseClick)(event);
});
},
setSide : function(side) {
this._side = side;
},
setLine : function(line) {
setLine: function (line) {
if ($defined(this._line)) {
this._removeLine();
}
@@ -69,12 +77,12 @@ mindplot.ControlPoint = new Class({
this._endPoint[1] = this._line.getLine().getTo().clone();
},
redraw : function() {
redraw: function () {
if ($defined(this._line))
this._createControlPoint();
},
_createControlPoint : function() {
_createControlPoint: function () {
this._controls = this._line.getLine().getControlPoints();
var pos = this._line.getLine().getFrom();
this._controlPointsController[0].setPosition(this._controls[mindplot.ControlPoint.FROM].x + pos.x, this._controls[mindplot.ControlPoint.FROM].y + pos.y - 3);
@@ -87,42 +95,43 @@ mindplot.ControlPoint = new Class({
},
_removeLine : function() {
_removeLine: function () {
},
_mouseDown : function(event, point) {
_mouseDown: function (event, point, me) {
if (!this._isBinded) {
this._isBinded = true;
this._mouseMoveFunction = function(event) {
(this._mouseMoveEvent.bind(this))(event, point);
}.bind(this);
this._mouseMoveFunction = function (event) {
(me._mouseMoveEvent)(event, point, me);
};
this._workspace.getScreenManager().addEvent('mousemove', this._mouseMoveFunction);
this._mouseUpFunction = function(event) {
(this._mouseUp.bind(this))(event, point);
}.bind(this);
this._mouseUpFunction = function (event) {
(me._mouseUp)(event, point, me);
};
this._workspace.getScreenManager().addEvent('mouseup', this._mouseUpFunction);
}
event.preventDefault();
event.stop();
event.stopPropagation();
return false;
},
_mouseMoveEvent : function(event, point) {
_mouseMoveEvent: function (event, point) {
var screen = this._workspace.getScreenManager();
var pos = screen.getWorkspaceMousePosition(event);
var topic = null;
var cords;
if (point == 0) {
var cords = mindplot.util.Shape.calculateRelationShipPointCoordinates(this._line.getSourceTopic(), pos);
cords = mindplot.util.Shape.calculateRelationShipPointCoordinates(this._line.getSourceTopic(), pos);
this._line.setFrom(cords.x, cords.y);
this._line.setSrcControlPoint(new core.Point(pos.x - cords.x, pos.y - cords.y));
} else {
var cords = mindplot.util.Shape.calculateRelationShipPointCoordinates(this._line.getTargetTopic(), pos);
cords = mindplot.util.Shape.calculateRelationShipPointCoordinates(this._line.getTargetTopic(), pos);
this._line.setTo(cords.x, cords.y);
this._line.setDestControlPoint(new core.Point(pos.x - cords.x, pos.y - cords.y));
}
this._controls[point].x = (pos.x - cords.x);
this._controls[point].y = (pos.y - cords.y);
this._controlPointsController[point].setPosition(pos.x - 5, pos.y - 3);
@@ -132,7 +141,7 @@ mindplot.ControlPoint = new Class({
},
_mouseUp : function(event, point) {
_mouseUp: function (event, point) {
this._workspace.getScreenManager().removeEvent('mousemove', this._mouseMoveFunction);
this._workspace.getScreenManager().removeEvent('mouseup', this._mouseUpFunction);
@@ -141,13 +150,13 @@ mindplot.ControlPoint = new Class({
this._isBinded = false;
},
_mouseClick : function(event) {
_mouseClick: function (event) {
event.preventDefault();
event.stop();
event.stopPropagation();
return false;
},
setVisibility : function(visible) {
setVisibility: function (visible) {
if (visible) {
this._controlLines[0].moveToFront();
this._controlLines[1].moveToFront();
@@ -160,15 +169,15 @@ mindplot.ControlPoint = new Class({
this._controlLines[1].setVisibility(visible);
},
addToWorkspace : function(workspace) {
addToWorkspace: function (workspace) {
this._workspace = workspace;
workspace.appendChild(this._controlPointsController[0]);
workspace.appendChild(this._controlPointsController[1]);
workspace.appendChild(this._controlLines[0]);
workspace.appendChild(this._controlLines[1]);
workspace.append(this._controlPointsController[0]);
workspace.append(this._controlPointsController[1]);
workspace.append(this._controlLines[0]);
workspace.append(this._controlLines[1]);
},
removeFromWorkspace : function(workspace) {
removeFromWorkspace: function (workspace) {
this._workspace = null;
workspace.removeChild(this._controlPointsController[0]);
workspace.removeChild(this._controlPointsController[1]);
@@ -176,15 +185,15 @@ mindplot.ControlPoint = new Class({
workspace.removeChild(this._controlLines[1]);
},
getControlPoint : function(index) {
getControlPoint: function (index) {
return this._controls[index];
},
getOriginalEndPoint : function(index) {
getOriginalEndPoint: function (index) {
return this._endPoint[index];
},
getOriginalCtrlPoint : function(index) {
getOriginalCtrlPoint: function (index) {
return this._orignalCtrlPoint[index];
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,11 +16,18 @@
* limitations under the License.
*/
mindplot.Designer = new Class({
Extends:Events,
initialize:function (options, divElement) {
mindplot.Designer = new Class(/** @lends Designer */{
Extends: mindplot.Events,
/**
* @constructs
* @param {Object} options
* @param {HTMLElement} divElement
* @extends mindplot.Events
*/
initialize: function (options, divElement) {
$assert(options, "options must be defined");
$assert(options.zoom, "zoom must be defined");
$assert(options.size, "size must be defined");
$assert(divElement, "divElement must be defined");
// Set up i18n location ...
@@ -29,15 +36,16 @@ mindplot.Designer = new Class({
this._options = options;
// Set full div elem render area ...
divElement.setStyles(options.size);
divElement.css(options.size);
// Dispatcher manager ...
var commandContext = new mindplot.CommandContext(this);
this._actionDispatcher = new mindplot.StandaloneActionDispatcher(commandContext);
var me = this;
this._actionDispatcher.addEvent("modelUpdate", function (event) {
this.fireEvent("modelUpdate", event);
}.bind(this));
me.fireEvent("modelUpdate", event);
});
mindplot.ActionDispatcher.setInstance(this._actionDispatcher);
this._model = new mindplot.DesignerModel(options);
@@ -71,48 +79,28 @@ mindplot.Designer = new Class({
},
/**
* Deactivates the keyboard events so you can enter text into forms
* @private
*/
deactivateKeyboard:function () {
mindplot.DesignerKeyboard.getInstance().deactivate();
this.deselectAll();
},
_registerWheelEvents:function () {
var workspace = this._workspace;
var screenManager = workspace.getScreenManager();
_registerWheelEvents: function () {
var zoomFactor = 1.006;
var me = this;
// Zoom In and Zoom Out must active event
$(document).addEvent('mousewheel', function (event) {
// Change mousewheel handling so we let the default
//event happen if we are outside the container.
var coords = screenManager.getContainer().getCoordinates();
var isOutsideContainer = event.client.y < coords.top ||
event.client.y > coords.bottom ||
event.client.x < coords.left ||
event.client.x > coords.right;
if (!isOutsideContainer) {
if (event.wheel > 0) {
this.zoomIn(1.05);
}
else {
this.zoomOut(1.05);
}
event.preventDefault();
$(document).on('mousewheel', function (event) {
if (event.deltaY > 0) {
me.zoomIn(zoomFactor);
} else {
me.zoomOut(zoomFactor);
}
}.bind(this));
event.preventDefault();
});
},
/**
* Activates the keyboard events so you can enter text into forms
* @param {String} type the event type
* @param {Function} listener
* forwards to the TopicEventDispatcher or the parent Events class, depending on the type
*/
activateKeyboard:function () {
mindplot.DesignerKeyboard.getInstance().activate();
},
addEvent:function (type, listener) {
addEvent: function (type, listener) {
if (type == mindplot.TopicEvent.EDIT || type == mindplot.TopicEvent.CLICK) {
var editor = mindplot.TopicEventDispatcher.getInstance();
editor.addEvent(type, listener);
@@ -121,37 +109,37 @@ mindplot.Designer = new Class({
}
},
_registerMouseEvents:function () {
/**
* @private
*/
_registerMouseEvents: function () {
var workspace = this._workspace;
var screenManager = workspace.getScreenManager();
var me = this;
// Initialize workspace event listeners.
screenManager.addEvent('update', function () {
// Topic must be set to his original state. All editors must be closed.
var topics = this.getModel().getTopics();
topics.each(function (object) {
var topics = me.getModel().getTopics();
_.each(topics, function (object) {
object.closeEditors();
});
// Clean some selected nodes on event ..
if (this._cleanScreen)
this._cleanScreen();
}.bind(this));
if (me._cleanScreen)
me._cleanScreen();
});
// Deselect on click ...
screenManager.addEvent('click', function (event) {
this.onObjectFocusEvent(null, event);
}.bind(this));
me.onObjectFocusEvent(null, event);
});
// Create nodes on double click...
screenManager.addEvent('dblclick', function (event) {
if (workspace.isWorkspaceEventsEnabled()) {
var mousePos = screenManager.getWorkspaceMousePosition(event);
var centralTopic = this.getModel().getCentralTopic();
var model = this._createChildModel(centralTopic, mousePos);
var centralTopic = me.getModel().getCentralTopic();
var model = me._createChildModel(centralTopic, mousePos);
this._actionDispatcher.addTopics([model], [centralTopic.getId()]);
}
}.bind(this));
@@ -161,47 +149,15 @@ mindplot.Designer = new Class({
evt.stopPropagation();
evt.preventDefault();
}
// Enable drag events ...
// @Todo: Images support on progress ...
// Element.NativeEvents.dragenter = 2;
// Element.NativeEvents.dragexit = 2;
// Element.NativeEvents.dragover = 2;
// Element.NativeEvents.drop = 2;
//
// screenManager.addEvent('dragenter', noopHandler);
// screenManager.addEvent('dragexit', noopHandler);
// screenManager.addEvent('dragover', noopHandler);
// screenManager.addEvent('drop', function (evt) {
// evt.stopPropagation();
// evt.preventDefault();
////
// var files = evt.event.dataTransfer.files;
// console.log(event);
//
// var count = files.length;
//
// // Only call the handler if 1 or more files was dropped.
// if (count > 0) {
//
// var model = this.getMindmap().createNode();
// model.setImageSize(80, 43);
// model.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}");
// model.setImageUrl("images/logo-small.png");
// model.setShapeType(mindplot.model.TopicShape.IMAGE);
//
// var position = screenManager.getWorkspaceMousePosition(evt);
// model.setPosition(position.x, position.y);
// model.setPosition(100, 100);
//
// this._actionDispatcher.addTopics([model]);
// }
// }.bind(this));
},
_buildDragManager:function (workspace) {
/**
* @private
* @param {mindplot.Workspace} workspace
* @return {mindplot.DragManager} the new dragManager for the workspace with events
* registered
*/
_buildDragManager: function (workspace) {
var designerModel = this.getModel();
var dragConnector = new mindplot.DragConnector(designerModel, this._workspace);
@@ -237,24 +193,35 @@ mindplot.Designer = new Class({
return dragManager;
},
setViewPort:function (size) {
/**
* @param {{width:Number, height:Number}} size
* sets width and height of the workspace
*/
setViewPort: function (size) {
this._workspace.setViewPort(size);
var model = this.getModel();
this._workspace.setZoom(model.getZoom(), true);
},
_buildNodeGraph:function (model, readOnly) {
/**
* @private
* @param {mindplot.model.NodeModel} model
* @param {Boolean} readOnly
* @return {mindplot.CentralTopic|mindplot.MainTopic} the topic to the given model,
* connected, added to the drag manager, with events registered - complying type & read mode
*/
_buildNodeGraph: function (model, readOnly) {
// Create node graph ...
var topic = mindplot.NodeGraph.create(model, {readOnly:readOnly});
var topic = mindplot.NodeGraph.create(model, {readOnly: readOnly});
this.getModel().addTopic(topic);
var me = this;
// Add Topic events ...
if (!readOnly) {
// If a node had gained focus, clean the rest of the nodes ...
topic.addEvent('mousedown', function (event) {
this.onObjectFocusEvent(topic, event);
}.bind(this));
me.onObjectFocusEvent(topic, event);
});
// Register node listeners ...
if (topic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
@@ -286,38 +253,44 @@ mindplot.Designer = new Class({
}
topic.addEvent('ontblur', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
var topics = me.getModel().filterSelectedTopics();
var rels = me.getModel().filterSelectedRelationships();
if (topics.length == 0 || rels.length == 0) {
this.fireEvent('onblur');
me.fireEvent('onblur');
}
}.bind(this));
});
topic.addEvent('ontfocus', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
var topics = me.getModel().filterSelectedTopics();
var rels = me.getModel().filterSelectedRelationships();
if (topics.length == 1 || rels.length == 1) {
this.fireEvent('onfocus');
me.fireEvent('onfocus');
}
}.bind(this));
});
return topic;
return topic;
},
onObjectFocusEvent:function (currentObject, event) {
/**
* @param {?mindplot.Topic} currentObject
* @param {Event=} event
* sets focus to the given currentObject and removes it from any other objects if not
* triggered with Ctrl pressed
*/
onObjectFocusEvent: function (currentObject, event) {
// Close node editors ..
var topics = this.getModel().getTopics();
topics.each(function (topic) {
_.each(topics, function (topic) {
topic.closeEditors();
});
var model = this.getModel();
var objects = model.getEntities();
objects.each(function (object) {
_.each(objects, function (object) {
// Disable all nodes on focus but not the current if Ctrl key isn't being pressed
if (!$defined(event) || (!event.control && !event.meta)) {
if (!$defined(event) || (!event.ctrlKey && !event.metaKey)) {
if (object.isOnFocus() && object != currentObject) {
object.setOnFocus(false);
}
@@ -326,26 +299,28 @@ mindplot.Designer = new Class({
},
selectAll:function () {
/** sets focus to all model entities, i.e. relationships and topics */
selectAll: function () {
var model = this.getModel();
var objects = model.getEntities();
objects.each(function (object) {
_.each(objects, function (object) {
object.setOnFocus(true);
});
},
deselectAll:function () {
/** removes focus from all model entities, i.e. relationships and topics */
deselectAll: function () {
var objects = this.getModel().getEntities();
objects.each(function (object) {
_.each(objects, function (object) {
object.setOnFocus(false);
});
},
/**
* Set the zoom of the map.
* @param: zoom: number between 0.3 and 1.9
* Set the zoom of the map
* @param {Number} zoom number between 0.3 and 1.9
*/
setZoom:function (zoom) {
setZoom: function (zoom) {
if (zoom > 1.9 || zoom < 0.3) {
$notify($msg('ZOOM_IN_ERROR'));
return;
@@ -354,7 +329,11 @@ mindplot.Designer = new Class({
this._workspace.setZoom(zoom);
},
zoomOut:function (factor) {
/**
* @param {Number=} factor
* zoom out by the given factor, or 1.2, if undefined
*/
zoomOut: function (factor) {
if (!factor)
factor = 1.2;
@@ -370,7 +349,11 @@ mindplot.Designer = new Class({
},
zoomIn:function (factor) {
/**
* @param {Number=} factor
* zoom in by the given factor, or 1.2, if undefined
*/
zoomIn: function (factor) {
if (!factor)
factor = 1.2;
@@ -386,7 +369,8 @@ mindplot.Designer = new Class({
}
},
copyToClipboard:function () {
/** copy selected topics to a private clipboard */
copyToClipboard: function () {
var topics = this.getModel().filterSelectedTopics();
if (topics.length <= 0) {
// If there are more than one node selected,
@@ -412,7 +396,8 @@ mindplot.Designer = new Class({
$notify($msg('SELECTION_COPIED_TO_CLIPBOARD'));
},
pasteClipboard:function () {
/** paste clipboard contents to the mindmap */
pasteClipboard: function () {
if (this._clipboard.length == 0) {
$notify($msg('CLIPBOARD_IS_EMPTY'));
return;
@@ -421,12 +406,13 @@ mindplot.Designer = new Class({
this._clipboard = [];
},
getModel:function () {
/** @return {mindplot.DesignerModel} model */
getModel: function () {
return this._model;
},
shrinkSelectedBranch:function () {
/** collapse the subtree of the selected topic */
shrinkSelectedBranch: function () {
var nodes = this.getModel().filterSelectedTopics();
if (nodes.length <= 0 || nodes.length != 1) {
// If there are more than one node selected,
@@ -441,7 +427,8 @@ mindplot.Designer = new Class({
}
},
createChildForSelectedNode:function () {
/** create a NodeModel for the selected node's child and add it via the ActionDispatcher */
createChildForSelectedNode: function () {
var nodes = this.getModel().filterSelectedTopics();
if (nodes.length <= 0) {
// If there are more than one node selected,
@@ -466,49 +453,62 @@ mindplot.Designer = new Class({
},
_copyNodeProps: function(sourceModel,targetModel){
/**
* @private
*/
_copyNodeProps: function (sourceModel, targetModel) {
// I don't copy the font size if the target is the source is the central topic.
if(sourceModel.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE)
{
if (sourceModel.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
var fontSize = sourceModel.getFontSize();
if(fontSize){
if (fontSize) {
targetModel.setFontSize(fontSize)
}
}
var fontFamily = sourceModel.getFontFamily();
if(fontFamily){
if (fontFamily) {
targetModel.setFontFamily(fontFamily)
}
var fontColor = sourceModel.getFontColor();
if(fontColor){
if (fontColor) {
targetModel.setFontColor(fontColor)
}
var fontWeight = sourceModel.getFontWeight();
if(fontWeight){
if (fontWeight) {
targetModel.setFontWeight(fontWeight)
}
var fontStyle = sourceModel.getFontStyle();
if(fontStyle){
if (fontStyle) {
targetModel.setFontStyle(fontStyle)
}
var shape = sourceModel.getShapeType();
if(shape){
if (shape) {
targetModel.setShapeType(shape)
}
var borderColor = sourceModel.getBorderColor();
if(borderColor){
if (borderColor) {
targetModel.setBorderColor(borderColor)
}
var backgroundColor = sourceModel.getBackgroundColor();
if (backgroundColor) {
targetModel.setBackgroundColor(backgroundColor)
}
},
_createChildModel:function (topic, mousePos) {
/**
* @private
* @param {mindplot.Topic} topic the parent topic of the child to create the NodeModel for
* @param {core.Point} mousePos the mouse position
* @return {mindplot.NodeModel} the node model for the new child
*/
_createChildModel: function (topic, mousePos) {
// Create a new node ...
var parentModel = topic.getModel();
var mindmap = parentModel.getMindmap();
@@ -522,12 +522,17 @@ mindplot.Designer = new Class({
var position = result.position;
childModel.setPosition(position.x, position.y);
this._copyNodeProps(parentModel,childModel);
this._copyNodeProps(parentModel, childModel);
return childModel;
},
addDraggedNode:function (event, model) {
/**
* @param {Events} event
* @param {mindplot.model.NodeModel} model
* @todo not used
*/
addDraggedNode: function (event, model) {
$assert(event, "event can not be null");
$assert(model, "model can not be null");
@@ -541,7 +546,11 @@ mindplot.Designer = new Class({
topic.fireEvent("mousedown", event);
},
createSiblingForSelectedNode:function () {
/**
* creates a sibling or child node of the selected node, if the selected node is the
* central topic
*/
createSiblingForSelectedNode: function () {
var nodes = this.getModel().filterSelectedTopics();
if (nodes.length <= 0) {
// If there are no nodes selected,
@@ -575,7 +584,12 @@ mindplot.Designer = new Class({
}
},
_createSiblingModel:function (topic) {
/**
* @private
* @param {mindplot.Topic} topic the topic to create the sibling to
* @return {mindplot.NodeModel} the node model of the sibling
*/
_createSiblingModel: function (topic) {
var result = null;
var parentTopic = topic.getOutgoingConnectedTopic();
if (parentTopic != null) {
@@ -591,12 +605,15 @@ mindplot.Designer = new Class({
result.setPosition(10, 10); // Set a dummy position ...
}
this._copyNodeProps(model,result);
this._copyNodeProps(model, result);
return result;
},
showRelPivot:function (event) {
/**
* @param {Event} event
*/
showRelPivot: function (event) {
var nodes = this.getModel().filterSelectedTopics();
if (nodes.length <= 0) {
@@ -613,23 +630,30 @@ mindplot.Designer = new Class({
this._relPivot.start(nodes[0], pos);
},
getMindmapProperties:function () {
return {zoom:this.getModel().getZoom()};
/** @return {{zoom:Number}} the zoom */
getMindmapProperties: function () {
var model = this.getModel();
return {zoom: model.getZoom()};
},
loadMap:function (mindmapModel) {
/**
* @param {mindplot.Mindmap} mindmapModel
* @throws will throw an error if mindmapModel is null or undefined
*/
loadMap: function (mindmapModel) {
$assert(mindmapModel, "mindmapModel can not be null");
this._mindmap = mindmapModel;
// Init layout manager ...
var size = {width:25, height:25};
var size = {width: 25, height: 25};
var layoutManager = new mindplot.layout.LayoutManager(mindmapModel.getCentralTopic().getId(), size);
var me = this;
layoutManager.addEvent('change', function (event) {
var id = event.getId();
var topic = this.getModel().findTopicById(id);
var topic = me.getModel().findTopicById(id);
topic.setPosition(event.getPosition());
topic.setOrder(event.getOrder());
}.bind(this));
});
this._eventBussDispatcher.setLayoutManager(layoutManager);
@@ -638,7 +662,7 @@ mindplot.Designer = new Class({
for (var i = 0; i < branches.length; i++) {
// NodeModel -> NodeGraph ...
var nodeModel = branches[i];
var nodeGraph = this._nodeModelToNodeGraph(nodeModel);
var nodeGraph = this.nodeModelToNodeGraph(nodeModel);
// Update shrink render state...
nodeGraph.setBranchVisibility(true);
@@ -659,24 +683,32 @@ mindplot.Designer = new Class({
this.fireEvent('loadSuccess');
},
getMindmap:function () {
/** */
getMindmap: function () {
return this._mindmap;
},
undo:function () {
/** */
undo: function () {
// @Todo: This is a hack...
this._actionDispatcher._actionRunner.undo();
},
redo:function () {
/** */
redo: function () {
this._actionDispatcher._actionRunner.redo();
},
isReadOnly:function () {
/** */
isReadOnly: function () {
return this._options.readOnly;
},
_nodeModelToNodeGraph:function (nodeModel) {
/**
* @param {mindplot.model.NodeModel} nodeModel
* @return {mindplot.Topic} the topic (extends mindplot.NodeGraph) created to the model
*/
nodeModelToNodeGraph: function (nodeModel) {
$assert(nodeModel, "Node model can not be null");
var children = nodeModel.getChildren().slice();
children = children.sort(function (a, b) {
@@ -686,17 +718,23 @@ mindplot.Designer = new Class({
var nodeGraph = this._buildNodeGraph(nodeModel, this.isReadOnly());
nodeGraph.setVisibility(false);
this._workspace.appendChild(nodeGraph);
this._workspace.append(nodeGraph);
for (var i = 0; i < children.length; i++) {
var child = children[i];
if ($defined(child))
this._nodeModelToNodeGraph(child);
this.nodeModelToNodeGraph(child);
}
return nodeGraph;
},
_relationshipModelToRelationship:function (model) {
/**
* @private
* @param {mindplot.model.RelationshipModel} model
* @return {mindplot.Relationship} the relationship created to the model
* @throws will throw an error if model is null or undefined
*/
_relationshipModelToRelationship: function (model) {
$assert(model, "Node model can not be null");
var result = this._buildRelationshipShape(model);
@@ -709,17 +747,25 @@ mindplot.Designer = new Class({
result.setVisibility(sourceTopic.isVisible() && targetTopic.isVisible());
this._workspace.appendChild(result);
this._workspace.append(result);
return result;
},
_addRelationship:function (model) {
/**
* @param {mindplot.model.RelationshipModel} model
* @return {mindplot.Relationship} the relationship added to the mindmap
*/
addRelationship: function (model) {
var mindmap = this.getMindmap();
mindmap.addRelationship(model);
return this._relationshipModelToRelationship(model);
},
_deleteRelationship:function (rel) {
/**
* deletes the relationship from the linked topics, DesignerModel, Workspace and Mindmap
* @param {mindplot.Relationship} rel the relationship to delete
*/
deleteRelationship: function (rel) {
var sourceTopic = rel.getSourceTopic();
sourceTopic.deleteRelationship(rel);
@@ -733,7 +779,13 @@ mindplot.Designer = new Class({
mindmap.deleteRelationship(rel.getModel());
},
_buildRelationshipShape:function (model) {
/**
* @private
* @param {mindplot.model.RelationshipModel} model
* @return {mindplot.Relationship} the new relationship with events registered
* @throws will throw an error if the target topic cannot be found
*/
_buildRelationshipShape: function (model) {
var dmodel = this.getModel();
var sourceTopicId = model.getFromNode();
@@ -747,40 +799,44 @@ mindplot.Designer = new Class({
// Build relationship line ....
var result = new mindplot.Relationship(sourceTopic, targetTopic, model);
var me = this;
result.addEvent('ontblur', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
var topics = me.getModel().filterSelectedTopics();
var rels = me.getModel().filterSelectedRelationships();
if (topics.length == 0 || rels.length == 0) {
this.fireEvent('onblur');
me.fireEvent('onblur');
}
}.bind(this));
});
result.addEvent('ontfocus', function () {
var topics = this.getModel().filterSelectedTopics();
var rels = this.getModel().filterSelectedRelationships();
var topics = me.getModel().filterSelectedTopics();
var rels = me.getModel().filterSelectedRelationships();
if (topics.length == 1 || rels.length == 1) {
this.fireEvent('onfocus');
me.fireEvent('onfocus');
}
}.bind(this));
});
// Append it to the workspace ...
dmodel.addRelationship(result);
return result;
return result;
},
_removeTopic:function (node) {
/**
* @param {mindplot.Topic} node the topic to remove
* removes the given topic and its children from Workspace, DesignerModel and NodeModel
*/
removeTopic: function (node) {
if (!node.isCentralTopic()) {
var parent = node._parent;
node.disconnect(this._workspace);
//remove children
while (node.getChildren().length > 0) {
this._removeTopic(node.getChildren()[0]);
this.removeTopic(node.getChildren()[0]);
}
this._workspace.removeChild(node);
@@ -796,14 +852,18 @@ mindplot.Designer = new Class({
}
},
_resetEdition:function () {
/**
* @private
*/
_resetEdition: function () {
var screenManager = this._workspace.getScreenManager();
screenManager.fireEvent("update");
screenManager.fireEvent("mouseup");
this._relPivot.dispose();
},
deleteSelectedEntities:function () {
/** */
deleteSelectedEntities: function () {
// Is there some action in progress ?.
this._resetEdition();
@@ -822,8 +882,8 @@ mindplot.Designer = new Class({
var topicIds = topics.filter(function (topic) {
return !topic.isCentralTopic();
}).map(function (topic) {
return topic.getId()
});
return topic.getId()
});
var relIds = relation.map(function (rel) {
@@ -837,7 +897,8 @@ mindplot.Designer = new Class({
},
changeFontFamily:function (font) {
/** */
changeFontFamily: function (font) {
var topicsIds = this.getModel().filterTopicsIds();
if (topicsIds.length > 0) {
this._actionDispatcher.changeFontFamilyToTopic(topicsIds, font);
@@ -845,14 +906,16 @@ mindplot.Designer = new Class({
}
},
changeFontStyle:function () {
/** */
changeFontStyle: function () {
var topicsIds = this.getModel().filterTopicsIds();
if (topicsIds.length > 0) {
this._actionDispatcher.changeFontStyleToTopic(topicsIds);
}
},
changeFontColor:function (color) {
/** */
changeFontColor: function (color) {
$assert(color, "color can not be null");
var topicsIds = this.getModel().filterTopicsIds();
@@ -861,7 +924,8 @@ mindplot.Designer = new Class({
}
},
changeBackgroundColor:function (color) {
/** */
changeBackgroundColor: function (color) {
var validateFunc = function (topic) {
return topic.getShapeType() != mindplot.model.TopicShape.LINE;
@@ -874,7 +938,8 @@ mindplot.Designer = new Class({
}
},
changeBorderColor:function (color) {
/** */
changeBorderColor: function (color) {
var validateFunc = function (topic) {
return topic.getShapeType() != mindplot.model.TopicShape.LINE;
};
@@ -885,14 +950,16 @@ mindplot.Designer = new Class({
}
},
changeFontSize:function (size) {
/** */
changeFontSize: function (size) {
var topicsIds = this.getModel().filterTopicsIds();
if (topicsIds.length > 0) {
this._actionDispatcher.changeFontSizeToTopic(topicsIds, size);
}
},
changeTopicShape:function (shape) {
/** */
changeTopicShape: function (shape) {
var validateFunc = function (topic) {
return !(topic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE && shape == mindplot.model.TopicShape.LINE)
};
@@ -904,42 +971,56 @@ mindplot.Designer = new Class({
}
},
changeFontWeight:function () {
/** */
changeFontWeight: function () {
var topicsIds = this.getModel().filterTopicsIds();
if (topicsIds.length > 0) {
this._actionDispatcher.changeFontWeightToTopic(topicsIds);
}
},
addIconType:function (iconType) {
/** */
addIconType: function (iconType) {
var topicsIds = this.getModel().filterTopicsIds();
if (topicsIds.length > 0) {
this._actionDispatcher.addFeatureToTopic(topicsIds[0], mindplot.TopicFeature.Icon.id, {id:iconType});
this._actionDispatcher.addFeatureToTopic(topicsIds[0], mindplot.TopicFeature.Icon.id, {id: iconType});
}
},
addLink:function () {
/**
* lets the selected topic open the link editor where the user can define or modify an
* existing link
*/
addLink: function () {
var model = this.getModel();
var topic = model.selectedTopic();
if (topic) {
topic.showLinkEditor();
this.onObjectFocusEvent();
}
},
addNote:function () {
/** */
addNote: function () {
var model = this.getModel();
var topic = model.selectedTopic();
if (topic) {
topic.showNoteEditor();
this.onObjectFocusEvent();
}
},
goToNode:function (node) {
/**
* @param {mindplot.Topic} node
* sets the focus to the given node
*/
goToNode: function (node) {
node.setOnFocus(true);
this.onObjectFocusEvent(node);
},
getWorkSpace:function () {
/** @return {mindplot.Workspace} */
getWorkSpace: function () {
return this._workspace;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,7 +17,7 @@
*/
mindplot.DesignerActionRunner = new Class({
initialize:function (commandContext, notifier) {
initialize: function (commandContext, notifier) {
$assert(commandContext, "commandContext can not be null");
this._undoManager = new mindplot.DesignerUndoManager();
@@ -25,7 +25,7 @@ mindplot.DesignerActionRunner = new Class({
this._notifier = notifier;
},
execute:function (command) {
execute: function (command) {
$assert(command, "command can not be null");
command.execute(this._context);
this._undoManager.enqueue(command);
@@ -34,20 +34,20 @@ mindplot.DesignerActionRunner = new Class({
},
undo:function () {
undo: function () {
this._undoManager.execUndo(this._context);
this.fireChangeEvent();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
},
redo:function () {
redo: function () {
this._undoManager.execRedo(this._context);
this.fireChangeEvent();
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
},
fireChangeEvent:function () {
fireChangeEvent: function () {
var event = this._undoManager.buildEvent();
this._notifier.fireEvent("modelUpdate", event);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,11 +17,10 @@
*/
mindplot.DesignerKeyboard = new Class({
Extends:Keyboard,
Extends: mindplot.Keyboard,
Static:{
register:function (designer) {
this._instance = new mindplot.DesignerKeyboard(designer);
this._instance.activate();
},
getInstance:function () {
@@ -31,360 +30,257 @@ mindplot.DesignerKeyboard = new Class({
initialize:function (designer) {
$assert(designer, "designer can not be null");
this.parent({defaultEventType:'keydown'});
this._registerEvents(designer);
},
_registerEvents:function (designer) {
// Try with the keyboard ..
var model = designer.getModel();
var keyboardEvents = {
'backspace':function (event) {
this.addShortcut(
['backspace'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.deleteSelectedEntities();
}.bind(this),
'space':function () {
}
);
this.addShortcut(
['space'], function() {
designer.shrinkSelectedBranch();
}.bind(this),
'f2':function () {
}
);
this.addShortcut(
['f2'],function(event) {
event.stopPropagation();
event.preventDefault();
var node = model.selectedTopic();
if (node) {
node.showTextEditor();
}
}.bind(this),
'delete':function (event) {
}
);
this.addShortcut(
['del'], function(event) {
designer.deleteSelectedEntities();
event.preventDefault();
event.stopPropagation();
}.bind(this),
'enter':function () {
}
);
this.addShortcut(
['enter'], function() {
designer.createSiblingForSelectedNode();
}.bind(this),
'insert':function (event) {
}
);
this.addShortcut(
['insert'], function(event) {
designer.createChildForSelectedNode();
event.preventDefault();
event.stopPropagation();
}.bind(this),
'tab':function (event) {
}
);
this.addShortcut(
['tab'], function(event) {
designer.createChildForSelectedNode();
event.preventDefault();
event.stopPropagation();
}.bind(this),
'-':function () { // "-" is a insert on several Browsers. Don't ask why ...
designer.createChildForSelectedNode();
}.bind(this),
'meta+enter':function (event) {
}
);
this.addShortcut(
['meta+enter'], function(event) {
event.preventDefault();
event.stopPropagation();
designer.createChildForSelectedNode();
}.bind(this),
'ctrl+z':function (event) {
}
);
this.addShortcut(
['ctrl+z', 'meta+z'], function(event) {
event.preventDefault(event);
event.stopPropagation();
designer.undo();
}.bind(this),
'meta+z':function (event) {
event.preventDefault();
event.stopPropagation();
designer.undo();
}.bind(this),
'ctrl+c':function (event) {
}
);
this.addShortcut(
['ctrl+c', 'meta+c'], function (event) {
event.preventDefault(event);
event.stopPropagation();
designer.copyToClipboard();
}.bind(this),
'meta+c':function (event) {
event.preventDefault();
event.stopPropagation();
designer.copyToClipboard();
}.bind(this),
'ctrl+v':function (event) {
}
);
this.addShortcut(
['ctrl+v', 'meta+v'], function (event) {
event.preventDefault(event);
event.stopPropagation();
designer.pasteClipboard();
}.bind(this),
'meta+v':function (event) {
}
);
this.addShortcut(
['ctrl+shift+z', 'meta+shift+z', 'ctrl+y', 'meta+y'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.pasteClipboard();
}.bind(this),
'ctrl+z+shift':function (event) {
event.preventDefault();
event.stopPropagation();
designer.redo();
}.bind(this),
'meta+z+shift':function (event) {
}
);
this.addShortcut(
['ctrl+a', 'meta+a'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.redo();
}.bind(this),
'ctrl+y':function (event) {
event.preventDefault();
event.stopPropagation();
designer.redo();
}.bind(this),
'meta+y':function (event) {
event.preventDefault();
event.stopPropagation();
designer.redo();
}.bind(this),
'ctrl+a':function (event) {
event.preventDefault();
event.stopPropagation();
designer.selectAll();
},
'ctrl+b':function (event) {
}
);
this.addShortcut(
['ctrl+b', 'meta+b'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.changeFontWeight();
},
'meta+b':function (event) {
}
);
this.addShortcut(
['ctrl+s', 'meta+s'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.changeFontWeight();
},
'ctrl+s':function (event) {
event.preventDefault();
event.stopPropagation();
$('save').fireEvent('click');
},
'meta+s':function (event) {
event.preventDefault();
event.stopPropagation();
$('save').fireEvent('click');
},
'ctrl+i':function (event) {
$(document).find('#save').trigger('click');
}
);
this.addShortcut(
['ctrl+i', 'meta+i'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.changeFontStyle();
},
'meta+i':function (event) {
event.preventDefault();
event.stopPropagation();
designer.changeFontStyle();
},
'meta+shift+a':function (event) {
}
);
this.addShortcut(
['ctrl+shift+a', 'meta+shift+a'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.deselectAll();
},
'ctrl+shift+a':function (event) {
event.preventDefault();
event.stopPropagation();
designer.deselectAll();
},
'meta+a':function (event) {
event.preventDefault();
event.stopPropagation();
designer.selectAll();
},
'meta+=':function (event) {
}
);
this.addShortcut(
['meta+=', 'ctrl+='], function (event) {
event.preventDefault();
event.stopPropagation();
designer.zoomIn();
},
'meta+-':function (event) {
}
);
this.addShortcut(
['meta+-', 'ctrl+-'], function (event) {
event.preventDefault();
event.stopPropagation();
designer.zoomOut();
},
'ctrl+=':function (event) {
event.preventDefault();
event.stopPropagation();
designer.zoomIn();
},
'ctrl+-':function (event) {
event.preventDefault();
event.stopPropagation();
designer.zoomOut();
},
'right':function (event) {
}
);
var me = this;
this.addShortcut(
'right', function (event) {
var node = model.selectedTopic();
if (node) {
if (node.isCentralTopic()) {
this._goToSideChild(designer, node, 'RIGHT');
me._goToSideChild(designer, node, 'RIGHT');
}
else {
if (node.getPosition().x < 0) {
this._goToParent(designer, node);
me._goToParent(designer, node);
}
else if (!node.areChildrenShrunken()) {
this._goToChild(designer, node);
me._goToChild(designer, node);
}
}
} else {
var centralTopic = model.getCentralTopic();
this._goToNode(designer, centralTopic);
me._goToNode(designer, centralTopic);
}
event.preventDefault();
event.stopPropagation();
}.bind(this),
'left':function (event) {
}
);
this.addShortcut(
'left', function (event) {
var node = model.selectedTopic();
if (node) {
if (node.isCentralTopic()) {
this._goToSideChild(designer, node, 'LEFT');
me._goToSideChild(designer, node, 'LEFT');
}
else {
if (node.getPosition().x > 0) {
this._goToParent(designer, node);
me._goToParent(designer, node);
}
else if (!node.areChildrenShrunken()) {
this._goToChild(designer, node);
me._goToChild(designer, node);
}
}
} else {
var centralTopic = model.getCentralTopic();
this._goToNode(designer, centralTopic);
me._goToNode(designer, centralTopic);
}
event.preventDefault();
event.stopPropagation();
}.bind(this),
'up':function (event) {
}
);
this.addShortcut(
'up', function (event) {
var node = model.selectedTopic();
if (node) {
if (!node.isCentralTopic()) {
this._goToBrother(designer, node, 'UP');
me._goToBrother(designer, node, 'UP');
}
} else {
var centralTopic = model.getCentralTopic();
this._goToNode(designer, centralTopic);
me._goToNode(designer, centralTopic);
}
event.preventDefault();
event.stopPropagation();
}.bind(this),
'down':function (event) {
}
);
this.addShortcut(
'down', function (event) {
var node = model.selectedTopic();
if (node) {
if (!node.isCentralTopic()) {
this._goToBrother(designer, node, 'DOWN');
me._goToBrother(designer, node, 'DOWN');
}
} else {
var centralTopic = model.getCentralTopic();
this._goToNode(designer, centralTopic);
me._goToNode(designer, centralTopic);
}
event.preventDefault();
event.stopPropagation();
}.bind(this)
};
this.addEvents(keyboardEvents);
var regex = /^(?:shift|control|ctrl|alt|meta)$/;
var modifiers = ['shift', 'control', 'alt', 'meta'];
var excludes = ['esc', 'capslock', 'tab', 'f1', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12', 'backspace', 'down', 'up', 'left', 'right', 'control'];
if (!Browser.Platform.mac) {
// This is to avoid enter on edition mode in the node when alt+tab is pressed.
excludes.push("alt");
}
$(document).addEvent('keydown', function (event) {
// Convert key to mootools keyboard event format...
var keys = [];
modifiers.each(function (mod) {
if (event[mod]) keys.push(mod);
});
if (!regex.test(event.key))
keys.push(event.key);
var key = keys.join('+');
// Is the pressed key one of the already registered in the keyboard ?
var isRegistered = false;
for (var eKey in keyboardEvents) {
if (eKey == key) {
isRegistered = true;
break;
}
}
);
var excludes = ['esc', 'escape', 'f1', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12'];
$(document).on('keypress', function (event) {
var keyCode;
// Firefox doesn't skip special keys for keypress event...
if (event.key && excludes.contains(event.key.toLowerCase())) {
return;
}
// Sometimes Firefox doesn't contain keyCode value
if (event.key && event.keyCode == 0) {
keyCode = event.charCode;
} else {
keyCode = event.keyCode;
}
// If it's not registered, let's
if (!isRegistered && !excludes.contains(key) && !excludes.contains(event.key) && !event.meta && !event.control) {
var specialKey = jQuery.hotkeys.specialKeys[keyCode];
if (["enter", "capslock"].indexOf(specialKey) == -1 && !jQuery.hotkeys.shiftNums[keyCode]) {
var nodes = designer.getModel().filterSelectedTopics();
if (nodes.length > 0) {
// If a modifier is press, the key selected must be ignored.
var pressKey = event.key;
if (modifiers.contains(event.key)) {
pressKey = "";
var pressKey = String.fromCharCode(keyCode);
if (event.ctrlKey || event.altKey || event.metaKey) {
return;
}
nodes[0].showTextEditor(pressKey);
event.stopPropagation();
}
}
});
},
@@ -488,3 +384,14 @@ mindplot.DesignerKeyboard = new Class({
}
});
mindplot.DesignerKeyboard.specialKeys = {
8: "backspace", 9: "tab", 10: "return", 13: "enter", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 186: ";", 191: "/",
220: "\\", 222: "'", 224: "meta"
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,35 +16,51 @@
* limitations under the License.
*/
mindplot.DesignerModel = new Class({
Implements:[Events],
mindplot.DesignerModel = new Class(/** @lends DesignerModel */{
Implements:[mindplot.Events],
/**
* @implements {mindplot.Events}
* @constructs
* @param {{readOnly: Boolean, zoom: Number, saveOnLoad: Boolean, size: {width: Number,
* height: Number}, viewPort: {width: Number, height: Number}, container: String,
* persistenceManager: String, mapId: String, locale: String}} options
* options loaded from json config
* @see {@link ConfigParameters.md}
* @see {@link editor.html}
*/
initialize:function (options) {
this._zoom = options.zoom;
this._topics = [];
this._relationships = [];
},
/** @return {Number} zoom between 0.3 (largest text) and 1.9 */
getZoom:function () {
return this._zoom;
},
/** @param {Number} zoom number between 0.3 and 1.9 to set the zoom to */
setZoom:function (zoom) {
this._zoom = zoom;
},
/** @return {@link mindplot.Topic[]} all topics */
getTopics:function () {
return this._topics;
},
/** @return {mindplot.Relationship[]} all relationships */
getRelationships:function () {
return this._relationships;
},
/** @return {mindplot.CentralTopic} the central topic */
getCentralTopic:function () {
var topics = this.getTopics();
return topics[0];
},
/** @return {mindplot.Topic[]} selected topics */
filterSelectedTopics:function () {
var result = [];
for (var i = 0; i < this._topics.length; i++) {
@@ -55,6 +71,9 @@ mindplot.DesignerModel = new Class({
return result;
},
/**
* @return {mindplot.Relationship[]} selected relationships
*/
filterSelectedRelationships:function () {
var result = [];
for (var i = 0; i < this._relationships.length; i++) {
@@ -65,33 +84,60 @@ mindplot.DesignerModel = new Class({
return result;
},
/**
* @return {Array.<mindplot.Relationship, mindplot.Topic>} all topics and relationships
*/
getEntities:function () {
var result = [].append(this._topics);
result.append(this._relationships);
return result;
},
/**
* removes occurrences of the given topic from the topic array
* @param {mindplot.Topic} topic the topic to remove
*/
removeTopic:function (topic) {
$assert(topic, "topic can not be null");
this._topics.erase(topic);
},
/**
* removes occurrences of the given relationship from the relationship array
* @param {mindplot.Relationship} rel the relationship to remove
*/
removeRelationship:function (rel) {
$assert(rel, "rel can not be null");
this._relationships.erase(rel);
},
/**
* adds the given topic to the topic array
* @param {mindplot.Topic} topic the topic to add
* @throws will throw an error if topic is null or undefined
* @throws will throw an error if the topic's id is not a number
*/
addTopic:function (topic) {
$assert(topic, "topic can not be null");
$assert(typeof topic.getId() == "number", "id is not a number:" + topic.getId());
this._topics.push(topic);
},
/**
* adds the given relationship to the relationship array
* @param {mindplot.Relationship} rel the relationship to add
* @throws will throw an error if rel is null or undefined
*/
addRelationship:function (rel) {
$assert(rel, "rel can not be null");
this._relationships.push(rel);
},
/**
* @param {Function=} validate a function to validate nodes
* @param {String=} errorMsg an error message to display if the validation fails
* @return {String} returns an array of the selected (and, if applicable, valid) topics' ids
*/
filterTopicsIds:function (validate, errorMsg) {
var result = [];
var topics = this.filterSelectedTopics();
@@ -114,12 +160,19 @@ mindplot.DesignerModel = new Class({
return result;
},
/**
* @return {mindplot.Topic} the first selected topic if one or more are found by the
* filterSelectedTopics function, null otherwise
*/
selectedTopic:function () {
var topics = this.filterSelectedTopics();
return (topics.length > 0) ? topics[0] : null;
},
/**
* @param {String} id the id of the topic to be retrieved
* @return {mindplot.Topic} the topic with the respective id
*/
findTopicById:function (id) {
var result = null;
for (var i = 0; i < this._topics.length; i++) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -84,15 +84,16 @@ mindplot.DragConnector = new Class({
// - Horizontal proximity
// - It's already connected.
var currentConnection = dragTopic.getConnectedToTopic();
var me = this;
topics = topics.sort(function (a, b) {
var aPos = a.getPosition();
var bPos = b.getPosition();
var av = this._isVerticallyAligned(a.getSize(), aPos, sPos);
var bv = this._isVerticallyAligned(b.getSize(), bPos, sPos);
return this._proximityWeight(av, a, sPos, currentConnection) - this._proximityWeight(bv, b, sPos, currentConnection);
var av = me._isVerticallyAligned(a.getSize(), aPos, sPos);
var bv = me._isVerticallyAligned(b.getSize(), bPos, sPos);
return me._proximityWeight(av, a, sPos, currentConnection) - me._proximityWeight(bv, b, sPos, currentConnection);
}.bind(this));
});
return topics;
},

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -31,14 +31,14 @@ mindplot.DragManager = new Class({
var workspace = this._workspace;
var screen = workspace.getScreenManager();
var dragManager = this;
var me = this;
var mouseDownListener = function(event) {
if (workspace.isWorkspaceEventsEnabled()) {
// Disable double drag...
workspace.enableWorkspaceEvents(false);
// Set initial position.
var layoutManager = this._eventDispatcher.getLayoutManager();
var layoutManager = me._eventDispatcher.getLayoutManager();
var dragNode = node.createDragNode(layoutManager);
// Register mouse move listener ...
@@ -52,7 +52,7 @@ mindplot.DragManager = new Class({
// Change cursor.
window.document.body.style.cursor = 'move';
}
}.bind(this);
};
node.addEvent('mousedown', mouseDownListener);
},
@@ -70,18 +70,18 @@ mindplot.DragManager = new Class({
_buildMouseMoveListener : function(workspace, dragNode, dragManager) {
var screen = workspace.getScreenManager();
var me = this;
var result = function(event) {
if (!this._isDragInProcess) {
if (!me._isDragInProcess) {
// Execute Listeners ..
var startDragListener = dragManager._listeners['startdragging'];
startDragListener(event, dragNode);
// Add shadow node to the workspace.
workspace.appendChild(dragNode);
workspace.append(dragNode);
this._isDragInProcess = true;
me._isDragInProcess = true;
}
var pos = screen.getWorkspaceMousePosition(event);
@@ -95,13 +95,14 @@ mindplot.DragManager = new Class({
event.preventDefault();
}.bind(this);
};
dragManager._mouseMoveListener = result;
return result;
},
_buildMouseUpListener : function(workspace, node, dragNode, dragManager) {
var screen = workspace.getScreenManager();
var me = this;
var result = function(event) {
$assert(dragNode.isDragTopic, 'dragNode must be an DragTopic');
@@ -117,7 +118,7 @@ mindplot.DragManager = new Class({
// Change the cursor to the default.
window.document.body.style.cursor = 'default';
if (this._isDragInProcess) {
if (me._isDragInProcess) {
// Execute Listeners only if the node has been moved.
var endDragListener = dragManager._listeners['enddragging'];
@@ -126,11 +127,11 @@ mindplot.DragManager = new Class({
// Remove drag node from the workspace.
dragNode.removeFromWorkspace(workspace);
this._isDragInProcess = false;
me._isDragInProcess = false;
}
}.bind(this);
};
dragManager._mouseUpListener = result;
return result;
},

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -146,27 +146,27 @@ mindplot.DragPivot = new Class({
addToWorkspace : function(workspace) {
var pivotRect = this._getPivotRect();
workspace.appendChild(pivotRect);
workspace.append(pivotRect);
var connectToRect = this._connectRect;
workspace.appendChild(connectToRect);
workspace.append(connectToRect);
// Add a hidden straight line ...
var straighLine = this._straightLine;
straighLine.setVisibility(false);
workspace.appendChild(straighLine);
workspace.append(straighLine);
straighLine.moveToBack();
// Add a hidden curved line ...
var curvedLine = this._curvedLine;
curvedLine.setVisibility(false);
workspace.appendChild(curvedLine);
workspace.append(curvedLine);
curvedLine.moveToBack();
// Add a connect rect ...
var connectRect = this._connectRect;
connectRect.setVisibility(false);
workspace.appendChild(connectRect);
workspace.append(connectRect);
connectRect.moveToBack();
},

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -67,7 +67,7 @@ mindplot.DragTopic = new Class({
},
updateFreeLayout:function (event) {
var isFreeEnabled = (event.meta && Browser.Platform.mac) || (event.control && !Browser.Platform.mac);
var isFreeEnabled = (event.metaKey && Browser.Platform.mac) || (event.ctrlKey && !Browser.Platform.mac);
if (this.isFreeLayoutOn() != isFreeEnabled) {
var dragPivot = this._getDragPivot();
dragPivot.setVisibility(!isFreeEnabled);
@@ -133,7 +133,7 @@ mindplot.DragTopic = new Class({
addToWorkspace:function (workspace) {
if (!this._isInWorkspace) {
workspace.appendChild(this._elem2d);
workspace.append(this._elem2d);
var dragPivot = this._getDragPivot();
dragPivot.addToWorkspace(workspace);
this._isInWorkspace = true;
@@ -201,7 +201,7 @@ mindplot.DragTopic.init = function (workspace) {
$assert(workspace, "workspace can not be null");
var pivot = mindplot.DragTopic.__getDragPivot();
workspace.appendChild(pivot);
workspace.append(pivot);
};
mindplot.DragTopic.__getDragPivot = function () {
@@ -211,5 +211,5 @@ mindplot.DragTopic.__getDragPivot = function () {
mindplot.DragTopic._dragPivot = result;
}
return result;
}
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,20 +17,20 @@
*/
mindplot.EditorProperties = new Class({
initialize:function() {
initialize: function () {
this._zoom = 0;
this._position = 0;
},
setZoom : function(zoom) {
setZoom: function (zoom) {
this._zoom = zoom;
},
getZoom : function() {
getZoom: function () {
return this._zoom;
},
asProperties : function() {
asProperties: function () {
return "zoom=" + this._zoom + "\n";
}
});

View File

@@ -0,0 +1,41 @@
mindplot.Events = new Class({
$events: {},
_removeOn: function (string) {
return string.replace(/^on([A-Z])/, function (full, first) {
return first.toLowerCase();
});
},
addEvent: function (type, fn, internal) {
type = this._removeOn(type);
this.$events[type] = (this.$events[type] || []).include(fn);
if (internal) fn.internal = true;
return this;
},
fireEvent: function (type, args, delay) {
type = this._removeOn(type);
var events = this.$events[type];
if (!events) return this;
args = Array.from(args);
_.each(events, function (fn) {
if (delay) fn.delay(delay, this, args);
else fn.apply(this, args);
}, this);
return this;
},
removeEvent: function (type, fn) {
type = this._removeOn(type);
var events = this.$events[type];
if (events && !fn.internal) {
var index = events.indexOf(fn);
if (index != -1) events.splice(index, 1);
}
return this;
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,38 +17,38 @@
*/
mindplot.Icon = new Class({
initialize:function(url) {
initialize: function (url) {
$assert(url, 'topic can not be null');
this._image = new web2d.Image();
this._image.setHref(url);
this._image.setSize(mindplot.Icon.SIZE, mindplot.Icon.SIZE);
},
getImage : function() {
getImage: function () {
return this._image;
},
setGroup : function(group) {
setGroup: function (group) {
this._group = group;
},
getGroup : function() {
getGroup: function () {
return this._group;
},
getSize : function() {
getSize: function () {
return this._image.getSize();
},
getPosition : function() {
getPosition: function () {
return this._image.getPosition();
},
addEvent : function(type, fnc) {
addEvent: function (type, fnc) {
this._image.addEvent(type, fnc);
},
remove : function() {
remove: function () {
throw "Unsupported operation";
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,13 +16,27 @@
* limitations under the License.
*/
mindplot.IconGroup = new Class({
initialize:function (topicId, iconSize) {
mindplot.IconGroup = new Class(/**@lends IconGroup */{
/**
* @constructs
* @param topicId
* @param iconSize
* @throws will throw an error if topicId is null or undefined
* @throws will throw an error if iconSize is null or undefined
*/
initialize: function (topicId, iconSize) {
$assert($defined(topicId), "topicId can not be null");
$assert($defined(iconSize), "iconSize can not be null");
this._icons = [];
this._group = new web2d.Group({width:0, height:iconSize, x:0, y:0, coordSizeWidth:0, coordSizeHeight:100});
this._group = new web2d.Group({
width: 0,
height: iconSize,
x: 0,
y: 0,
coordSizeWidth: 0,
coordSizeHeight: 100
});
this._removeTip = new mindplot.IconGroup.RemoveTip(this._group, topicId);
this.seIconSize(iconSize, iconSize);
@@ -30,28 +44,38 @@ mindplot.IconGroup = new Class({
},
setPosition:function (x, y) {
/** */
setPosition: function (x, y) {
this._group.setPosition(x, y);
},
getPosition:function () {
/** */
getPosition: function () {
return this._group.getPosition();
},
getNativeElement:function () {
/** */
getNativeElement: function () {
return this._group;
},
getSize:function () {
/** */
getSize: function () {
return this._group.getSize();
},
seIconSize:function (width, height) {
this._iconSize = {width:width, height:height};
/** */
seIconSize: function (width, height) {
this._iconSize = {width: width, height: height};
this._resize(this._icons.length);
},
addIcon:function (icon, remove) {
/**
* @param icon the icon to be added to the icon group
* @param {Boolean} remove
* @throws will throw an error if icon is not defined
*/
addIcon: function (icon, remove) {
$defined(icon, "icon is not defined");
icon.setGroup(this);
@@ -62,7 +86,7 @@ mindplot.IconGroup = new Class({
this._positionIcon(icon, this._icons.length - 1);
var imageShape = icon.getImage();
this._group.appendChild(imageShape);
this._group.append(imageShape);
// Register event for the group ..
if (remove) {
@@ -70,9 +94,9 @@ mindplot.IconGroup = new Class({
}
},
_findIconFromModel:function (iconModel) {
_findIconFromModel: function (iconModel) {
var result = null;
this._icons.each(function (icon) {
_.each(this._icons, function (icon) {
var elModel = icon.getModel();
if (elModel.getId() == iconModel.getId()) {
result = icon;
@@ -86,14 +110,15 @@ mindplot.IconGroup = new Class({
return result;
},
removeIconByModel:function (featureModel) {
/** */
removeIconByModel: function (featureModel) {
$assert(featureModel, "featureModel can not be null");
var icon = this._findIconFromModel(featureModel);
this._removeIcon(icon);
},
_removeIcon:function (icon) {
_removeIcon: function (icon) {
$assert(icon, "icon can not be null");
this._removeTip.close(0);
@@ -101,18 +126,19 @@ mindplot.IconGroup = new Class({
this._icons.erase(icon);
this._resize(this._icons.length);
var me = this;
// Add all again ...
this._icons.each(function (elem, i) {
this._positionIcon(elem, i);
}.bind(this));
_.each(this._icons, function (elem, i) {
me._positionIcon(elem, i);
});
},
moveToFront:function () {
/** */
moveToFront: function () {
this._group.moveToFront();
},
_registerListeners:function () {
_registerListeners: function () {
this._group.addEvent('click', function (event) {
// Avoid node creation ...
event.stopPropagation();
@@ -125,29 +151,45 @@ mindplot.IconGroup = new Class({
});
},
_resize:function (iconsLength) {
_resize: function (iconsLength) {
this._group.setSize(iconsLength * this._iconSize.width, this._iconSize.height);
var iconSize = mindplot.Icon.SIZE + (mindplot.IconGroup.ICON_PADDING * 2);
this._group.setCoordSize(iconsLength * iconSize, iconSize);
},
_positionIcon:function (icon, order) {
_positionIcon: function (icon, order) {
var iconSize = mindplot.Icon.SIZE + (mindplot.IconGroup.ICON_PADDING * 2);
icon.getImage().setPosition(iconSize * order + mindplot.IconGroup.ICON_PADDING, mindplot.IconGroup.ICON_PADDING);
}
});
/**
* @constant
* @type {Number}
* @default
*/
mindplot.IconGroup.ICON_PADDING = 5;
mindplot.IconGroup.RemoveTip = new Class({
initialize:function (container) {
mindplot.IconGroup.RemoveTip = new Class(/** @lends IconGroup.RemoveTip */{
/**
* @classdesc inner class of IconGroup
* @constructs
* @param container
*/
initialize: function (container) {
$assert(container, "group can not be null");
this._fadeElem = container;
},
show:function (topicId, icon) {
/**
* @param topicId
* @param icon
* @throws will throw an error if icon is null or undefined
*/
show: function (topicId, icon) {
$assert(icon, 'icon can not be null');
// Nothing to do ...
@@ -166,16 +208,18 @@ mindplot.IconGroup.RemoveTip = new Class({
icon.remove();
});
var me = this;
widget.addEvent('mouseover', function () {
this.show(topicId, icon);
}.bind(this));
me.show(topicId, icon);
});
widget.addEvent('mouseout', function () {
this.hide();
}.bind(this));
me.hide();
});
widget.setPosition(pos.x + 80, pos.y - 50);
this._fadeElem.appendChild(widget);
this._fadeElem.append(widget);
// Setup current element ...
this._activeIcon = icon;
@@ -186,28 +230,30 @@ mindplot.IconGroup.RemoveTip = new Class({
}
},
hide:function () {
/** */
hide: function () {
this.close(200);
},
close:function (delay) {
/**
* @param delay
*/
close: function (delay) {
// This is not ok, trying to close the same dialog twice ?
if (this._closeTimeoutId) {
clearTimeout(this._closeTimeoutId)
}
var me = this;
if (this._activeIcon) {
var widget = this._widget;
var close = function () {
this._activeIcon = null;
this._fadeElem.removeChild(widget);
this._widget = null;
this._closeTimeoutId = null;
}.bind(this);
me._activeIcon = null;
me._fadeElem.removeChild(widget);
me._widget = null;
me._closeTimeoutId = null;
};
if (!$defined(delay) || delay == 0) {
close();
@@ -218,46 +264,46 @@ mindplot.IconGroup.RemoveTip = new Class({
}
},
_buildWeb2d:function () {
_buildWeb2d: function () {
var result = new web2d.Group({
width:10,
height:10,
x:0,
y:0,
coordSizeWidth:10,
coordSizeHeight:10
width: 10,
height: 10,
x: 0,
y: 0,
coordSizeWidth: 10,
coordSizeHeight: 10
});
var outerRect = new web2d.Rect(0, {
x:0,
y:0,
width:10,
height:10,
stroke:'0',
fillColor:'black'
x: 0,
y: 0,
width: 10,
height: 10,
stroke: '0',
fillColor: 'black'
});
result.appendChild(outerRect);
result.append(outerRect);
outerRect.setCursor('pointer');
var innerRect = new web2d.Rect(0, {
x:1,
y:1,
width:8,
height:8,
stroke:'1 solid white',
fillColor:'gray'
x: 1,
y: 1,
width: 8,
height: 8,
stroke: '1 solid white',
fillColor: 'gray'
});
result.appendChild(innerRect);
result.append(innerRect);
var line = new web2d.Line({stroke:'1 solid white'});
var line = new web2d.Line({stroke: '1 solid white'});
line.setFrom(1, 1);
line.setTo(9, 9);
result.appendChild(line);
result.append(line);
var line2 = new web2d.Line({stroke:'1 solid white'});
var line2 = new web2d.Line({stroke: '1 solid white'});
line2.setFrom(1, 9);
line2.setTo(9, 1);
result.appendChild(line2);
result.append(line2);
// Some events ...
result.addEvent('mouseover', function () {
@@ -271,16 +317,22 @@ mindplot.IconGroup.RemoveTip = new Class({
return result;
},
decorate:function (topicId, icon) {
/**
* @param topicId
* @param icon
*/
decorate: function (topicId, icon) {
var me = this;
if (!icon.__remove) {
icon.addEvent('mouseover', function () {
this.show(topicId, icon);
}.bind(this));
me.show(topicId, icon);
});
icon.addEvent('mouseout', function () {
this.hide();
}.bind(this));
me.hide();
});
icon.__remove = true;
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,8 +17,8 @@
*/
mindplot.ImageIcon = new Class({
Extends:mindplot.Icon,
initialize:function (topic, iconModel, readOnly) {
Extends: mindplot.Icon,
initialize: function (topic, iconModel, readOnly) {
$assert(iconModel, 'iconModel can not be null');
$assert(topic, 'topic can not be null');
@@ -34,29 +34,30 @@ mindplot.ImageIcon = new Class({
//Icon
var image = this.getImage();
var me = this;
image.addEvent('click', function () {
var iconType = iconModel.getIconType();
var newIconType = this._getNextFamilyIconId(iconType);
var newIconType = me._getNextFamilyIconId(iconType);
iconModel.setIconType(newIconType);
var imgUrl = this._getImageUrl(newIconType);
this._image.setHref(imgUrl);
var imgUrl = me._getImageUrl(newIconType);
me._image.setHref(imgUrl);
}.bind(this));
});
this._image.setCursor('pointer');
}
},
_getImageUrl:function (iconId) {
_getImageUrl: function (iconId) {
return "icons/" + iconId + ".png";
},
getModel:function () {
getModel: function () {
return this._featureModel;
},
_getNextFamilyIconId:function (iconId) {
_getNextFamilyIconId: function (iconId) {
var familyIcons = this._getFamilyIcons(iconId);
$assert(familyIcons != null, "Family Icon not found!");
@@ -77,7 +78,7 @@ mindplot.ImageIcon = new Class({
return result;
},
_getFamilyIcons:function (iconId) {
_getFamilyIcons: function (iconId) {
$assert(iconId != null, "id must not be null");
$assert(iconId.indexOf("_") != -1, "Invalid icon id (it must contain '_')");
@@ -94,7 +95,7 @@ mindplot.ImageIcon = new Class({
return result;
},
remove:function () {
remove: function () {
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
var featureId = this._featureModel.getId();
var topicId = this._topicId;
@@ -103,30 +104,60 @@ mindplot.ImageIcon = new Class({
});
mindplot.ImageIcon.prototype.ICON_FAMILIES = [
{"id":"face", "icons":["face_plain", "face_sad", "face_crying", "face_smile", "face_surprise", "face_wink"]},
{"id":"funy", "icons":["funy_angel", "funy_devilish", "funy_glasses", "funy_grin", "funy_kiss", "funy_monkey"]},
{"id":"conn", "icons":["conn_connect", "conn_disconnect"]},
{"id":"sport", "icons":["sport_basketball", "sport_football", "sport_golf", "sport_raquet", "sport_shuttlecock", "sport_soccer", "sport_tennis"]},
{"id":"bulb", "icons":["bulb_light_on", "bulb_light_off"]},
{"id":"thumb", "icons":["thumb_thumb_up", "thumb_thumb_down"]},
{"id":"tick", "icons":["tick_tick", "tick_cross"]},
{"id":"onoff", "icons":["onoff_clock", "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", "onoff_status_online"]},
{"id":"money", "icons":["money_money", "money_dollar", "money_euro", "money_pound", "money_yen", "money_coins", "money_ruby"]},
{"id":"time", "icons":["time_calendar", "time_clock", "time_hourglass"]},
{"id":"number", "icons":["number_1", "number_2", "number_3", "number_4", "number_5", "number_6", "number_7", "number_8", "number_9"]},
{"id":"chart", "icons":["chart_bar", "chart_line", "chart_curve", "chart_pie", "chart_organisation"]},
{"id":"sign", "icons":["sign_warning", "sign_info", "sign_stop", "sign_help", "sign_cancel"]},
{"id":"hard", "icons":["hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", "hard_keyboard", "hard_mouse", "hard_printer"]},
{"id":"soft", "icons":["soft_bug", "soft_cursor", "soft_database_table", "soft_database", "soft_feed", "soft_folder_explore", "soft_rss", "soft_penguin"]},
{"id":"arrow", "icons":["arrow_up", "arrow_down", "arrow_left", "arrow_right"]},
{"id":"arrowc", "icons":["arrowc_rotate_anticlockwise", "arrowc_rotate_clockwise", "arrowc_turn_left", "arrowc_turn_right"]},
{"id":"people", "icons":["people_group", "people_male1", "people_male2", "people_female1", "people_female2"]},
{"id":"mail", "icons":["mail_envelop", "mail_mailbox", "mail_edit", "mail_list"]},
{"id":"flag", "icons":["flag_blue", "flag_green", "flag_orange", "flag_pink", "flag_purple", "flag_yellow"]},
{"id":"bullet", "icons":["bullet_black", "bullet_blue", "bullet_green", "bullet_orange", "bullet_red", "bullet_pink", "bullet_purple"]},
{"id":"tag", "icons":["tag_blue", "tag_green", "tag_orange", "tag_red", "tag_pink", "tag_yellow"]},
{"id":"object", "icons":["object_bell", "object_clanbomber", "object_key", "object_pencil", "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", "object_wizard", "object_house", "object_cake", "object_camera", "object_palette", "object_rainbow"]},
{"id":"weather", "icons":["weather_clear-night", "weather_clear", "weather_few-clouds-night", "weather_few-clouds", "weather_overcast", "weather_severe-alert", "weather_showers-scattered", "weather_showers", "weather_snow", "weather_storm"]},
{"id":"task", "icons":["task_0", "task_25", "task_50", "task_75", "task_100"]}
{"id": "face", "icons": ["face_plain", "face_sad", "face_crying", "face_smile", "face_surprise", "face_wink"]},
{"id": "funy", "icons": ["funy_angel", "funy_devilish", "funy_glasses", "funy_grin", "funy_kiss", "funy_monkey"]},
{"id": "conn", "icons": ["conn_connect", "conn_disconnect"]},
{
"id": "sport",
"icons": ["sport_basketball", "sport_football", "sport_golf", "sport_raquet", "sport_shuttlecock", "sport_soccer", "sport_tennis"]
},
{"id": "bulb", "icons": ["bulb_light_on", "bulb_light_off"]},
{"id": "thumb", "icons": ["thumb_thumb_up", "thumb_thumb_down"]},
{"id": "tick", "icons": ["tick_tick", "tick_cross"]},
{
"id": "onoff",
"icons": ["onoff_clock", "onoff_clock_red", "onoff_add", "onoff_delete", "onoff_status_offline", "onoff_status_online"]
},
{
"id": "money",
"icons": ["money_money", "money_dollar", "money_euro", "money_pound", "money_yen", "money_coins", "money_ruby"]
},
{"id": "time", "icons": ["time_calendar", "time_clock", "time_hourglass"]},
{
"id": "number",
"icons": ["number_1", "number_2", "number_3", "number_4", "number_5", "number_6", "number_7", "number_8", "number_9"]
},
{"id": "chart", "icons": ["chart_bar", "chart_line", "chart_curve", "chart_pie", "chart_organisation"]},
{"id": "sign", "icons": ["sign_warning", "sign_info", "sign_stop", "sign_help", "sign_cancel"]},
{
"id": "hard",
"icons": ["hard_cd", "hard_computer", "hard_controller", "hard_driver_disk", "hard_ipod", "hard_keyboard", "hard_mouse", "hard_printer"]
},
{
"id": "soft",
"icons": ["soft_bug", "soft_cursor", "soft_database_table", "soft_database", "soft_feed", "soft_folder_explore", "soft_rss", "soft_penguin"]
},
{"id": "arrow", "icons": ["arrow_up", "arrow_down", "arrow_left", "arrow_right"]},
{
"id": "arrowc",
"icons": ["arrowc_rotate_anticlockwise", "arrowc_rotate_clockwise", "arrowc_turn_left", "arrowc_turn_right"]
},
{"id": "people", "icons": ["people_group", "people_male1", "people_male2", "people_female1", "people_female2"]},
{"id": "mail", "icons": ["mail_envelop", "mail_mailbox", "mail_edit", "mail_list"]},
{"id": "flag", "icons": ["flag_blue", "flag_green", "flag_orange", "flag_pink", "flag_purple", "flag_yellow"]},
{
"id": "bullet",
"icons": ["bullet_black", "bullet_blue", "bullet_green", "bullet_orange", "bullet_red", "bullet_pink", "bullet_purple"]
},
{"id": "tag", "icons": ["tag_blue", "tag_green", "tag_orange", "tag_red", "tag_pink", "tag_yellow"]},
{
"id": "object",
"icons": ["object_bell", "object_clanbomber", "object_key", "object_pencil", "object_phone", "object_magnifier", "object_clip", "object_music", "object_star", "object_wizard", "object_house", "object_cake", "object_camera", "object_palette", "object_rainbow"]
},
{
"id": "weather",
"icons": ["weather_clear-night", "weather_clear", "weather_few-clouds-night", "weather_few-clouds", "weather_overcast", "weather_severe-alert", "weather_showers-scattered", "weather_showers", "weather_snow", "weather_storm"]
},
{"id": "task", "icons": ["task_0", "task_25", "task_50", "task_75", "task_100"]}
];

View File

@@ -0,0 +1,33 @@
/*
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
mindplot.Keyboard = new Class({
initialize: function () {
},
addShortcut: function (shortcuts, callback) {
if (!$.isArray(shortcuts)) {
shortcuts = [shortcuts];
}
_.each(shortcuts, function (shortcut) {
$(document).bind('keydown', shortcut, callback);
});
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -18,8 +18,8 @@
mindplot.LinkIcon = new Class({
Extends:mindplot.Icon,
initialize:function (topic, linkModel, readOnly) {
Extends: mindplot.Icon,
initialize: function (topic, linkModel, readOnly) {
$assert(topic, 'topic can not be null');
$assert(linkModel, 'linkModel can not be null');
@@ -31,21 +31,35 @@ mindplot.LinkIcon = new Class({
this._registerEvents();
},
_registerEvents:function () {
_registerEvents: function () {
this._image.setCursor('pointer');
this._tip = new mindplot.widget.LinkIconTooltip(this);
var me = this;
if (!this._readOnly) {
// Add on click event to open the editor ...
this.addEvent('click', function (event) {
this._topic.showLinkEditor();
me._tip.hide();
me._topic.showLinkEditor();
event.stopPropagation();
}.bind(this));
});
//FIXME: we shouldn't have timeout of that..
this.addEvent("mouseleave", function (event) {
window.setTimeout(function () {
if (!$("#linkPopover:hover").length) {
me._tip.hide();
}
event.stopPropagation();
}, 100)
});
}
this._tip = new mindplot.widget.LinkIconTooltip(this);
$(this.getImage()._peer._native).mouseenter(function () {
me._tip.show();
})
},
getModel:function () {
getModel: function () {
return this._linksModel;
}
});

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,46 +17,44 @@
*/
mindplot.LocalStorageManager = new Class({
Extends:mindplot.PersistenceManager,
initialize:function (documentUrl,forceLoad) {
Extends: mindplot.PersistenceManager,
initialize: function (documentUrl, forceLoad) {
this.parent();
this.documentUrl = documentUrl;
this.forceLoad = forceLoad;
},
saveMapXml:function (mapId, mapXml, pref, saveHistory, events) {
saveMapXml: function (mapId, mapXml, pref, saveHistory, events) {
localStorage.setItem(mapId + "-xml", mapXml);
},
discardChanges:function (mapId) {
discardChanges: function (mapId) {
localStorage.removeItem(mapId + "-xml");
},
loadMapDom:function (mapId) {
loadMapDom: function (mapId) {
var xml = localStorage.getItem(mapId + "-xml");
if (xml == null || this.forceLoad) {
var xmlRequest = new Request({
url:this.documentUrl.replace("{id}", mapId),
headers:{"Content-Type":"text/plain","Accept":"application/xml"},
method:'get',
async:false,
onSuccess:function (responseText) {
xml = responseText;
$.ajax({
url: this.documentUrl.replace("{id}", mapId),
headers: {"Content-Type": "text/plain", "Accept": "application/xml"},
type: 'get',
dataType: "text",
async: false,
success: function (response) {
xml = response;
}
});
xmlRequest.send();
// If I could not load it from a file, hard code one.
if (xml == null) {
throw new Error("Map could not be loaded");
}
}
var parser = new DOMParser();
return parser.parseFromString(xml, "text/xml");
return jQuery.parseXML(xml);
},
unlockMap:function (mindmap) {
unlockMap: function (mindmap) {
// Ignore, no implementation required ...
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,15 +16,21 @@
* limitations under the License.
*/
mindplot.MainTopic = new Class({
Extends:mindplot.Topic,
initialize:function (model, options) {
mindplot.MainTopic = new Class(/** @lends MainTopic */{
Extends: mindplot.Topic,
/**
* @extends mindplot.Topic
* @constructs
* @param model
* @param options
*/
initialize: function (model, options) {
this.parent(model, options);
},
INNER_RECT_ATTRIBUTES:{stroke:'0.5 solid #009900'},
INNER_RECT_ATTRIBUTES: {stroke: '0.5 solid #009900'},
_buildDragShape:function () {
_buildDragShape: function () {
var innerShape = this._buildShape(this.INNER_RECT_ATTRIBUTES, this.getShapeType());
var size = this.getSize();
innerShape.setSize(size.width, size.height);
@@ -40,9 +46,9 @@ mindplot.MainTopic = new Class({
innerShape.setAttribute("fillColor", bgColor);
// Create group ...
var groupAttributes = {width:100, height:100, coordSizeWidth:100, coordSizeHeight:100};
var groupAttributes = {width: 100, height: 100, coordSizeWidth: 100, coordSizeHeight: 100};
var group = new web2d.Group(groupAttributes);
group.appendChild(innerShape);
group.append(innerShape);
// Add Text ...
if (this.getShapeType() != mindplot.model.TopicShape.IMAGE) {
@@ -50,12 +56,13 @@ mindplot.MainTopic = new Class({
var text = this.getText();
textShape.setText(text);
textShape.setOpacity(0.5);
group.appendChild(textShape);
group.append(textShape);
}
return group;
},
updateTopicShape:function (targetTopic, workspace) {
/** */
updateTopicShape: function (targetTopic, workspace) {
// Change figure based on the connected topic ...
var model = this.getModel();
var shapeType = model.getShapeType();
@@ -68,7 +75,8 @@ mindplot.MainTopic = new Class({
}
},
disconnect:function (workspace) {
/** */
disconnect: function (workspace) {
this.parent(workspace);
var size = this.getSize();
@@ -83,7 +91,7 @@ mindplot.MainTopic = new Class({
innerShape.setVisibility(true);
},
_updatePositionOnChangeSize:function (oldSize, newSize) {
_updatePositionOnChangeSize: function (oldSize, newSize) {
var xOffset = Math.round((newSize.width - oldSize.width) / 2);
var pos = this.getPosition();
@@ -97,11 +105,13 @@ mindplot.MainTopic = new Class({
}
},
workoutIncomingConnectionPoint:function (sourcePosition) {
/** */
workoutIncomingConnectionPoint: function (sourcePosition) {
return mindplot.util.Shape.workoutIncomingConnectionPoint(this, sourcePosition);
},
workoutOutgoingConnectionPoint:function (targetPosition) {
/** */
workoutOutgoingConnectionPoint: function (targetPosition) {
$assert(targetPosition, 'targetPoint can not be null');
var pos = this.getPosition();
var isAtRight = mindplot.util.Shape.isAtRight(targetPosition, pos);

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,8 +17,8 @@
*/
mindplot.Messages = new Class({
Static:{
init:function (locale) {
Static: {
init: function (locale) {
locale = $defined(locale) ? locale : 'en';
var bundle = mindplot.Messages.BUNDLES[locale];
if (bundle == null && locale.indexOf("_") != -1) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,55 +17,50 @@
*/
mindplot.MultilineTextEditor = new Class({
Extends:Events,
initialize:function () {
Extends: mindplot.Events,
initialize: function () {
this._topic = null;
this._timeoutId = -1;
},
_buildEditor:function () {
_buildEditor: function () {
var result = new Element('div');
result.setStyles({
position:"absolute",
display:"none",
zIndex:"8",
overflow:"hidden",
border:"0 none"
}
);
var result = $('<div></div>')
.attr('id', 'textContainer')
.css({
display: "none",
zIndex: "8",
overflow: "hidden",
border: "0 none"
});
var textareaElem = new Element('textarea',
{ tabindex:'-1',
value:"",
wrap:'off'
}
);
textareaElem.setStyles({
border:"1px gray dashed",
background:"rgba(98, 135, 167, .3)",
outline:'0 none',
resize:'none',
overflow:"hidden"
});
textareaElem.inject(result);
var textareaElem = $('<textarea tabindex="-1" value="" wrap="off" ></textarea>')
.css({
border: "1px gray dashed",
background: "rgba(98, 135, 167, .3)",
outline: '0 none',
resize: 'none',
overflow: "hidden"
});
result.append(textareaElem);
return result;
},
_registerEvents:function (containerElem) {
_registerEvents: function (containerElem) {
var textareaElem = this._getTextareaElem();
textareaElem.addEvent('keydown', function (event) {
switch (event.key) {
var me = this;
textareaElem.on('keydown', function (event) {
switch (jQuery.hotkeys.specialKeys[event.keyCode]) {
case 'esc':
this.close(false);
me.close(false);
break;
case 'enter':
if (event.meta || event.control) {
if (event.metaKey || event.ctrlKey) {
// Add return ...
var text = textareaElem.value;
var text = textareaElem.val();
var cursorPosition = text.length;
if (textareaElem.selectionStart) {
cursorPosition = textareaElem.selectionStart;
@@ -76,12 +71,12 @@ mindplot.MultilineTextEditor = new Class({
if (cursorPosition < text.length) {
tail = text.substring(cursorPosition, text.length);
}
textareaElem.value = head + "\n" + tail;
textareaElem.val(head + "\n" + tail);
// Position cursor ...
if (textareaElem.setSelectionRange) {
if (textareaElem[0].setSelectionRange) {
textareaElem.focus();
textareaElem.setSelectionRange(cursorPosition + 1, cursorPosition + 1);
textareaElem[0].setSelectionRange(cursorPosition + 1, cursorPosition + 1);
} else if (textareaElem.createTextRange) {
var range = textareaElem.createTextRange();
range.moveStart('character', cursorPosition + 1);
@@ -90,62 +85,73 @@ mindplot.MultilineTextEditor = new Class({
}
else {
this.close(true);
me.close(true);
}
break;
case 'tab':
event.preventDefault();
var start = $(this).get(0).selectionStart;
var end = $(this).get(0).selectionEnd;
// set textarea value to: text before caret + tab + text after caret
$(this).val($(this).val().substring(0, start) + "\t" + $(this).val().substring(end));
// put caret at right position again
$(this).get(0).selectionStart = $(this).get(0).selectionEnd = start + 1;
break;
}
event.stopPropagation();
}.bind(this));
});
textareaElem.addEvent('keypress', function (event) {
textareaElem.on('keypress', function (event) {
event.stopPropagation();
});
textareaElem.addEvent('keyup', function (event) {
var text = this._getTextareaElem().value;
this.fireEvent('input', [event, text]);
this._adjustEditorSize();
}.bind(this));
textareaElem.on('keyup', function (event) {
var text = me._getTextareaElem().val();
me.fireEvent('input', [event, text]);
me._adjustEditorSize();
});
// If the user clicks on the input, all event must be ignored ...
containerElem.addEvent('click', function (event) {
containerElem.on('click', function (event) {
event.stopPropagation();
});
containerElem.addEvent('dblclick', function (event) {
containerElem.on('dblclick', function (event) {
event.stopPropagation();
});
containerElem.addEvent('mousedown', function (event) {
containerElem.on('mousedown', function (event) {
event.stopPropagation();
});
},
_adjustEditorSize:function () {
_adjustEditorSize: function () {
if (this.isVisible()) {
var textElem = this._getTextareaElem();
var lines = textElem.value.split('\n');
var lines = textElem.val().split('\n');
var maxLineLength = 1;
lines.each(function (line) {
_.each(lines, function (line) {
if (maxLineLength < line.length)
maxLineLength = line.length;
});
textElem.setAttribute('cols', maxLineLength);
textElem.setAttribute('rows', lines.length);
textElem.attr('cols', maxLineLength);
textElem.attr('rows', lines.length);
this._containerElem.setStyles({
width:(maxLineLength + 3) + 'em',
height:textElem.getSize().height
this._containerElem.css({
width: (maxLineLength + 3) + 'em',
height: textElem.height()
});
}
},
isVisible:function () {
return $defined(this._containerElem) && this._containerElem.getStyle('display') == 'block';
isVisible: function () {
return $defined(this._containerElem) && this._containerElem.css('display') == 'block';
},
_updateModel:function () {
_updateModel: function () {
if (this._topic.getText() != this._getText()) {
var text = this._getText();
@@ -156,7 +162,7 @@ mindplot.MultilineTextEditor = new Class({
}
},
show:function (topic, text) {
show: function (topic, text) {
// Close a previous node editor if it's opened ...
if (this._topic) {
this.close(false);
@@ -166,7 +172,7 @@ mindplot.MultilineTextEditor = new Class({
if (!this.isVisible()) {
//Create editor ui
var containerElem = this._buildEditor();
containerElem.inject($(document.body));
$('body').append(containerElem);
this._containerElem = containerElem;
this._registerEvents(containerElem);
@@ -174,7 +180,7 @@ mindplot.MultilineTextEditor = new Class({
}
},
_showEditor:function (defaultText) {
_showEditor: function (defaultText) {
var topic = this._topic;
@@ -187,31 +193,32 @@ mindplot.MultilineTextEditor = new Class({
font.size = nodeText.getHtmlFontSize();
font.color = nodeText.getColor();
this._setStyle(font);
var me = this;
// Set editor's initial size
var displayFunc = function () {
// Position the editor and set the size...
var textShape = topic.getTextShape();
textShape.positionRelativeTo(this._containerElem, {
position:{x:'left', y:'top'},
edge:{x:'left', y:'top'}
});
this._containerElem.setStyle('display', 'block');
me._containerElem.css('display', 'block');
//FIXME: Im not sure if this is best way...
var shapePosition = textShape.getNativePosition();
me._containerElem.offset(shapePosition);
// Set editor's initial text ...
var text = $defined(defaultText) ? defaultText : topic.getText();
this._setText(text);
me._setText(text);
// Set the element focus and select the current text ...
var inputElem = this._getTextareaElem();
this._positionCursor(inputElem, !$defined(defaultText));
var inputElem = me._getTextareaElem();
me._positionCursor(inputElem, !$defined(defaultText));
}.bind(this);
};
this._timeoutId = displayFunc.delay(10);
},
_setStyle:function (fontStyle) {
_setStyle: function (fontStyle) {
var inputField = this._getTextareaElem();
if (!$defined(fontStyle.font)) {
fontStyle.font = "Arial";
@@ -226,56 +233,64 @@ mindplot.MultilineTextEditor = new Class({
fontStyle.size = 12;
}
var style = {
fontSize:fontStyle.size + "px",
fontFamily:fontStyle.font,
fontStyle:fontStyle.style,
fontWeight:fontStyle.weight,
color:fontStyle.color
fontSize: fontStyle.size + "px",
fontFamily: fontStyle.font,
fontStyle: fontStyle.style,
fontWeight: fontStyle.weight,
color: fontStyle.color
};
inputField.setStyles(style);
this._containerElem.setStyles(style);
inputField.css(style);
this._containerElem.css(style);
},
_setText:function (text) {
_setText: function (text) {
var textareaElem = this._getTextareaElem();
textareaElem.value = text;
textareaElem.val(text);
this._adjustEditorSize();
},
_getText:function () {
return this._getTextareaElem().value;
_getText: function () {
return this._getTextareaElem().val();
},
_getTextareaElem:function () {
return this._containerElem.getElement('textarea');
_getTextareaElem: function () {
return this._containerElem.find('textarea');
},
_positionCursor:function (textareaElem, selectText) {
_positionCursor: function (textareaElem, selectText) {
textareaElem.focus();
var lengh = textareaElem.val().length;
if (selectText) {
// Mark text as selected ...
if (textareaElem.createTextRange) {
var rang = textareaElem.createTextRange();
rang.select();
rang.move("character", textareaElem.value.length);
rang.move("character", lengh);
}
else {
textareaElem.setSelectionRange(0, textareaElem.value.length);
textareaElem[0].setSelectionRange(0, lengh);
}
} else {
// Move the cursor to the last character ..
if (textareaElem.createTextRange) {
var range = textareaElem.createTextRange();
range.move("character", textareaElem.value.length);
range.move("character", lengh);
} else {
textareaElem.selectionStart = textareaElem.value.length;
if (Browser.ie11) {
textareaElem[0].selectionStart = lengh;
textareaElem[0].selectionEnd = lengh;
} else {
textareaElem.selectionStart = lengh;
textareaElem.selectionEnd = lengh;
}
textareaElem.focus();
}
}
},
close:function (update) {
close: function (update) {
if (this.isVisible() && this._topic) {
// Update changes ...
clearTimeout(this._timeoutId);
@@ -288,7 +303,7 @@ mindplot.MultilineTextEditor = new Class({
this._topic.getTextShape().setVisibility(true);
// Remove it form the screen ...
this._containerElem.dispose();
this._containerElem.remove();
this._containerElem = null;
this._timeoutId = -1;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -16,92 +16,124 @@
* limitations under the License.
*/
mindplot.NodeGraph = new Class({
initialize:function(nodeModel, options) {
mindplot.NodeGraph = new Class(/** @lends NodeGraph */{
/**
* @constructs
* @param {mindplot.model.NodeModel} nodeModel
* @param {Object<Number, String, Boolean>} options
* @throws will throw an error if nodeModel is null or undefined
*/
initialize: function (nodeModel, options) {
$assert(nodeModel, "model can not be null");
this._options = options;
this._mouseEvents = true;
this.setModel(nodeModel);
this._onFocus = false;
this._event = new Events();
this._size = {width:50,height:20};
this._size = {width: 50, height: 20};
},
isReadOnly : function(){
/** @return true if option is set to read-only */
isReadOnly: function () {
return this._options.readOnly;
},
getType : function() {
/** @return model type */
getType: function () {
var model = this.getModel();
return model.getType();
},
setId : function(id) {
/**
* @param {String} id
* @throws will throw an error if the topic id is not a number
*/
setId: function (id) {
$assert(typeof topic.getId() == "number", "id is not a number:" + id);
this.getModel().setId(id);
},
_set2DElement : function(elem2d) {
_set2DElement: function (elem2d) {
this._elem2d = elem2d;
},
get2DElement : function() {
/**
* @return 2D element
* @throws will throw an error if the element is null or undefined within node graph
*/
get2DElement: function () {
$assert(this._elem2d, 'NodeGraph has not been initialized properly');
return this._elem2d;
},
setPosition : function(point, fireEvent) {
/** @abstract */
setPosition: function (point, fireEvent) {
throw "Unsupported operation";
},
addEvent : function(type, listener) {
/** */
addEvent: function (type, listener) {
var elem = this.get2DElement();
elem.addEvent(type, listener);
},
removeEvent : function(type, listener) {
/** */
removeEvent: function (type, listener) {
var elem = this.get2DElement();
elem.removeEvent(type, listener);
},
fireEvent: function(type, event) {
/** */
fireEvent: function (type, event) {
var elem = this.get2DElement();
elem.fireEvent(type, event);
elem.trigger(type, event);
},
setMouseEventsEnabled : function(isEnabled) {
/** */
setMouseEventsEnabled: function (isEnabled) {
this._mouseEvents = isEnabled;
},
isMouseEventsEnabled : function() {
/** */
isMouseEventsEnabled: function () {
return this._mouseEvents;
},
getSize : function() {
/** @return {Object<Number>} size*/
getSize: function () {
return this._size;
},
setSize : function(size) {
/** @param {Object<Number>} size*/
setSize: function (size) {
this._size.width = parseInt(size.width);
this._size.height = parseInt(size.height);
},
getModel:function() {
/**
* @return {mindplot.model.NodeModel} the node model
*/
getModel: function () {
$assert(this._model, 'Model has not been initialized yet');
return this._model;
return this._model;
},
setModel : function(model) {
/**
* @param {mindplot.NodeModel} model the node model
* @throws will throw an error if model is null or undefined
*/
setModel: function (model) {
$assert(model, 'Model can not be null');
this._model = model;
},
getId : function() {
/** */
getId: function () {
return this._model.getId();
},
setOnFocus : function(focus) {
/** */
setOnFocus: function (focus) {
if (this._onFocus != focus) {
this._onFocus = focus;
@@ -120,36 +152,51 @@ mindplot.NodeGraph = new Class({
this.closeEditors();
// Fire event ...
this.fireEvent(focus ? 'ontfocus' : 'ontblur',this);
this.fireEvent(focus ? 'ontfocus' : 'ontblur', this);
}
},
isOnFocus : function() {
/** @return {Boolean} true if the node graph is on focus */
isOnFocus: function () {
return this._onFocus;
},
dispose : function(workspace) {
/** */
dispose: function (workspace) {
this.setOnFocus(false);
workspace.removeChild(this);
},
createDragNode : function(layoutManager) {
/** */
createDragNode: function (layoutManager) {
var dragShape = this._buildDragShape();
return new mindplot.DragTopic(dragShape, this, layoutManager);
return new mindplot.DragTopic(dragShape, this, layoutManager);
},
_buildDragShape : function() {
_buildDragShape: function () {
$assert(false, '_buildDragShape must be implemented by all nodes.');
},
getPosition : function() {
/** */
getPosition: function () {
var model = this.getModel();
return model.getPosition();
}
});
mindplot.NodeGraph.create = function(nodeModel, options) {
/**
* creates a new topic from the given node model
* @memberof mindplot.Nodegraph
* @param {mindplot.model.NodeModel} nodeModel
* @param {Object} options
* @throws will throw an error if nodeModel is null or undefined
* @throws will throw an error if the nodeModel's type is null or undefined
* @throws will throw an error if the node type cannot be recognized as either central or main
* topic type
* @return {mindplot.CentralTopic|mindplot.MainTopic} the new topic
*/
mindplot.NodeGraph.create = function (nodeModel, options) {
$assert(nodeModel, 'Model can not be null');
var type = nodeModel.getType();
@@ -158,8 +205,7 @@ mindplot.NodeGraph.create = function(nodeModel, options) {
var result;
if (type == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) {
result = new mindplot.CentralTopic(nodeModel, options);
} else
if (type == mindplot.model.INodeModel.MAIN_TOPIC_TYPE) {
} else if (type == mindplot.model.INodeModel.MAIN_TOPIC_TYPE) {
result = new mindplot.MainTopic(nodeModel, options);
} else {
$assert(false, "unsupported node type:" + type);

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2012] [wisemapping]
* Copyright [2015] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
@@ -17,8 +17,8 @@
*/
mindplot.NoteIcon = new Class({
Extends:mindplot.Icon,
initialize:function (topic, noteModel, readOnly) {
Extends: mindplot.Icon,
initialize: function (topic, noteModel, readOnly) {
$assert(topic, 'topic can not be null');
this.parent(mindplot.NoteIcon.IMAGE_URL);
@@ -29,55 +29,50 @@ mindplot.NoteIcon = new Class({
this._registerEvents();
},
_registerEvents:function () {
_registerEvents: function () {
this._image.setCursor('pointer');
var me = this;
if (!this._readOnly) {
// Add on click event to open the editor ...
this.addEvent('click', function (event) {
this._topic.showNoteEditor();
me._topic.showNoteEditor();
event.stopPropagation();
}.bind(this));
});
}
this._tip = new mindplot.widget.FloatingTip(this.getImage()._peer._native, {
this._tip = new mindplot.widget.FloatingTip($(me.getImage()._peer._native), {
title: $msg('NOTE'),
container: 'body',
// Content can also be a function of the target element!
content:function () {
var result = new Element('div');
result.setStyles({padding:'5px'});
var title = new Element('div', {text:$msg('NOTE')});
title.setStyles({
'font-weight':'bold',
color:'black',
'padding-bottom':'5px',
width:'100px'
});
title.inject(result);
var text = new Element('div', {text:this._linksModel.getText()});
text.setStyles({
'white-space':'pre-wrap',
'word-wrap':'break-word'
}
);
text.inject(result);
return result;
}.bind(this),
html:true,
position:'bottom',
arrowOffset:10,
center:true,
arrowSize:15,
offset:{x:10, y:20},
className:'notesTip'
content: function () {
return me._buildTooltipContent();
},
html: true,
placement: 'bottom',
destroyOnExit: true
});
},
getModel:function () {
_buildTooltipContent: function () {
if ($("body").find("#textPopoverNote").length == 1) {
var text = $("body").find("#textPopoverNote");
text.text(this._linksModel.getText());
} else {
var result = $('<div id="textPopoverNote"></div>').css({padding: '5px'});
var text = $('<div></div>').text(this._linksModel.getText())
.css({
'white-space': 'pre-wrap',
'word-wrap': 'break-word'
}
);
result.append(text);
return result;
}
},
getModel: function () {
return this._linksModel;
}
});

View File