Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Boris Kocherov
erp5
Commits
06eb9e4c
Commit
06eb9e4c
authored
Jan 29, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: enable tasty features in codemirror
parent
8360833f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
11 deletions
+90
-11
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_appcache.xml
...m/web_page_module/codeeditor_gadget_officejs_appcache.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_html.html
...age_module/codemirror_gadget_code_mirror_editor_html.html
+34
-3
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_html.xml
...page_module/codemirror_gadget_code_mirror_editor_html.xml
+18
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_js.js
...eb_page_module/codemirror_gadget_code_mirror_editor_js.js
+30
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_js.xml
...b_page_module/codemirror_gadget_code_mirror_editor_js.xml
+6
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/codeeditor_gadget_officejs_appcache.xml
View file @
06eb9e4c
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
956.
9824.23798.17493
</string>
</value>
<value>
<string>
956.
25809.26818.60245
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
148
2489673.45
</float>
<float>
148
5527180.58
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_html.html
View file @
06eb9e4c
...
...
@@ -8,9 +8,12 @@
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
href=
"codemirror/lib/codemirror.css"
>
<link
rel=
"stylesheet"
href=
"codemirror/addon/dialog/dialog.css"
>
<link
rel=
"stylesheet"
href=
"codemirror/addon/search/matchesonscrollbar.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/lib/codemirror.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/addon/dialog/dialog.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/addon/search/matchesonscrollbar.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/addon/fold/foldgutter.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/addon/merge/merge.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"codemirror/addon/lint/lint.css"
>
<script
src=
"codemirror/lib/codemirror.js"
></script>
<script
src=
"codemirror/mode/css/css.js"
></script>
...
...
@@ -20,10 +23,38 @@
<script
src=
"codemirror/addon/dialog/dialog.js"
></script>
<script
src=
"codemirror/addon/search/searchcursor.js"
></script>
<script
src=
"codemirror/addon/search/search.js"
></script>
<script
src=
"codemirror/addon/comment/comment.js"
></script>
<script
src=
"codemirror/addon/comment/continuecomment.js"
></script>
<script
src=
"codemirror/addon/scroll/annotatescrollbar.js"
></script>
<script
src=
"codemirror/addon/search/matchesonscrollbar.js"
></script>
<script
src=
"gadget_code_mirror_editor.js"
type=
"text/javascript"
></script>
<script
src=
"codemirror/addon/cm_edit/matchbrackets.js"
></script>
<!-- Trailing spaces -->
<script
src=
"codemirror/addon/cm_edit/trailingspace.js"
></script>
<style
type=
"text/css"
>
.cm-trailingspace
{
background-color
:
gray
;
}
</style>
<!-- Code folding -->
<script
src=
"codemirror/addon/fold/foldcode.js"
></script>
<script
src=
"codemirror/addon/fold/foldgutter.js"
></script>
<script
src=
"codemirror/addon/fold/indent-fold.js"
></script>
<script
src=
"codemirror/addon/fold/comment-fold.js"
></script>
<!-- Merge -->
<script
src=
"diff_match_patch/javascript/diff_match_patch_uncompressed.js"
></script>
<script
src=
"codemirror/addon/merge/merge.js"
></script>
<!-- Linter -->
<script
src=
"codemirror/addon/lint/lint.js"
></script>
<script
src=
"jshint.js"
></script>
<script
src=
"codemirror/addon/lint/javascript-lint.js"
></script>
</head>
<body>
<div
class=
"codemirror_gadget"
><textarea
name=
"code"
></textarea></div>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_html.xml
View file @
06eb9e4c
...
...
@@ -73,14 +73,30 @@
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_code_mirror_editor.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
codemirror_gadget_code_mirror_editor_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
revision
</string>
</key>
<value>
<string>
27
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Code Mirror Editor Gadget
</string>
</value>
...
...
@@ -218,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.55456.978.40106
</string>
</value>
<value>
<string>
95
6.63666.51974.1638
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -236,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
148
1295361.6
</float>
<float>
148
5722098.08
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_js.js
View file @
06eb9e4c
...
...
@@ -36,10 +36,38 @@
g
.
props
.
editor
=
CodeMirror
.
fromTextArea
(
g
.
props
.
element
.
querySelector
(
"
textarea
"
),
{
lineNumbers
:
true
,
mode
:
"
text/html
"
,
styleActiveLine
:
true
,
showTrailingSpace
:
true
,
mode
:
"
text/html
"
,
matchBrackets
:
true
,
tabSize
:
2
,
indentWithTabs
:
false
,
showCursorWhenSelecting
:
true
,
extraKeys
:
{
"
Alt-F
"
:
"
findPersistent
"
}
continueComments
:
true
,
foldGutter
:
true
,
lineWrapping
:
true
,
gutters
:
[
"
CodeMirror-lint-markers
"
,
"
CodeMirror-linenumbers
"
,
"
CodeMirror-foldgutter
"
],
lint
:
true
,
extraKeys
:
{
"
Ctrl-Space
"
:
"
autocomplete
"
,
"
Alt-Space
"
:
"
autocomplete
"
,
"
Ctrl-Q
"
:
function
(
cm
)
{
cm
.
foldCode
(
cm
.
getCursor
());
},
"
Tab
"
:
function
(
cm
)
{
// We want to insert spaces, not tab, and we also want to keep the behaviour of indenting selection.
if
(
cm
.
getSelection
())
{
return
cm
.
execCommand
(
"
defaultTab
"
);
}
var
spaces
=
new
Array
(
cm
.
getOption
(
"
indentUnit
"
)
+
1
).
join
(
"
"
);
cm
.
replaceSelection
(
spaces
);
},
"
Ctrl-I
"
:
"
indentAuto
"
,
"
Shift-Tab
"
:
"
indentLess
"
,
'
Alt-F
'
:
'
findPersistent
'
,
'
Cmd-/
'
:
'
toggleComment
'
,
'
Ctrl-/
'
:
'
toggleComment
'
}
});
// XXX custom styling for CribJS, should be put somewhere else-
g
.
props
.
element
.
querySelector
(
'
.CodeMirror
'
).
setAttribute
(
'
style
'
,
'
min-height: 800px;
'
);
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/codemirror_gadget_code_mirror_editor_js.xml
View file @
06eb9e4c
...
...
@@ -93,6 +93,10 @@
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
revision
</string>
</key>
<value>
<string>
31
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Code Mirror Editor Gadget JS
</string>
</value>
...
...
@@ -230,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
5.55531.65356.52462
</string>
</value>
<value>
<string>
95
6.63666.53306.36966
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
148
1330224.45
</float>
<float>
148
5722100.13
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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