Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
e5c1992b
Commit
e5c1992b
authored
Dec 26, 2014
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_code_mirror: Saving (Ctrl-s) was not working when using Merge view.
parent
c959b708
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.xml
...tem/portal_skins/erp5_code_mirror/code_mirror_support.xml
+20
-6
bt5/erp5_code_mirror/bt/change_log
bt5/erp5_code_mirror/bt/change_log
+3
-0
No files found.
bt5/erp5_code_mirror/SkinTemplateItem/portal_skins/erp5_code_mirror/code_mirror_support.xml
View file @
e5c1992b
...
@@ -273,7 +273,12 @@
...
@@ -273,7 +273,12 @@
alert(\'Saving failed: \' + textStatus);\n
alert(\'Saving failed: \' + textStatus);\n
}\n
}\n
\n
\n
cm.save();\n
if(merge_mode_elem)\n
// TODO: Hack, \'cm\' should work!\n
$(\'#
&dtml-field_id;
\').val(merge_mode_elem.edit.getValue());\n
else\n
cm.save();\n
\n
var edit_data = $(\'form#main_form\').serialize();\n
var edit_data = $(\'form#main_form\').serialize();\n
edit_data += \'
&message_only:int=1\';
\n
edit_data += \'
&message_only:int=1\';
\n
$.ajax({type: \'POST\',\n
$.ajax({type: \'POST\',\n
...
@@ -389,7 +394,7 @@
...
@@ -389,7 +394,7 @@
viewportMargin: Infinity,\n
viewportMargin: Infinity,\n
extraKeys: {"Ctrl-Space": "autocomplete",\n
extraKeys: {"Ctrl-Space": "autocomplete",\n
"Ctrl-Q": function(cm){cm.foldCode(cm.getCursor());},\n
"Ctrl-Q": function(cm){cm.foldCode(cm.getCursor());},\n
"Ctrl-S": function(cm)
{saveDocument(cm, $.Event(\'click\'))}},\n
"Ctrl-S": function(cm){saveDocument(cm, $.Event(\'click\'))}},\n
foldGutter: true,\n
foldGutter: true,\n
lineWrapping: true,\n
lineWrapping: true,\n
gutters: ["CodeMirror-linenumbers",\n
gutters: ["CodeMirror-linenumbers",\n
...
@@ -429,7 +434,8 @@
...
@@ -429,7 +434,8 @@
showTrailingSpace: true,\n
showTrailingSpace: true,\n
matchBrackets: true,\n
matchBrackets: true,\n
/* viewportMargin: Infinity, */\n
/* viewportMargin: Infinity, */\n
extraKeys: {"Ctrl-Space": "autocomplete"},\n
extraKeys: {"Ctrl-Space": "autocomplete",\n
"Ctrl-S": function(cm){saveDocument(merge_mode_elem.edit, $.Event(\'click\'))}},\n
foldGutter: true,\n
foldGutter: true,\n
lineWrapping: true,\n
lineWrapping: true,\n
gutters: ["CodeMirror-linenumbers",\n
gutters: ["CodeMirror-linenumbers",\n
...
@@ -472,9 +478,15 @@
...
@@ -472,9 +478,15 @@
function successHandler(data) {\n
function successHandler(data) {\n
container_elem = $(\'#history_select_container\');\n
container_elem = $(\'#history_select_container\');\n
if(container_elem.length == 0)\n
if(container_elem.length == 0)\n
container_elem = $(\'
<p
style=
"margin: 0; padding: 0;"
id=
"history_select_container"
></p>
\');\n
{\n
right_selected_value = null;\n
container_elem = $(\'
<p
style=
"margin: 0; padding: 0;"
id=
"history_select_container"
></p>
\');\n
}\n
else\n
else\n
container_elem.empty();\n
{\n
right_selected_value = $(\'#history_select_right\').val();\n
container_elem.empty();\n
}\n
\n
\n
for(var i = 0; i
< 2
;
i++)\n
for(var i = 0; i
< 2
;
i++)\n
{\n
{\n
...
@@ -494,7 +506,9 @@
...
@@ -494,7 +506,9 @@
data,\n
data,\n
function(j, d) {\n
function(j, d) {\n
select_revision_element.append(\n
select_revision_element.append(\n
$("
<option
value=
\'"
+
d[\'key\']
+
"\'
>
" + j + ": " +\n
$("
<option
value=
\'"
+
d[\'key\']
+
"\'
"
+\n
(is_right
&&
d[\'key\']
==
right_selected_value
?
"
selected=
\'selected\'"
:
"")\n
+
"
>
" + j + ": " +\n
new Date(d[\'time\'] * 1000).toString() + " (" + d[\'user_name\'] + ")" +\n
new Date(d[\'time\'] * 1000).toString() + " (" + d[\'user_name\'] + ")" +\n
"
</option>
"));\n
"
</option>
"));\n
});\n
});\n
...
...
bt5/erp5_code_mirror/bt/change_log
View file @
e5c1992b
2014-12-26 arnaud.fontaine
* Saving (Ctrl-s) was not working when using Merge view.
2014-12-26 arnaud.fontaine
2014-12-26 arnaud.fontaine
* Refresh Component history revisions when saving with CTRL+s.
* Refresh Component history revisions when saving with CTRL+s.
...
...
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