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
b68f3e72
Commit
b68f3e72
authored
Sep 25, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplemde: initial inclusion
parent
85b13566
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
285 additions
and
0 deletions
+285
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde.xml
...implemde/SkinTemplateItem/portal_skins/erp5_simplemde.xml
+26
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.html.html
...em/portal_skins/erp5_simplemde/simplemde.gadget.html.html
+20
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.html.xml
...tem/portal_skins/erp5_simplemde/simplemde.gadget.html.xml
+34
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.js.js
...teItem/portal_skins/erp5_simplemde/simplemde.gadget.js.js
+72
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.js.xml
...eItem/portal_skins/erp5_simplemde/simplemde.gadget.js.xml
+34
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.xml
...kinTemplateItem/portal_skins/erp5_simplemde/simplemde.xml
+26
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.css.css
...rtal_skins/erp5_simplemde/simplemde/simplemde.min.css.css
+7
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.css.xml
...rtal_skins/erp5_simplemde/simplemde/simplemde.min.css.xml
+28
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.js.js
...portal_skins/erp5_simplemde/simplemde/simplemde.min.js.js
+7
-0
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.js.xml
...ortal_skins/erp5_simplemde/simplemde/simplemde.min.js.xml
+28
-0
bt5/erp5_simplemde/bt/template_format_version
bt5/erp5_simplemde/bt/template_format_version
+1
-0
bt5/erp5_simplemde/bt/template_skin_id_list
bt5/erp5_simplemde/bt/template_skin_id_list
+1
-0
bt5/erp5_simplemde/bt/title
bt5/erp5_simplemde/bt/title
+1
-0
No files found.
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_simplemde
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.html.html
0 → 100644
View file @
b68f3e72
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
SimpleMDE Gadget
</title>
<link
rel=
"stylesheet"
href=
"simplemde/simplemde.min.css"
>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"simplemde/simplemde.min.js"
type=
"text/javascript"
></script>
<script
src=
"simplemde.gadget.js"
type=
"text/javascript"
></script>
</head>
<body>
<div><textarea
class=
"editor-textarea"
></textarea></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.html.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
simplemde.gadget.html
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.js.js
0 → 100644
View file @
b68f3e72
/*global window, document, rJS, SimpleMDE, RSVP*/
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
window
,
document
,
rJS
,
SimpleMDE
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
notifySubmit
"
,
"
notifySubmit
"
)
.
declareJob
(
"
deferNotifySubmit
"
,
function
()
{
// Ensure error will be correctly handled
return
this
.
notifySubmit
();
})
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareJob
(
"
deferNotifyChange
"
,
function
()
{
// Ensure error will be correctly handled
return
this
.
notifyChange
();
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
key
:
options
.
key
,
value
:
options
.
value
||
""
,
editable
:
options
.
editable
===
undefined
?
true
:
options
.
editable
});
})
.
declareMethod
(
'
getContent
'
,
function
()
{
var
result
=
{};
if
(
this
.
state
.
editable
)
{
result
[
this
.
state
.
key
]
=
this
.
simplemde
.
markdown
(
this
.
simplemde
.
value
());
// Change the value state in place
// This will prevent the gadget to be changed if
// its parent call render with the same value
// (as ERP5 does in case of formulator error)
this
.
state
.
value
=
result
[
this
.
state
.
key
];
}
return
result
;
})
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
configuration
;
if
(
modification_dict
.
hasOwnProperty
(
'
editable
'
))
{
// Expected configuration changed.
// Create a new editor
gadget
.
on_change_listener
=
gadget
.
deferNotifyChange
.
bind
(
gadget
);
gadget
.
simplemde
=
new
SimpleMDE
({
element
:
this
.
element
.
querySelector
(
"
textarea
"
),
spellChecker
:
false
,
renderingConfig
:
{
codeSyntaxHighlighting
:
true
,
}
});
}
if
(
modification_dict
.
hasOwnProperty
(
'
value
'
))
{
// Prevent triggering notifyChange method when render is called
// remove the change listener before calling setData and restore it after
this
.
simplemde
.
codemirror
.
off
(
'
change
'
,
this
.
on_change_listener
);
if
(
!
this
.
simplemde
.
codemirror
.
getOption
(
"
fullScreen
"
))
{
this
.
simplemde
.
toggleFullScreen
();
}
this
.
simplemde
.
value
(
this
.
state
.
value
);
this
.
simplemde
.
codemirror
.
on
(
'
change
'
,
gadget
.
on_change_listener
);
this
.
simplemde
.
codemirror
.
addKeyMap
({
"
Ctrl-S
"
:
gadget
.
deferNotifySubmit
.
bind
(
gadget
)
});
}
});
}(
window
,
document
,
rJS
,
SimpleMDE
,
RSVP
));
\ No newline at end of file
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.gadget.js.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
simplemde.gadget.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
simplemde
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.css.css
0 → 100644
View file @
b68f3e72
This diff is collapsed.
Click to expand it.
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.css.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
simplemde.min.css
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/css
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
simplemde.min.css
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.js.js
0 → 100644
View file @
b68f3e72
This diff is collapsed.
Click to expand it.
bt5/erp5_simplemde/SkinTemplateItem/portal_skins/erp5_simplemde/simplemde/simplemde.min.js.xml
0 → 100644
View file @
b68f3e72
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
simplemde.min.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
simplemde.min.js
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_simplemde/bt/template_format_version
0 → 100644
View file @
b68f3e72
1
\ No newline at end of file
bt5/erp5_simplemde/bt/template_skin_id_list
0 → 100644
View file @
b68f3e72
erp5_simplemde
\ No newline at end of file
bt5/erp5_simplemde/bt/title
0 → 100644
View file @
b68f3e72
erp5_simplemde
\ No newline at end of file
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