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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
a261c388
Commit
a261c388
authored
Oct 13, 2017
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs] Reuse code mirror gadget
parent
b4e5cb0e
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
417 deletions
+106
-417
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_appcache.xml
...m/web_page_module/gadget_officejs_codemirror_appcache.xml
+32
-14
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_html.html
...Item/web_page_module/gadget_officejs_codemirror_html.html
+72
-22
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_html.xml
...eItem/web_page_module/gadget_officejs_codemirror_html.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_js.js
...lateItem/web_page_module/gadget_officejs_codemirror_js.js
+0
-50
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_js.xml
...ateItem/web_page_module/gadget_officejs_codemirror_js.xml
+0
-329
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_appcache.xml
View file @
a261c388
...
@@ -105,27 +105,45 @@
...
@@ -105,27 +105,45 @@
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
CACHE MANIFEST\n
<value>
<string>
CACHE MANIFEST\n
# generated on Fri, 09 Jun 2016 11:45:33 +0000\n
# generated on Fri, 13 Oct 2017 16:00:00 +0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
CACHE:\n
renderjs.js\n
renderjs.js\n
rsvp.js\n
rsvp.js\n
jiodev.js\n
gadget_officejs_codemirror.js\n
codemirror/lib/codemirror.js\n
codemirror/lib/codemirror.js\n
codemirror/lib/codemirror.css\n
codemirror/lib/codemirror.css\n
codemirror/addon/cm_edit/matchbrackets.js\n
codemirror/addon/cm_edit/trailingspace.js\n
codemirror/addon/dialog/dialog.css\n
codemirror/addon/dialog/dialog.css\n
codemirror/addon/search/matchesonscrollbar.css\n
codemirror/mode/css/css.js\n
codemirror/mode/xml/xml.js\n
codemirror/mode/htmlmixed/htmlmixed.js\n
codemirror/mode/javascript/javascript.js\n
codemirror/addon/dialog/dialog.js\n
codemirror/addon/dialog/dialog.js\n
codemirror/addon/display/fullscreen.css\n
codemirror/addon/display/fullscreen.js\n
codemirror/addon/display/rulers.js\n
codemirror/addon/search/searchcursor.js\n
codemirror/addon/search/searchcursor.js\n
codemirror/addon/search/search.js\n
codemirror/addon/search/search.js\n
codemirror/addon/scroll/annotatescrollbar.js\n
codemirror/addon/search/jump-to-line.js\n
codemirror/addon/search/matchesonscrollbar.js\n
codemirror/addon/selection/active-line.js\n
codemirror/addon/hint/show-hint.css\n
codemirror/addon/hint/show-hint.js\n
codemirror/addon/hint/anyword-hint.js\n
codemirror/addon/fold/foldgutter.css\n
codemirror/addon/fold/foldcode.js\n
codemirror/addon/fold/foldgutter.js\n
codemirror/addon/fold/indent-fold.js\n
codemirror/addon/fold/comment-fold.js\n
codemirror/addon/merge/merge.css\n
diff_match_patch/javascript/diff_match_patch_uncompressed.js\n
codemirror/addon/merge/merge.js\n
codemirror/addon/lint/lint.css\n
codemirror/addon/lint/lint.js\n
jshint.js\n
codemirror/addon/lint/javascript-lint.js\n
csslint.js\n
codemirror/addon/lint/css-lint.js\n
codemirror/mode/xml/xml.js\n
codemirror/mode/javascript/javascript.js\n
codemirror/mode/css/css.js\n
codemirror/mode/htmlmixed/htmlmixed.js\n
codemirror.gadget.js\n
NETWORK:\n
NETWORK:\n
*
</string>
</value>
*
</string>
</value>
</item>
</item>
...
@@ -268,7 +286,7 @@ NETWORK:\n
...
@@ -268,7 +286,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
58.44217.46814.8652
</string>
</value>
<value>
<string>
9
62.48895.14326.63948
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -286,7 +304,7 @@ NETWORK:\n
...
@@ -286,7 +304,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
495033658.39
</float>
<float>
1
507908439.82
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_html.html
View file @
a261c388
...
@@ -3,29 +3,79 @@
...
@@ -3,29 +3,79 @@
<head>
<head>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Codemirror
Gadget
</title>
<title>
Codemirror
</title>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
></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"
>
<script
src=
"codemirror/lib/codemirror.js"
></script>
<script
src=
"codemirror/lib/codemirror.js"
></script>
<script
src=
"codemirror/mode/css/css.js"
></script>
<link
rel=
"stylesheet"
href=
"codemirror/lib/codemirror.css"
/>
<script
src=
"codemirror/mode/xml/xml.js"
></script>
<!--script src="codemirror/mode/&dtml-mode;/&dtml-mode;.js"></script-->
<script
src=
"codemirror/mode/javascript/javascript.js"
></script>
<script
src=
"codemirror/addon/cm_edit/matchbrackets.js"
></script>
<script
src=
"codemirror/mode/htmlmixed/htmlmixed.js"
></script>
<!-- Trailing spaces -->
<script
src=
"codemirror/addon/cm_edit/trailingspace.js"
></script>
<style
type=
"text/css"
>
.cm-trailingspace
{
background-color
:
gray
;
}
body
{
padding
:
0
;
margin
:
0
;
}
</style>
<!-- Rulers -->
<script
src=
"codemirror/addon/display/rulers.js"
></script>
<!-- Search addons -->
<link
rel=
"stylesheet"
href=
"codemirror/addon/dialog/dialog.css"
>
<script
src=
"codemirror/addon/dialog/dialog.js"
></script>
<script
src=
"codemirror/addon/dialog/dialog.js"
></script>
<script
src=
"codemirror/addon/search/searchcursor.js"
></script>
<script
src=
"codemirror/addon/search/searchcursor.js"
></script>
<script
src=
"codemirror/addon/search/search.js"
></script>
<script
src=
"codemirror/addon/search/search.js"
></script>
<script
src=
"codemirror/addon/scroll/annotatescrollbar.js"
></script>
<script
src=
"codemirror/addon/search/jump-to-line.js"
></script>
<script
src=
"codemirror/addon/search/matchesonscrollbar.js"
></script>
<script
src=
"codemirror/addon/selection/active-line.js"
></script>
<script
src=
"gadget_officejs_codemirror.js"
type=
"text/javascript"
></script>
<!-- Python autocomplete (Ctrl-Space, see below)
TODO-arnau: Add ERP5 autocompletion?
-->
<link
rel=
"stylesheet"
href=
"codemirror/addon/hint/show-hint.css"
/>
<script
src=
"codemirror/addon/hint/show-hint.js"
></script>
<script
src=
"codemirror/addon/hint/anyword-hint.js"
></script>
<!-- Code folding -->
<link
rel=
"stylesheet"
href=
"codemirror/addon/fold/foldgutter.css"
/>
<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 -->
<link
rel=
"stylesheet"
href=
"codemirror/addon/merge/merge.css"
/>
<script
src=
"diff_match_patch/javascript/diff_match_patch_uncompressed.js"
></script>
<script
src=
"codemirror/addon/merge/merge.js"
></script>
<!-- Linter -->
<link
rel=
"stylesheet"
href=
"codemirror/addon/lint/lint.css"
/>
<script
src=
"codemirror/addon/lint/lint.js"
></script>
<script
type=
"text/javascript"
src=
"jshint.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/addon/lint/javascript-lint.js"
></script>
<script
type=
"text/javascript"
src=
"csslint.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/addon/lint/css-lint.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/mode/xml/xml.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/mode/javascript/javascript.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/mode/css/css.js"
></script>
<script
type=
"text/javascript"
src=
"codemirror/mode/htmlmixed/htmlmixed.js"
></script>
<link
rel=
"stylesheet"
href=
"codemirror/addon/display/fullscreen.css"
/>
<script
src=
"codemirror/addon/display/fullscreen.js"
></script>
<script
src=
"codemirror.gadget.js"
></script>
</head>
</head>
<body>
<body>
<
div
class=
"codemirror_gadget"
><textarea
name=
"code"
></textarea></div
>
<
textarea></textarea
>
</body>
</body>
</html>
</html>
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_html.xml
View file @
a261c388
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
57.30669.28687.29849
</string>
</value>
<value>
<string>
9
62.24071.53498.34082
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -292,7 +292,7 @@
...
@@ -292,7 +292,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
487777231.91
</float>
<float>
1
507908370.86
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_js.js
deleted
100644 → 0
View file @
b4e5cb0e
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, rJS, CodeMirror, RSVP */
(
function
(
window
,
rJS
,
CodeMirror
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
saveContent
"
,
"
triggerSubmit
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
this
.
props
.
key
=
options
.
key
||
{};
this
.
props
.
editor
.
setOption
(
"
mode
"
,
options
.
mode
||
"
htmlmixed
"
);
this
.
props
.
editor
.
setValue
(
options
.
value
||
""
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
var
result
=
{};
result
[
this
.
props
.
key
||
"
text_content
"
]
=
this
.
props
.
editor
.
getValue
();
return
result
;
})
.
declareService
(
function
()
{
this
.
props
.
editor
.
refresh
();
this
.
props
.
editor
.
focus
();
})
.
ready
(
function
(
g
)
{
g
.
props
=
{};
return
g
.
getElement
()
.
push
(
function
(
element
)
{
g
.
props
.
element
=
element
;
CodeMirror
.
commands
.
save
=
function
()
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
g
.
saveContent
();
});
};
g
.
props
.
editor
=
CodeMirror
.
fromTextArea
(
g
.
props
.
element
.
querySelector
(
"
textarea
"
),
{
lineNumbers
:
true
,
mode
:
"
text/html
"
,
matchBrackets
:
true
,
showCursorWhenSelecting
:
true
,
extraKeys
:
{
"
Alt-F
"
:
"
findPersistent
"
}
});
// XXX custom styling for CribJS, should be put somewhere else-
g
.
props
.
element
.
querySelector
(
'
.CodeMirror
'
).
setAttribute
(
'
style
'
,
'
min-height: 800px;
'
);
});
});
}(
window
,
rJS
,
CodeMirror
,
RSVP
));
\ No newline at end of file
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_codemirror_js.xml
deleted
100644 → 0
View file @
b4e5cb0e
This diff is collapsed.
Click to expand it.
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