Skip to content

Commit 08af25b

Browse files
committed
Added code beautify.js (Crtl+F)
Added comment/uncomment (Ctrl+/) Updated to lastest version of code mirror editor Fixed issue with Script persistence to localStorage git-svn-id: https://share-extras.googlecode.com/svn/trunk/Javascript Console@1326 a3f5c567-fd0f-3a89-9b71-a290c5a5f590
1 parent 119f808 commit 08af25b

File tree

8 files changed

+2646
-918
lines changed

8 files changed

+2646
-918
lines changed

javascript-console-dist/docs/README.txt

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
Javascript Console Admin Console component for Alfresco 3.4/4.0
33
===============================================================
44

5-
Author: Florian Maul
5+
Author: Florian Maul (fme AG)
66

7-
This project defines a Javascript Console component for Share's Administration Console,
8-
that enables the execution of arbitrary javascript code in the repository.
7+
This project contains a Javascript Console component for the Alfresco Share's
8+
Administration Console, that enables the execution of arbitrary javascript code
9+
in the repository.
910

1011

1112
Installation
1213
------------
1314

1415
The component has been developed to install on top of an existing Alfresco
15-
3.4 or 4.0 installation. There are two different version in this archive with
16-
a specific folder for each of the Alfresco version.
16+
3.4 or 4.0 installation. There are two different version in this archive within
17+
a specific folder for each of the Alfresco versions 3.4.x or 4.0.x.
1718

1819
When you have chosen the correct folder (3.4.x or 4.0.x) for your Alfresco version
1920
you'll find two jar files within that folder. The javascript-console-repo.jar needs
@@ -26,6 +27,10 @@ corresponding folder in the Share webapp:
2627

2728
tomcat/webapps/share/WEB-INF/lib/
2829

30+
If you prefer the AMP deployment method you also find amp files in the respective
31+
folder that you can install with the apply_amps.sh or apply_amps.bat utilities. Be
32+
aware that you need to install both amps files: the repo-amp and the share-amp.
33+
2934
The deployment location has changed recently (with Javascript Console 0.5)
3035
because the Javascript Console now uses Java classes that have to be deployed
3136
to these locations and can NOT reside in tomcat/shared/lib anymore.
@@ -42,9 +47,9 @@ project directory.
4247
The command should build a JAR file named javascript-console-repo.jar or
4348
javascript-console-share.jar in the 'dist' directory within your project.
4449

45-
There also is the javascript-console-dist which builds both jar files and
46-
creates a patched version for Alfresco 3.4.x which does not support all the
47-
features of the version for 4.0.x
50+
There also is the javascript-console-dist project which builds both jar files
51+
and creates a patched version for Alfresco 3.4.x which does not support all the
52+
features of the version for 4.0.x. This project creates the AMP files as well.
4853

4954
To deploy the extension files into a local Tomcat instance for testing, you can
5055
use the hotcopy-tomcat-jar task. You will need to set the tomcat.home
@@ -59,6 +64,20 @@ resources in the JAR file are picked up.
5964
Using the component
6065
-------------------
6166

62-
Log in to Alfresco Share as an admin user and navigate to the Administration
63-
page. Click 'Javascript Console' in the left hand side navigation.
67+
- Log in to Alfresco Share and navigate to an Administration page such as Users
68+
or Groups
69+
- In the left-hand-side navigation, click *Javascript Console*
70+
- Enter Alfresco repository javascript code in the textarea at the top. Press
71+
the execute button to run the script.
72+
- You can use the special print(..) javascript command to output messages to
73+
the output window.
74+
- use Ctrl+Space for code completion. Note that only global objects and specific
75+
variables (document, space, variables ending in ...node) are completed.
76+
77+
For more information on using the tool visit the wiki page:
78+
79+
http://code.google.com/p/share-extras/wiki/JavascriptConsole
80+
81+
82+
6483

javascript-console-share/config/alfresco/site-webscripts/de/fme/components/jsconsole/javascript-console.get.head.ftl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/javascript-console.js"></@script>
66
<@link rel="stylesheet" type="text/css" href="${page.url.context}/res/modules/documentlibrary/global-folder.css" />
77
<@script type="text/javascript" src="${page.url.context}/res/modules/documentlibrary/global-folder.js"></@script>
8+
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/beautify.js"></@script>
89
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/codemirror.js"></@script>
910
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/javascript.js"></@script>
1011
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/xml.js"></@script>

0 commit comments

Comments
 (0)