Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
a5051118
Commit
a5051118
authored
May 21, 2014
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ace editor gadget.
parent
45681dfb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
0 deletions
+64
-0
Gruntfile.js
Gruntfile.js
+17
-0
src/editor_ace/aceeditor.js
src/editor_ace/aceeditor.js
+20
-0
src/editor_ace/aceeditor.less
src/editor_ace/aceeditor.less
+7
-0
src/editor_ace/index.html
src/editor_ace/index.html
+20
-0
No files found.
Gruntfile.js
View file @
a5051118
...
...
@@ -85,6 +85,14 @@ module.exports = function (grunt) {
strictMath
:
true
,
strictUnits
:
true
,
syncImport
:
true
},
files
:
{
"
<%= global_config.dest %>/editor_ace/aceeditor.css
"
:
"
<%= global_config.src %>/editor_ace/aceeditor.less
"
,
"
<%= global_config.dest %>/erp5/erp5.css
"
:
"
<%= global_config.src %>/erp5/erp5.less
"
,
"
<%= global_config.dest %>/twin_erp5/superindex.css
"
:
"
<%= global_config.src %>/twin_erp5/superindex.less
"
}
}
},
...
...
@@ -175,6 +183,11 @@ module.exports = function (grunt) {
},
curl
:
{
ace
:
{
src
:
'
https://github.com/ajaxorg/ace-builds/archive/3bfda31096cf3f42b77aac64eb788584ea796822.zip
'
,
relative_url
:
"
lib/ace-builds-3bfda31096cf3f42b77aac64eb788584ea796822/src-min/ace.js
"
,
dest
:
'
<%= global_config.tmp %>/ace.zip
'
},
jqueryte
:
{
src
:
'
http://jqueryte.com/jqte/<%= curl.jqueryte.directory %>.zip
'
,
version
:
"
1.4.0
"
,
...
...
@@ -215,6 +228,10 @@ module.exports = function (grunt) {
},
unzip
:
{
ace
:
{
src
:
'
<%= curl.ace.dest %>
'
,
dest
:
'
<%= global_config.dest %>/lib/
'
},
jqueryte
:
{
src
:
'
<%= curl.jqueryte.dest %>
'
,
dest
:
'
<%= global_config.dest %>/lib/
'
...
...
src/editor_ace/aceeditor.js
0 → 100644
View file @
a5051118
/*global ace, rJS */
/*jslint nomen: true*/
(
function
(
window
,
rJS
)
{
"
use strict
"
;
var
gk
=
rJS
(
window
);
gk
.
declareMethod
(
'
setContent
'
,
function
(
value
)
{
this
.
editor
.
getSession
().
setValue
(
value
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
return
this
.
editor
.
getSession
().
getValue
();
});
gk
.
ready
(
function
(
g
)
{
g
.
editor
=
ace
.
edit
(
g
.
__element
.
getElementsByTagName
(
'
div
'
)[
0
]);
g
.
editor
.
setTheme
(
"
ace/theme/monokai
"
);
});
}(
window
,
rJS
,
ace
));
src/editor_ace/aceeditor.less
0 → 100644
View file @
a5051118
#editor {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
src/editor_ace/index.html
0 → 100644
View file @
a5051118
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<title>
Ace Editor
</title>
<script
src=
"../<%= curl.ace.relative_url %>"
type=
"text/javascript"
charset=
"utf-8"
></script>
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"aceeditor.js"
type=
"text/javascript"
></script>
<!--script src="./ace/theme-monokai.js" type="text/javascript"></script>
<script src="./ace/mode-javascript.js" type="text/javascript"></script>
<script src="./ace/worker-javascript.js" type="text/javascript"></script-->
<link
rel=
"stylesheet"
href=
"aceeditor.css"
media=
"screen"
></link>
</head>
<body>
<div
id=
"editor"
></div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment