Skip to content

Commit 1873a2a

Browse files
committed
add placeholder option for both editors
see http://codemirror.net/demo/placeholder.html
1 parent f02c214 commit 1873a2a

File tree

9 files changed

+220
-134
lines changed

9 files changed

+220
-134
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/addon/searchcursor.js"></@script>
2424
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/addon/search.js"></@script>
2525

26+
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/addon/placeholder.js"></@script>
27+
2628
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/javascript.js"></@script>
2729
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/xml.js"></@script>
2830
<@script type="text/javascript" src="${page.url.context}/res/fme/components/jsconsole/codemirror/htmlmixed.js"></@script>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
<div>
4747

4848
<div id="${el}-editorResize">
49-
<textarea id="${el}-jsinput" name="jsinput" cols="80" rows="5" class="jsbox"></textarea>
49+
<textarea id="${el}-jsinput" placeholder="${msg("editor.js.placeholder")}" name="jsinput" cols="80" rows="5" class="jsbox"></textarea>
5050

5151
</div>
5252
<div id="${el}-scriptEditorInfo" class="scriptStatusLine"><br/></div>
5353

5454
</div>
5555
<div>
56-
<textarea id="${el}-templateinput" name="templateinput" cols="80" rows="5" class="templateInputBox"></textarea>
56+
<textarea id="${el}-templateinput" placeholder="${msg("editor.fm.placeholder")}" name="templateinput" cols="80" rows="5" class="templateInputBox"></textarea>
5757
<div id="${el}-templateEditorInfo" class="templateStatusLine"><br/></div>
5858
</div>
5959
<div>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,6 @@ title.destinationDialog=Select Folder
5252

5353
tooltip.urlargs=Enter the url arguments for the webscript using the query string format:<br><b>a=123&b=test</b> will result in variables <b>args.a</b> filled with the value 123<br>and <b>args.b</b> filled with the value 'test'.
5454
tooltip.runas=Enter the username the script will be run as. By default the script <br>will be run as <b>admin</b> but any exiting alfresco user<br>can be used.
55+
56+
editor.js.placeholder=Type in your repository javascript code here...
57+
editor.fm.placeholder=Type in your freemarker template here...

javascript-console-share/config/alfresco/site-webscripts/de/fme/components/jsconsole/javascript-console.get_de.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ tab.label.json.output=JSON-Ausgabe
5252
tooltip.urlargs=Hier die URL argumente für das Webscript im Querystring-Format eingeben:<br><b>a=123&b=test</b> erzeugt die Variablen <b>args.a</b> gefüllt mit dem Wert 123<br>und <b>args.b</b> mit dem Wert 'test'.
5353
tooltip.runas=Der Benutzername mit dem das Skript ausgeführt wird. Standardmässig wird das Skript mit dem Benutzer <b>admin</b> ausgeführt.<br>Es jedoch jeder Alfresco-Benutzer verwendet werden.
5454

55+
editor.js.placeholder=Geben Sie hier ihren Javascript Code ein...
56+
editor.fm.placeholder=Geben Sie hier ihr Freemarker Template ein...

javascript-console-share/config/alfresco/site-webscripts/de/fme/components/jsconsole/javascript-console.get_en.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ title.destinationDialog=Select Folder
5050

5151
tooltip.urlargs=Enter the url arguments for the webscript using the query string format:<br><b>a=123&b=test</b> will result in variables <b>args.a</b> filled with the value 123<br>and <b>args.b</b> filled with the value 'test'.
5252
tooltip.runas=Enter the username the script will be run as. By default the script <br>will be run as <b>admin</b> but any exiting alfresco user<br>can be used.
53+
54+
editor.js.placeholder=Type in your repository javascript code here...
55+
editor.fm.placeholder=Type in your freemarker template here...

javascript-console-share/source/web/fme/components/jsconsole/codemirror/codemirror.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,6 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
245245

246246
.lint-error {font-family: arial; font-size: 70%; background: #ffa; color: #a00; padding: 2px 5px 3px; }
247247
.lint-error-icon {color: white; background-color: red; font-weight: bold; border-radius: 50%; padding: 0 3px; margin-right: 7px;}
248+
249+
/* placeholder */
250+
.CodeMirror pre.CodeMirror-placeholder { color: #999; }

0 commit comments

Comments
 (0)