Commit df442fe8 authored by Jérome Perrin's avatar Jérome Perrin

patches/SourceCodeEditorZMI: allow edition without getPreferredSourceCodeEditorKeymap

on (very) old ERP5 instances this does not exist, so when something is
wrong we can not edit python scripts
parent 091dcb4e
...@@ -86,7 +86,7 @@ def manage_page_footer(self): ...@@ -86,7 +86,7 @@ def manage_page_footer(self):
portal_type = document.meta_type portal_type = document.meta_type
if editor == 'codemirror' and getattr(portal, 'code_mirror_support', None) is not None: if editor == 'codemirror' and getattr(portal, 'code_mirror_support', None) is not None:
keymap = portal.portal_preferences.getPreferredSourceCodeEditorKeymap() keymap = portal.portal_preferences.getPreference('source_code_editor_keymap')
return '''<script type="text/javascript" src="%s/jquery/core/jquery.min.js"></script> return '''<script type="text/javascript" src="%s/jquery/core/jquery.min.js"></script>
%s %s
</body> </body>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment