mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
N.1041 little changes on trunk[4963] : uses NOWDOC instead of HEREDOC syntax, and some variable renaming
SVN:trunk[4964]
This commit is contained in:
@@ -203,14 +203,14 @@ function UpdateConfigEditorButtonState()
|
||||
EOF
|
||||
);
|
||||
$oP->add_ready_script(
|
||||
<<<EOF
|
||||
<<<'EOF'
|
||||
var editor = ace.edit("new_config");
|
||||
var textarea = $('input[name="new_config"]');
|
||||
editor.getSession().setValue(textarea.val());
|
||||
var $configurationSource = $('input[name="new_config"]');
|
||||
editor.getSession().setValue($configurationSource.val());
|
||||
|
||||
editor.getSession().on('change', function()
|
||||
{
|
||||
textarea.val(editor.getSession().getValue());
|
||||
$configurationSource.val(editor.getSession().getValue());
|
||||
UpdateConfigEditorButtonState();
|
||||
});
|
||||
editor.getSession().on("changeAnnotation", function()
|
||||
@@ -224,11 +224,12 @@ editor.commands.addCommand({
|
||||
name: 'save',
|
||||
bindKey: {win: "Ctrl-S", "mac": "Cmd-S"},
|
||||
exec: function(editor) {
|
||||
\$editorContainer = \$(editor.container);
|
||||
\$submitButton = $('#submit_button');
|
||||
$editorContainer = $(editor.container);
|
||||
$editorForm = $editorContainer.closest("form");
|
||||
$submitButton = $('#submit_button');
|
||||
|
||||
if (\$submitButton.is(":enabled")) {
|
||||
\$editorContainer.closest("form").submit();
|
||||
if ($submitButton.is(":enabled")) {
|
||||
$editorForm.submit();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user